ArcticaProject / nx-libs

nx-libs
Other
121 stars 39 forks source link

nxagent fails to run with "Could not open default font 'fixed'" #84

Open sunweaver opened 8 years ago

sunweaver commented 8 years ago

From X2Go Bug #884: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=884

On Fr 04 Sep 2015 04:06:55 CEST, devsk wrote:

Yes, I am talking about Gentoo specific packaging issue. I have filed

https://bugs.gentoo.org/show_bug.cgi?id=559370

to track it down. As I mentioned, the specific files being talked
about are the font files in /usr/share/fonts/misc
(/usr/share/fonts/X11/misc on Ubuntu) which are character encodings
specific e.g. 9x15-ISO8859-*.pcf.gz. nxagent can not load a fixed
size font '9x15' without the presence of these files. It looks like
these are abandoned by modern X code because both Xorg and Xvnc work
fine without these files.

-devsk

Thanks for explaining the above. However, I think that we should get
this issue also solved upstream as most systems work on UTF-8 basis
and the more local encodings are rather historical than
current-state-of-the-art.

Let's leave this bug open and address it for 3.6.x of nx-libs instead
of dealing with it as a Gentoo specific bug.

Mike

sunweaver commented 7 years ago

The real work to fix this is backporting this X.org patch: https://cgit.freedesktop.org/xorg/xserver/commit/?id=49b93df8a3002db7196aa3fc1fd8dca1c12a55d6

sunweaver commented 7 years ago

and this one: https://cgit.freedesktop.org/xorg/xserver/commit/?id=f56cbe1ef24415d0142b9a7d0ab0a031069ccb52

Ionic commented 7 years ago

Reopening, because this doesn't seem to be fixed.

Seen with nightly nx-libs versions on a Devuan Jessie system for some odd reason.

sunweaver commented 7 years ago

Hi Mihai

On Friday, August 18, 2017, Mihai Moldovan wrote:

Reopening, because this doesn't seem to be fixed. Seen with nightly nx-libs versions on a Devuan Jessie system for some odd reason.

This is odd, indeed. The code for that error message is gone afair. Please do some more investigation if possible.

Thanks, Mike

-- Sent from my Fairphone (running Sailfish OS)...

uli42 commented 1 year ago

There are still several references to the "fixed" font in the code, e.g. as the default font that is used for font replacement or as the default font that is compiled in:

/nx-X11/programs/Xserver/include/site.h:#define COMPILEDDEFAULTFONT    "fixed"

Also the basic error message is still there:

./nx-X11/programs/Xserver/dix/main.c:       FatalError("could not open default font '%s'", defaultTextFont);
Bdot42 commented 1 year ago

The 'Could not open default font 'fixed'' still occurs on OpenSuse, x2goserver-x2goagent: 3.5.99.24 (from x2goserver-x2goagent-4.1.0.7-0.0x2go1.0.git20230823.1996.heuler.x86_64 = latest nightly build). Is there anything I can do to analyze that further? Is there a workaround to get the server to run?

MAH69IK commented 10 months ago

I too had a similar problem. I was trying to connect to Debian with Manjaro. As it turned out (thanks to stackoverflow!) - remote connection takes local fonts. So I just had to install some packages in Manjaro to get the fonts I needed and update the cache (fc-cache).

uli42 commented 10 months ago

It really should not happen anymore. 3.5.99.24 is very old, please update to 3.5.99.26 or .27

Uli

МАН69К @.***> schrieb am So., 7. Jan. 2024, 02:13:

I too had a similar problem. I was trying to connect to Debian with Manjaro. As it turned out (thanks to stackoverflow!) - remote connection takes local fonts. So I just had to install some packages in Manjaro to get the fonts I needed and update the cache (fc-cache).

— Reply to this email directly, view it on GitHub https://github.com/ArcticaProject/nx-libs/issues/84#issuecomment-1879903226, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZDBVPHU3S5UAPU64QTYNHZC5AVCNFSM4B4GZZQKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBXHE4TAMZSGI3A . You are receiving this because you commented.Message ID: @.***>

MAH69IK commented 10 months ago

It really should not happen anymore. 3.5.99.24 is very old, please update to 3.5.99.26 or .27

My nxagent version is 3.5.99.26-5+deb12u1. I connected to the server via SSH, ran nxagent :55 and got the error "Could not open default font 'fixed'" until I found out that the problem was a lack of client-side fonts and installed additional packages. After that, both the nxagent command and the x2goclient call started working for me.

uli42 commented 10 months ago

Was referring to the latest comment mention 3.5.99.24. However, you are right, the corresponding code is still existing in recent builds. Hmm.

And it is also still part of the upstream Xserver code - despite various people mentioning the fixed font is not required for current Xservers. Must do some research here, it seems...

See e.g. https://www.x.org/wiki/FAQErrorMessages/#index1h2

uli42 commented 10 months ago

On my Debian 12 system I cannot provoke the "could not open default font 'fixed'" even by removing all fonts. You can verify this by running nxagent -ac :55 and then DISPLAY:55 xlsfonts - you will still see the fixed fonts because they are built into libXfont.

So maybe on your system there's something wrong with libXfont?

MAH69IK commented 10 months ago

Debian 12 - is my server. I needed to install fonts on the client, Manjaro, which would solve the problem. I used the command pacman -S xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-cyrillic xorg-fonts-type1 xorg-fonts-misc. I think xorg-fonts-misc was sufficient. I had libxfont2 installed, it was fine. 2.0.6 on the client and on the server.

4d30 commented 8 months ago

I believe I am experiencing this too

$ nxagent -version 
NXAGENT - Version 3.5.99.27
$ sudo pacman -S xorg-fonts-100dpi xorg-fonts-75dpi xorg-fonts-cyrillic xorg-fonts-type1 xorg-fonts-misc
warning: xorg-fonts-100dpi-1.0.4-2 is up to date -- reinstalling
warning: xorg-fonts-75dpi-1.0.4-1 is up to date -- reinstalling
warning: xorg-fonts-misc-1.0.4-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (5) xorg-fonts-100dpi-1.0.4-2  xorg-fonts-75dpi-1.0.4-1  xorg-fonts-cyrillic-1.0.4-1  xorg-fonts-misc-1.0.4-1  xorg-fonts-type1-1:1.0.4-1

Total Download Size:   23.91 MiB
Total Installed Size:  38.55 MiB
Net Upgrade Size:       3.04 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 xorg-fonts-100dpi-1.0.4-2-any                                                          11.9 MiB  1222 KiB/s 00:10 [#####################################################################] 100%
 xorg-fonts-75dpi-1.0.4-1-any                                                           10.3 MiB  1104 KiB/s 00:10 [#####################################################################] 100%
 xorg-fonts-type1-1:1.0.4-1-any                                                       1341.5 KiB  1458 KiB/s 00:01 [#####################################################################] 100%
 xorg-fonts-cyrillic-1.0.4-1-any                                                       378.7 KiB  1857 KiB/s 00:00 [#####################################################################] 100%
 Total (4/4)                                                                            23.9 MiB  1175 KiB/s 00:21 [#####################################################################] 100%
(5/5) checking keys in keyring                                                                                     [#####################################################################] 100%
(5/5) checking package integrity                                                                                   [#####################################################################] 100%
(5/5) loading package files                                                                                        [#####################################################################] 100%
(5/5) checking for file conflicts                                                                                  [#####################################################################] 100%
(5/5) checking available disk space                                                                                [#####################################################################] 100%
:: Processing package changes...
(1/5) reinstalling xorg-fonts-100dpi                                                                               [#####################################################################] 100%
(2/5) reinstalling xorg-fonts-75dpi                                                                                [#####################################################################] 100%
(3/5) installing xorg-fonts-cyrillic                                                                               [#####################################################################] 100%
(4/5) installing xorg-fonts-type1                                                                                  [#####################################################################] 100%
(5/5) reinstalling xorg-fonts-misc                                                                                 [#####################################################################] 100%
:: Running post-transaction hooks...
(1/2) Updating fontconfig cache...
(2/2) Updating X fontdir indices...
$ nxagent -ac :55

NXAGENT - Version 3.5.99.27

Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
Copyright (c) 2008-2017 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>
Copyright (c) 2011-2022 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Copyright (c) 2014-2022 Ulrich Sibiller <uli42@gmx.de>
Copyright (c) 2014-2019 Mihai Moldovan <ionic@ionic.de>
Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
See https://github.com/ArcticaProject/nx-libs for more information.

Info: Agent running with pid '28216'.
Session: Starting session at 'Fri Mar  1 17:11:38 2024'.
Info: Using alpha channel in render extension.
Info: Not using local device configuration changes.
Warning: Cannot read keystroke file '/home/joey/.nx/config/keystrokes.cfg'.
Info: using keystrokes file '/etc/nxagent/keystrokes.cfg'
Currently known keystrokes:

  close_session         : Ctrl+Alt+t
  switch_all_screens    : Ctrl+Alt+f
  fullscreen            : Ctrl+Shift+Alt+f
  minimize              : Ctrl+Alt+m
  defer                 : Ctrl+Alt+e
  force_synchronization : Ctrl+Alt+j
  resize                : Ctrl+Alt+r
  viewport_move_left    : Ctrl+Shift+Alt+Left
  viewport_move_left    : Ctrl+Shift+Alt+KP_Left
  viewport_move_up      : Ctrl+Shift+Alt+Up
  viewport_move_up      : Ctrl+Shift+Alt+KP_Up
  viewport_move_right   : Ctrl+Shift+Alt+Right
  viewport_move_right   : Ctrl+Shift+Alt+KP_Right
  viewport_move_down    : Ctrl+Shift+Alt+Down
  viewport_move_down    : Ctrl+Shift+Alt+KP_Down
  viewport_scroll_left  : Ctrl+Alt+Left
  viewport_scroll_left  : Ctrl+Alt+KP_Left
  viewport_scroll_up    : Ctrl+Alt+Up
  viewport_scroll_up    : Ctrl+Alt+KP_Up
  viewport_scroll_right : Ctrl+Alt+Right
  viewport_scroll_right : Ctrl+Alt+KP_Right
  viewport_scroll_down  : Ctrl+Alt+Down
  viewport_scroll_down  : Ctrl+Alt+KP_Down
  reread_keystrokes     : Ctrl+Alt+k
  autograb              : Ctrl+Alt+g
  dump_clipboard        : Ctrl+Shift+Alt+cerror opening security policy file /usr/local/share/nx/SecurityPolicy
Info: Keycode conversion auto-determined as on
Error: Aborting session with 'Could not open default font 'fixed''.
Session: Aborting session at 'Fri Mar  1 17:11:38 2024'.
Session: Session aborted at 'Fri Mar  1 17:11:38 2024'

EDIT: This seems to work: $ nxagent -ac -fn lucidasanstypewriter-10 -fc lucidasans-24 :55

but not this: $ nxagent -ac -fn fixed -fc cursor :55

While this workaround gets it to open and run, I don't know how to make x2go call those kwargs so I will have to file this under interesting but not immediately helpful.