NXClient @ FLC

/!\ Before you do something that's written on this page, be so kind and follow following rules: /!\

  1. There is no guarantee, that anything described on this page works.
  2. Please don't save your DESY password in the nxclient on any computer. A password is
    something only you should know, not your computer.

  3. Please feel free to subscribe to this page, this allows me to know who I might bug, if I
    mess up the setup.

  4. This is a Wiki. If something on this page is wrong, or not clear enough, fix it.

Usermode Login

The standard nxclient of NoMachine does not work with the "usermode" login as described on this page without modification. This page tells you, what to do to login to your beloved DESY-desktop using NoMachine's nxclient.

You need

  1. the NoMachine nxclient for your operating system

  2. a nxssh-wrapper script/program to enable the "usermode" login (one of:)

    1. nxssh-4US.c
    2. or other wrapper script (syntax might be different)
  3. read access to my afs pool space
    •  ls -laF  /afs/desy.de/group/flc/pool/samson/NX4U.flc/ 

You have to do

On your "private" computer:

  1. find your nxclient installation

  2. rename the original nxssh binary in the nxclient directory to mxssh

    • mxssh (the old nxssh) will be called by the wrapper binary, which you just downloaded
    • the name mxssh is hardcoded in the nxssh-wrapper binary and thuns can only be changed in the source code

  3. copy the "new" nxssh binary from above as nxssh into the nxclient directory

    • don't forget to set the file permission of the new nxssh binary to "executable" if you are using Linux chmod u+x nxssh

On your DESY Computer:

  1. create a new file: $HOME/bin/nxserver-usermode
    Replace flcXX.desy.de with the name of your desktop PC

    #!/bin/bash
    ssh flcXX.desy.de "/afs/desy.de/group/flc/pool/samson/NX4U.flc/bin/nxserver-usermode $@"

    Set execute permissions: chmod u+x $HOME/bin/nxserver-usermode

On your "private" computer again: run nxclient and

  1. create a new session; name it "Yippey - Work at home" or whatever you like
  2. enter as username "<your DESY username>@U" (e.g. samson@U)

  3. enter your DESY password as password (make sure that "Remember my password is not checked)

  4. configure your session, give as hostname "@flcl01.desy.de"
    you can choose a different login server from which you can read the afs pool dicectory)

  5. the "@" symbols in the login name and server name will tell the wrapper nxssh to use
    the special usermode login. Normal nx-sessions will continue to work

  6. if you get the error message "The NX service is not available or the NX access was disabled on host @flcl01.desy.de", click on Detail;
    if you see

    NX> 205 XXXXXX@flcl01.desy.de's password: 
    Permission denied (publickey,gssapi-with-mic,password).
    NX> 404 ERROR: wrong password or login.
    NX> 999 Bye
    you mistyped your DESY password

More information on the wrapper script

http://mail.kde.org/pipermail/freenx-knx/2008-August/007324.html



Known Problems and Issues



Useful Stuff

Keyboard

Sessions on different DESY-hosts

The host on which your nx-session will run is hard-coded in your $HOME/bin/nxserver-usermode file. However, you can create several nxserver-usermode files (e.g. nxserver-usermode.flc60, nxserver-usermode.flc61, ...).

The nxssh wrapper binary will call the $HOME/bin/nxserver-usermode by default, but you can point it to differnt nxserver-usermode file by changing your logign name from "<username>@U" to "<username>@U:<path-to-nxserver-userermode-file>". E.g. "samson@U"->"samson@U:~/bin/nxserver-usermode.flc61"



Random Notes


Notes on the NXServer (for the keen ones)

Messed up shell prompt at DESY

The DESY login environment depends on the "OS" environment variable. A patch of the nxnode script avoids these problems.

--- nxnode.orig 2008-08-23 14:09:39.000000000 +0200
+++ nxnode      2009-11-20 00:21:08.000000000 +0100
@@ -258,6 +258,7 @@
        # Prepare application startup
        #

+       export OS=Linux
        . /etc/profile
        [ "$ENABLE_SOURCE_BASH_PROFILE" = "1" -a -f ~/.bash_profile ] && . ~/.bash_profile

Wrong Keyboard Layout with Client on Laptop or Recent Linux Distribution

Recent Linux distributions use the "evdev" driver for keyborad. This might cause problems with the keyboard layout. The most obvious symptom are non-functional arrow keys on the keyboard.

NoMachine integrated a workaround into the nxagent binary during the 3.3.0 series of their product. If your nxagent binary is >=3.4.0, your version should be fine. If the version of nxagent (strings nxagent |grep "NXAGENT - Version") is 3.3.0, you might try strings nxagent |grep "evdev" to figure out whether your version is good.

In addition to the right nxagent version, the freeNX must pass the "client" option to nxagent. Again a patch for nxnode is needed:

--- nxnode.orig 2008-08-23 14:09:39.000000000 +0200
+++ nxnode      2009-11-20 00:21:08.000000000 +0100
@@ -1245,7 +1246,7 @@
        umask 0077

 cat << EOF > "$USER_FAKE_HOME/.nx/C-$sess_id/options"
-${keyboard:+keyboard=$keyboard,}${kbtype:+kbtype=$kbtype,}${kbload:+kbload=$kbload,}${keymap:+keymap=$keymap,}${resize:+resize=$resize,}${CACHE}${IMAGES}${PACK}link=$link,nodelay=$nodelay,type=$realtype,cleanup=0,${ACCEPT}cookie=$proxy_cookie,id=$sess_id,samba=$samba,media=$media${sync:+,sync=$sync}${cups:+,cups=$cups}${keybd:+,keybd=$keybd}${aux:+,aux=$aux}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}${clipboard:+,clipboard=$clipboard}${menu:+,menu=$menu}:$display
+${keyboard:+keyboard=$keyboard,}${client:+client=$client,}${kbtype:+kbtype=$kbtype,}${kbload:+kbload=$kbload,}${keymap:+keymap=$keymap,}${resize:+resize=$resize,}${CACHE}${IMAGES}${PACK}link=$link,nodelay=$nodelay,type=$realtype,cleanup=0,${ACCEPT}cookie=$proxy_cookie,id=$sess_id,samba=$samba,media=$media${sync:+,sync=$sync}${cups:+,cups=$cups}${keybd:+,keybd=$keybd}${aux:+,aux=$aux}${http:+,http=$http}${rdpcolors:+,rdpcolors=$rdpcolors}${rdpcache:+,rdpcache=$rdpcache}${fullscreen:+,fullscreen=1}${clipboard:+,clipboard=$clipboard}${menu:+,menu=$menu}:$display
 EOF
        umask $OLD_UMASK
 #samba=$samba,

Alternatively you might prefer to use the freeNX version provided by the Ubuntu-Team. This version already contains the fix above and several additional bug fixes. The Ubuntu-freeNX (bazaar-)repository can be found here.

Problems on Servers Without Other X-Servers

When nxagent is started, it tries to setup local UNIX-sockets to allow programs communication with the X-server. Therefore the directory /tmp/.X11-Unix must exist, the owner must be root and the permissions must be 1777. Otherwise nxagent refuses to create the socket for communication. If moreover nxagent got the option -nolisten tcp, then nxagent fails to start. AGENT_EXTRA_OPTIONS_X="" in node.conf overrides the default value "-nolisten tcp"

Login-Shell for usermode-sessions

Force the usermode-Session to run in a Login-Shell: NX4U/bin/nxserver-usermode  #!/bin/bash -l [...] 

JörgenSamson/NXClientUsermode (last edited 2011-06-20 12:33:16 by JörgenSamson)