nx-libs icon indicating copy to clipboard operation
nx-libs copied to clipboard

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

Open sunweaver opened this issue 8 years ago • 13 comments

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 avatar Feb 24 '16 13:02 sunweaver

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

sunweaver avatar Feb 05 '17 16:02 sunweaver

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

sunweaver avatar Feb 05 '17 16:02 sunweaver

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

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

Ionic avatar Aug 18 '17 06:08 Ionic

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)...

sunweaver avatar Aug 18 '17 08:08 sunweaver

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);

uli42 avatar Jun 20 '23 08:06 uli42

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?

Bdot42 avatar Oct 06 '23 17:10 Bdot42

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).

MAH69IK avatar Jan 07 '24 01:01 MAH69IK

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: @.***>

uli42 avatar Jan 07 '24 10:01 uli42

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.

MAH69IK avatar Jan 07 '24 14:01 MAH69IK

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 avatar Jan 07 '24 19:01 uli42

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?

uli42 avatar Jan 07 '24 20:01 uli42

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.

MAH69IK avatar Jan 08 '24 16:01 MAH69IK

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 <[email protected]>
Copyright (c) 2011-2022 Mike Gabriel <[email protected]>
Copyright (c) 2014-2022 Ulrich Sibiller <[email protected]>
Copyright (c) 2014-2019 Mihai Moldovan <[email protected]>
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.

4d30 avatar Mar 01 '24 23:03 4d30