PDA

View Full Version : freenx & nomachine nx problems


Mack
2007-03-02, 09:25 PM CST
Hello fedoraforum,

It was hard to click on "new topic", considering how many posts there are about freenx. But I've more or less memorized them, or at least the ones in the past couple of years, and I've googled just about anything I can think of, set logging to the max, and searched the nomachine knowledge base, and I'm still stumped. I'd really appreciate it if someone can point me towards what I should look at next.

I've installed the freenx server on one 32 bit fc6 machine ("yum install nx freenx", getting version 1.5.0-50) and the rpms available from www.nomachine.com (nxserver version 2.1.0-18) on another 64bit fc6 machine.

I've worked out connection and user authentication problems already, and can make nxclient -> nxserver connections to both machines, opening a session on ether machine's gnome-desktop. My ssh connections are public key on a non-standard port. I have ssh password authentication turned off and am using the nxserver username/password mechanism for user authentication.

Here are my problems:

Connecting to the freenx nxserver:

(1) First the most bizarre: When I terminate a session (click x in the top right corner, then choose "terminate" in the dialog box), roughly one hundred empty files are created in the /home/<unsername> directory on the server end.
To give you an idea, here are the first few:

-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 aleph
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 allcm
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 aplay
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 at
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 bmptopnm
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 bzdiff
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 bzip2
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:50 bzmore
-rw-r--r-- 1 Mack Mack 0 Mar 2 19:51 consolehelper

Yes, I've tried rebooting.

(2) The desktop fonts (msttfonts verdana) are almost unreadable in the client. They are chewed up and some letters are partly different colors, making them appear to be missing.

I've tried putting symlinks to the non-X-default fonts all over the place, but no luck. Since they display at all, and there is nothing in the logs about not finding them, I imagine the problem isn't that the server isn't finding them.

(3) Some applications don't start from the launcher icons on the client desktop. For example, I have an emacs launcher that just runs emacs with fonts and geometry specified. If I click on the icon in the client, it hangs with an elisp error (wrong argument type). On the other hand, if I open a terminal on the client and run exactly the launcher command, emacs starts perfectly and the fonts (adobe-courier) display perfectly.

Connecting to the nomachine server:

(1) Most menu bar applets cause error messages.

I also get a warning that esc is running but not responding and I need to kill it or reboot before I can open another window. Killing esc (and maybe a couple escd's) doesn't change anything. Neither does rebooting. On the other hand clicking "ok" makes the message go away at no apparent cost. Does this have something to do with session registration?

(2) as above

(3) as above

But at least terminating a session doesn't dump a bunch of garbage in my home directory on the server!

If anyone could suggest what to look at next, I would really appreciate it!

Thanks, Mack

Mack
2007-03-02, 11:53 PM CST
An update:

The garbled fonts are caused by subpixel antialiasing not being handled correctly. Selecting "Best Shapes" under System -> Preferences -> Fonts fixes the problem on the client. Of course that messes up the display on the server, since "subpixel smoothing" is the best choice for lcd screens. There's a bug report about this at

http://www.nomachine.com/tr/view.php?id=TR08D01484

Mack
2007-03-27, 11:23 PM CDT
Another update:

I finally found solutions to all of these problems. The trick, it turns out is to connect using xdm to start a gnome-session, rather than nx's unix:gnome connection.

Beats me. But it works beautifully.

I wasn't able to stop freenx from dumping zillions of empty files in my home directory when it terminates, so, reluctantly, I installed the non-GPL version of the server that NoMachine generously makes available.

I've tried to pare this down to only what's necessary. These instructions assume that

(0) if you're going to be logging on to your server over the internet, you either have a static address and registered host/domainname, or you have set up an internet hostname for your server with a dynamic dns service such as dyndns.org. (If you want to do this, but don't know how, yum-install ddclient, then read its documentation.)

(1) ssh is already set up. I have sshd running on a non-standard port
with RSA public key authentication and with username/password authentication
turned off.

(2) You're running FC6 --- the 64 bit kernel 2.6.20-1.2933.fc6, in my case.

Incidentally, freenx (and the nomachine rpms) are 32 bit. It takes some doing to coax yum into installing freenx and nx under x86_64. The last time I checked, there weren't rpms for them in 64bit fedora-extras.

(3) You're running gnome, in my case 2.16.

(4) You're running X version 7.1.1.

(5) This works with SELinux in permissive mode.

SERVER INSTALLATION:

Download

nxserver-2.1.0-18.i386.rpm
nxnode-2.1.0-15.i386.rpm
nxclient-2.1.0-11.i386.rpm

from

http://nomachine.com

Install these in reverse order.

It is possible that some dependencies were satisfied by packages that I had yum installed earlier in this project. You might need to yum-install some of the following:

libXpm.i386 3.5.5-3
expect.x86_64 5.43.0-5.1
yum-utils.noarch 1.0.3-1.fc6
libXaw.i386 1.0.2-8.1
compat-libstdc++-296.i386 2.96-138
tcl.i386 8.4.13-3.fc6
expect.i386 5.43.0-5.1
tcl.x86_64 8.4.13-3.fc6

Unlike the freenx installation, all of the files installed are in
/usr/NX. The configuration files are /usr/NX/etc/node.cfg and /usr/NX/server.cfg.
These files should be copies of node-redhat.cfg.sample and
server-redhat.cfg.sample, respectively.

Edit /usr/NX/etc/server.cfg and make the following changes:

SERVER_NAME = "my.computer.internet.name"
ENABLE_UNENCRYPTED_SESSION = "0"
ENABLE_DIRECT_XDM_QUERY = "1"

"my.computer.internet.name" is the name to find your computer on the internet, not your local hostname.domainname.

Edit /usr/NX/etc/node.cfg:

SSHD_PORT = "####"

where #### is the port on shich you have sshd running. If you are running ssh on the standard port 22, you don't need this. (But keep any eye on /var/log/secure !)

CONFIGURE GDM:

As root, run

gdmsetup

This opens a gui to configure gdm.

Under the "Remote" tab, set

"Style" to "Same as local" (or whatever you want).

under the "Security" tab, remove the check in front of

"Deny TCP connections to Xserver"

To implement these changes, you have to restart gdm. Beware that this will kill the X server, and with it all of your currently running applications.

gdm-restart

(or just hit control-alt-backspace).


GENERATE NEW DSA KEYS:

The default installation may use use pregenerated keys---I'm not certain. To get secure keys, I followed instructions at

http://www.nomachine.com/ar/view.php?ar_id=AR01C00126

As root run:

/usr/NX/scripts/setup/nxserver --keygen

Then

chown nx:root /usr/NX/home/nx/.ssh/authorized_keys2
chmod 0644 /usr/NX/home/nx/.ssh/authorized_keys2
chown nx:root /usr/NX/home/nx/.ssh/default.id_dsa.pub
chmod 0644 /usr/NXhome/nx/.ssh/default.id_dsa.pub

The key for clients to use is

/usr/NX/share/keys/default.id_dsa.key

On a client, copy this to the user's .ssh directory.


CLIENT INSTALLATION:

To set up a Linux client install the nx client from http://nomachine.com
The wizard to create a new launcher then is under Applications -> Internet - NX client
for Linux.

On the third wizard page choose

Unix XDM

for the desktop. Click "Settings" and choose

"Query an X desktop manager",

accepting the default "localhost:177".

Check "Enable SSL encryption of all traffic"

On the fourth wizard page:

Check "Show the Advanced Configuration Dialog" (as well as the default "Create an
icon on the Desktop").

After clicking "Finish", click "Key" under Server on the General tab of the
Advanced configuration dialog. Click "Import" and find the key that you saved in
the .ssh directory.

The installation on a windows client is essentially the same. Just copy the key
some place like "My Documents" that you can find it.