Knowledge Base
Searching in : Article
ID: AR10F00516
Applies to: NX Server Products
Added on: 2008-10-23
Last Update: 2008-10-29

How to activate the GNOME User Profiles with Sabayon for NX Sessions

Sabayon can be used for creating and setting-up GNOME desktop profiles and assigning them to different users.

In order to be able to generate GNOME User Profiles and to apply them when users run their NX Session, you need to perform the following steps.

  • Install Sabayon packages for your Linux distribution. You can retrieve them from your distribution's package management repository.

    For example, for Fedora Core 9: 

    [root@localhost ~]# yum install sabayon sabayon-admin

  • Create a new Gnome User Profile using the sabayon Tool and save it.
    The generated profile is saved as a ZIP-file in the desktop-profiles directory. Path to this directory depends on your distribution.
  • Activate the Gnome User Profile for some users.
  • The Sabayon packages provide the sabayon-xinitrc.sh script, which calls the sabayon-apply tool for each user's X-login.

    On Fedora Core, this script is installed in the following location:
    /etc/X11/xinit/xinitrc.d/sabayon-xinitrc.sh

    Find out the exact location of this script on your installation.

    Then you need to create a script similar to sabayon-xinitrc.sh for the NX session. Create a script, named sabayon-nx-xinitrc.sh and save it to the same directory as the original sabayon script. For example:

    /etc/X11/xinit/xinitrc.d/sabayon-nx-xinitrc.sh

    Sample content for the sabayon-nx-xinitrc.sh is the following. Please ensure that path to sabayon-apply is fitting your installation:

     #!/bin/bash

        DISPLAY=$4
        export DISPLAY=:$DISPLAY

        if [ "x$DISABLE_SABAYON_XINITRC" = "x" ] ; then
          if [ -x /opt/gnome/sbin/sabayon-apply ] ; then
            /opt/gnome/sbin/sabayon-apply
          fi
        fi

  • Then you need to modify the NX node configuration  to call the sabayon-nx-xinitrc.sh script for each user's NX-login.  Edit the node configuration file, namely  usr/NX/etc/node.cfg and set the UserScriptAfterSessionStart key to execute the script:

    UserScriptAfterSessionStart = "/etc/X11/xinit/xinitrc.d/sabayon-nx-xinitrc.sh"

  • Save changes applied to the node.cfg file. Changes will be effective when the user starts a new session. Restarting NX server is not needed.
  • Finally try to start a new NX session by logging in as the user for which a GNOME profile has been activated via Sabayon. The new profile should be loaded for your NX session.