NoMachine client fails to start on OpenSUSE Leap 15 when the X authority file is misconfigured

Added On: 2019-05-08 Last Modified: 2019-09-17
ID: TR05Q09278 Status: Closed
Severity: Minor Products:
Target: Platform: All Linux Platforms

When the X authority file contains entries with the current hostname associated with an incorrect authentication cookie, NoMachine client fails to start with the following error:

Invalid MIT-MAGIC-COOKIE-1 key
nxplayer.bin: cannot connect to X server :0

If the X authority file contains an entry with a correct cookie associated to the host stored in the environment variable XAUTHLOCALHOSTNAME (which stores the local hostname at the time the X session is started), the same issue doesn't occur for X clients like xterm (the error "Invalid MIT-MAGIC-COOKIE-1 key" is shown in any case before the application starts).

This difference is due to a workaround implemented in the libxcb version of OpenSUSE, which removed the need to have a consistent hostname definition between the system and the X server. Some discussions on the topic can be found here:

The same workaround will have to be included in the libxcb version shipped with NoMachine packages. There are several ways to work around this issue:

1. Fix the X authority wrong entries by setting the correct cookie for the hostname entry, or by removing entries with hostname different from the one stored in XAUTHLOCALHOSTNAME.

2. Enable server interpreted local user authentication by executing the command

	xhost +si:localuser:$(whoami)

3. Enable the host based authentication by executing the command

	xhost +