nxclient unable to find session on headless X server

Forum / NoMachine for Linux / nxclient unable to find session on headless X server

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #777
    mtoossi
    Participant

    Hello,

    I have installed NX 4.0 on server and client (free version). Based on https://www.nomachine.com/AR10K00710 and various forum posts, I’m trying to run Xvfb and gnome-session on the server.

    However, I still get the <No available sessions on this server> error. The server is CentOS 6.3 and I’m starting both Xvfb and gnome-session as the same non-root user.

    There could be a problem with the way I’m running Xvfb/gnome-session or missing dependencies on the system.

    Here is how I start the server:

     
        export XAUTHORITY=$HOME/.Xauthority
        rm $XAUTHORITY
        hostname=$(hostname -f)
        mcookie=$(/usr/bin/mcookie)
        xserverauthfile=$HOME/.serverauth.$$
        xauth -f $xserverauthfile add :0 . $mcookie
        xauth add :0 . $mcookie
        xauth add $hostname:0 . $mcookie
        # I added the -nolisten tcp and the RANDR extension to try to fix some of the errors below.
        /usr/bin/Xvfb :0 +extension RANDR -nolisten tcp -auth $xserverauthfile &
    

    At this point there aren’t any error messages. Now, when I start gnome-session: DISPLAY=:0 gnome-session &

    I get the following errors from gnome-session:

    
    Xlib:  extension "RANDR" missing on display ":0.0".
    gnome-session[16259]: WARNING: Unable to determine session: Unable to lookup session information for process '16259'
    gnome-session[16259]: WARNING: Unable to find provider 'gnome-panel' of required component 'panel'
    gnome-session[16259]: WARNING: Unable to find provider 'nautilus' of required component 'filemanager'
    GNOME_KEYRING_SOCKET=/v1/tmp/keyring-lMZwbQ/socket
    SSH_AUTH_SOCK=/v1/tmp/keyring-lMZwbQ/socket.ssh
    GNOME_KEYRING_PID=16272
    Xlib:  extension "RANDR" missing on display ":0.0".
    Xlib:  extension "RANDR" missing on display ":0.0".
    
    ** (gnome-settings-daemon:16275): WARNING **: Unable to start xrandr manager: RANDR extension is not present
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:16275): WARNING **: Connection failed, reconnecting...
    Xlib:  extension "RANDR" missing on display ":0.0".
    Xlib:  extension "RANDR" missing on display ":0.0".
    Xlib:  extension "RANDR" missing on display ":0.0".
    
    (polkit-gnome-authentication-agent-1:22358): polkit-gnome-1-WARNING **: Unable to determine the session we are in: Remote Exception invoking org.freedesktop.ConsoleKit.Manager.GetSessionForUnixProcess() on /org/freedesktop/ConsoleKit/Manager at name org.freedesktop.ConsoleKit: org.freedesktop.ConsoleKit.Manager.GeneralError: Unable to lookup session information for process '22358' org.freedesktop.ConsoleKit.Manager.GeneralError Unable%20to%20lookup%20session%20information%20for%20process%20%2722358%27
    socket(): Address family not supported by protocol
    Failed to play sound: Not available
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:22329): WARNING **: Connection failed, reconnecting...
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:22329): WARNING **: Connection failed, reconnecting...
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:22329): WARNING **: Connection failed, reconnecting...
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:22329): WARNING **: Connection failed, reconnecting...
    socket(): Address family not supported by protocol
    
    ** (gnome-settings-daemon:22329): WARNING **: Connection failed, reconnecting...
    [repeats...]
    

    I have spent quite a bit of time to get to this point (there were more errors!), and I’m not sure whether one of the errors above is responsible for the issue, or it’s something else entirely.

    If anyone could shed some light on how nxclient/nxserver detects the sessions available to the user on the server, that would be extremely helpful. I could use that to debug the issue on either end.

    Alternatively, any help with any of the error messages above would be greatly appreciated. The initial WARNINGs about missing gnome components is because nautilus and and gnome-panel are not installed on the system. I have requested those RPMs to be installed. However, it’s very unlikely that this will also fix all the other errors.

    • This topic was modified 11 years ago by mtoossi.
    • This topic was modified 10 years, 12 months ago by Britgirl.
    #779
    mtoossi
    Participant

    Oh, and here are all the possibly relevant processes:

    
    nx        6380  0.4  0.1 245244 64452 ?        Sl   12:18   0:07 /usr/NX/bin/nxserver.bin --localsession
    nx       17634  0.3  1.2 1186584 630432 ?      Sl   Nov15   7:37 /usr/NX/bin/nxserver.bin -c /etc/NX/nxserver --login -H 6
    nx       23141  0.0  0.1 238288 57540 ?        Sl   Nov15   0:03 /usr/NX/bin/nxserver.bin root 23128 --startup
    nx       23148  0.0  0.0 485348  6580 ?        Sl   Nov15   0:00 /usr/NX/bin/nxd
    nx       27708  0.0  0.1 616340 58200 ?        Sl   Nov15   0:01 /usr/NX/bin/nxserver.bin -c /etc/NX/nxserver --login -H 6
    nx       32302  0.2  0.1 616736 60456 ?        Sl   12:13   0:04 /usr/NX/bin/nxserver.bin -c /etc/NX/nxserver --login -H 6
    mtoossi   2217  3.7  0.0  68124  9416 pts/2    S    12:45   0:00 /usr/bin/Xvfb :0 +extension RANDR -nolisten tcp -auth /home/mtoossi/.serverauth.12956
    mtoossi   2836  0.0  0.0 243740  6812 pts/6    Sl+  12:45   0:00 gnome-session
    mtoossi   2839  0.0  0.0  18144   660 pts/6    S+   12:45   0:00 dbus-launch --exit-with-session gnome-session
    mtoossi   2840  0.0  0.0  19732   888 ?        Ss   12:45   0:00 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
    mtoossi   2843  0.0  0.0 128924  2924 ?        S    12:45   0:00 /usr/libexec/gconfd-2
    mtoossi   2849  0.0  0.0 161168  2116 pts/6    Sl+  12:45   0:00 gnome-keyring-daemon --start
    mtoossi   2852  0.3  0.0 553088 10044 ?        Ssl  12:45   0:00 /usr/libexec/gnome-settings-daemon
    mtoossi   2859  0.0  0.0 231552  7264 pts/6    S+   12:45   0:00 metacity
    
    #811
    Britgirl
    Keymaster

    You need to add the ‘screen’ parameter to the execution of X server, for example:

    ‘-screen 0 1024x768x24’.

    The screen size ‘1024×768’ can be set as you like but it’s important to set 24 bit depth as ‘x24’.

    Additionally X server and GNOME should be started from one console.

    #823
    mtoossi
    Participant

    Britgirl,

    Thanks for your suggestion. According to Xvfb manpage, the default screen settings are 1280x1024x8. I didn’t realize that the bit depth was significant.

    Unfortunately, I have downgraded to 3.5 after spending much time trying to troubleshoot this. If I go back to 4.0 at some point in the future, I will give this a try.

    I’m running X server and GNOME from the same terminal. Will be sure to continue to do so.

Viewing 4 posts - 1 through 4 (of 4 total)

This topic was marked as closed, you can't post.