NoMachine NX on openSUSE 12.2

After struggling with getting NoMachine NX 3.5 working on openSUSE 12.2 for several days, I’ve finally figured it out, and wanted to pass on what I’ve learned, to hopefully save others from the same torture. It’s my way of giving back a little bit to the openSUSE community.

The symptom is that the install fails saying it can’t authenticate user nx. Apparently, nxserver execs nxssh, which connects to the ssh server (sshd). In /var/log/messages there will be a message from sshd saying “Connection closed by 127.0.0.1 [preauth]”.

Here’s how I fixed it.

  1. Log into the machine where you installed the nx server.

  2. Edit the SSH server configuration file:

    sudo vim /etc/ssh/sshd_config

  3. Look for the line that starts with AuthorizedKeysFile. Edit the line to be:

    AuthorizedKeysFile .ssh/authorized_keys2

[size=2]Note the “2” at the end.

Save it.

  1. Find the ID of the /usr/sbin/sshd process.

    ps -ef | grep sshd

  2. Send it a signal to re-read this config file:

           sudo kill -HUP *processID*
    
  3. Start the nxserver.

    sudo /usr/NX/bin/nxserver --start

If that doesn’t work, then re-run the setup script.

sudo /usr/NX/scripts/setup/nxserver

This also fixes a similar problem with NX 4.0. See this trouble report for more info:

NoMachine NX - Support: Trouble Report

Hope this helps someone.

Greg Holmberg

[/size]

Of course, after I got past that problem, the next one raises it’s ugly head. Using the NX client from Windows, I log into the machine, the X desktop opens on my screen, and gnome starts. It’s looks good until I realize that there’s no text anywhere on the screen! The menus have icons but no text. Same in any applications I run.

A little searching reveals that there may be a problem with libcairo2 version 1.12, and I should downgrade to version 1.10.

Unfortunately, the openSUSE 12.2 repository doesn’t have that version, so I can’t figure out how to downgrade cairo.

Does anyone know how to get libcairo2 version 1.10 for openSUSE 12.2?

Thanks,

Greg Holmberg

You could try the one from 12.1 repos :
Index of /distribution/12.1/repo/oss/suse

It might just work.

Yep, that did it. I used yast2 to add the repository Index of /distribution/12.1/repo/oss I was then able to find libcairo2 version 1.10.2-14.1.3. I forced a downgrade for it and yast prompted me to also downgrade a few other libraries (libcairo-gobject2, libcairomm-1_0-1, libcairo-script-interpreter2, cairo-devel). Now I’m happily using NX 3.5 on openSUSE 12.2. Greg

No. You should comment out this line, so that it will use both. But this is indeed the problem. See this post: FreeNX from please_try_again repo

I fixed it in freenx-setup (included in my FreeNX build). See these articles:

Setting up NX server (part I: FreeNX)
Setting up NX server (part II: NoMachine NX)[/size][/size]

No problem. Please keep in mind that it might break some other stuff in the long run.

Is that why Gnome and I guess Xfce and LXDE desktops don’t work in my FreeNX build for 12.2??? The desktop would just start and crash immediately. KDE, Icewm and other desktops work fine. I have to fix that. I didn’t notice until someone sent me a PM couple days ago. Then I checked on the (only) 12.2 system I have installed until now, and indeed, I can not get Gnome and LXDE in a FreeNX session. However these desktops work with NoMachine NX (?!).

Well, that’s how sshd_config comes out of the box, and I can tell you that it doesn’t work with NX.

I suppose the other way to fix it is to edit node.cfg and server.cfg in /usr/NX/etc to change the line

#SSHAuthorizedKeys = “authorized_keys2”

to

SSHAuthorizedKeys = “authorized_keys”

Let me try it …

Yep, that works too. That’s probably better than changing how SSH works for all users.

Greg

That’s how sshd_config came out of the box (under 12.1 or other Linux distros), and it worked with NX.

# lsb_release -ds
"openSUSE 12.1 (x86_64)"

# grep -B 3 authorized_keys /etc/ssh/sshd_config

#RSAAuthentication yes
#PubkeyAuthentication yes
**#**AuthorizedKeysFile     .ssh/authorized_keys

But that’s what comes out of the box in openSUSE 12.2:

# lsb_release -ds
"openSUSE 12.2 (x86_64)"

#  grep -B 3 authorized_keys /etc/ssh/sshd_config
#RSAAuthentication yes
#PubkeyAuthentication yes

# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
**AuthorizedKeysFile     .ssh/authorized_keys**

“They” uncomment this line, and that’s why NX didn’t work. If you comment out the line, it will work. Of course you can modify NX default as well or symlink /var/lib/nxserver/home/.ssh/authorized_keys2 to /var/lib/nxserver/home/.ssh/authorized_keys. There are several workarounds.

[QUOTE=holmberg;2487903] After struggling with getting NoMachine NX 3.5 working on openSUSE 12.2 for several days, I’ve finally figured it out, and wanted to pass on what I’ve learned, to hopefully save others from the same torture. It’s my way of giving back a little bit to the openSUSE community.

The symptom is that the install fails saying it can’t authenticate user nx. Apparently, nxserver execs nxssh, which connects to the ssh server (sshd). In /var/log/messages there will be a message from sshd saying “Connection closed by 127.0.0.1 [preauth]”.

[size=2]

Rather than “struggling” (!), the following might have helped you, [/size]NoMachine NX - Support: Article. I had the same issue and simply wrote to NoMachine with my error, and then pointed me in the right direction. That took all of two days.[size=2]
[/size]

Worked for me, Many Thanks

Dave

On 2012-09-17 10:16, holmberg wrote:
> After struggling with getting NoMachine NX 3.5 working on
> openSUSE 12.2 for several days, I’ve finally figured it out, and wanted
> to pass on what I’ve learned, to hopefully save others from the same
> torture. It’s my way of giving back a little bit to the openSUSE
> community.

Maybe you should have posted this in the submission section of howtos.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))