Style Cleanup Required
This article does not follow the style standards in the Wiki Guide. More info...

An annotated, step-by-step guide to running Ubuntu on the SunRay thin-client architecture by Naaman Campbell.

Adapted from the SunRay Debian guide, more specifically, the 3.1 Final guide and various postings on the SunRay Users Mailing List.


SunRay Thin-Clients are a definite competitor in the business desktop arena providing an attractive alternative to the Citrix/Windows thin-client solution. Prior to SunRay 3.x, SunRay was only available on Solaris, however the release of 3.x SunRay Server Software (SRSS) allowed for the deployment onto Linux-based servers.

Sun's officially supported Linux distributions only included the following commercially-available distributions - RedHat Enterprise, SUSE and Sun's own Java Desktop System (SUSE-based). Many thanks have already been given to the pioneering work carried out by Michael Gernoth & Thomas Glanzmann for providing their tools and guide on how to run SunRay on Debian Sarge. From the SunRay Debian guide, users have managed to successfully run SunRay on other distributions such as Fedora Core 3 and Ubuntu.

After successfully setting up Ubuntu to run SRSS 3.1, I wish to provide an easier-to-follow, Ubuntu-tailored version of the SunRay Debian guide. The guide outlines the configuration of a SunRay LAN interconnect without failover on a base Breezy Badger installation.

This guide also works and has been tested with SRSS 3.1.1 and Ubuntu Dapper Drake with some minor changes. These changes to this guide have been added at the end of the guide, as a quick reference.

Following further testing of SRSS running on Ubuntu, variants of this guide are not covered. The use of a SunRay dedicated interconnect, as opposed to a LAN interconnect, did not successfully install in testing. Failover, on the other hand did successfully install, however, the benefits of using failover in SRSS seem to provide no greater advantages to not having failover configured.

Pre-Installation Foreword

It is recommended that all DNS, LDAP and IP address settings are finalised, prior to the installation of the SunRay Server Software. SRSS alters many network-related settings and may require reinstallation if these settings are changed later on.

This guide is based on a clean install of Ubuntu Breezy Badger (5.10).


* bug submitted - see below

The following packages are to be installed:

  • ldap-utils
    • SRSS utilises an LDAP server to store configuration info
  • dhcp3-server
    • SunRays require a DHCP server to be assigned an address along with SunRay-specific options

  • nscd
    • SRSS uses nscd to lookup info such as passwd and hosts
  • pdksh
    • SRSS requires the use of the Korn shell
  • alien
    • converts Sun's supplied RPMs to a superior package format - deb
  • atftpd
    • allows SRSS to serve firmware to SunRay thin-clients via TFTP

  • inetutils-inetd
    • allows atftpd to run using the inetd superserver
  • build-essential
    • necessary for the compiling of audio modules
  • linux-headers-uname -r

    • necessary for the compiling of audio modules
  • gcc-3.4
    • necessary for the compiling of audio modules
  • apache
    • runs the web-based SunRay Configuration pages

  • java-package
    • provides a wrapper package for Sun's self-extracting binary
  • java-common
    • sets up Java environment
  • fakeroot
    • allows regular users to create packages
  • gawk
    • SRSS requires the use of gawk in scripts
  • iputils-ping
    • for pinging stuff..
  • libraries: libdb3-util libx11-6 xlibs
  • xkbutils
    • for xkbinstall

Additional repositories, including multiverse, are required to obtain these packages (see AddingRepositoriesHowto).

Install Commands

ncampbell@naaman:~$ sudo apt-get install ldap-utils nscd gawk iputils-ping pdksh unzip alien libdb3-util libx11-6 xlibs xkbutils atftpd inetutils-inetd build-essential linux-headers-`uname -r` gcc-3.4 java-package java-common fakeroot

ncampbell@naaman:~$ sudo apt-get install apache
ncampbell@naaman:~$ sudo apt-get install apache

ncampbell@naaman:~$ sudo apt-get install dhcp3-server


$ sudo aptitude install ldap-utils dhcp3-server nscd pdksh alien atftpd inetutils-inetd build-essential gcc-3.4 apache2 java-package java-common fakeroot gawk iputils-ping linux-headers-`uname -r`

Additional Downloads

Along with the SRSS zip file from Sun, other software required includes Java, SRSS Debian Patch, scripts, SASL libraries, example DHCP configuration file, audio source zip file and the audio source patch. Apart from the SRSS zip file and Java, all the remaining downloads are provided via the Debian SunRay guide. To keep things tidy, create a SunRay directory to save the additional files to.

The SRSS zipfile requires logging in to the Sun website and can be found at - SunRay Server Software 3.1. It is also recommended to download the Install Guide as well from the same page.

The remaining downloads are retrievable via wget. The following changes to the wget configuration file (/etc/wgetrc) are necessary for a proxied network:

http_proxy = http://username:password@proxy.domain.com:3128
ftp_proxy = http://username:password@proxy.domain.com:3128

use_proxy = on

Manual Downloads

ncampbell@naaman:~/SunRay$ wget -O jre-1_5_0_05-linux-i586.bin http://jdl.sun.com/webapps/download/AutoDL?BundleId=10274

ncampbell@naaman:~/SunRay$ wget http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/sray31fcs-debian.patch http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/zsunray-init http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/libsasl7_1.5.28-6.4_i386.deb http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/xkbinstall http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/dhcpd.conf.example http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/10SUNWut http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/makefiles-2.6.tar.gz http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/SUNWut-modules-2.6.patch

Conversion and Installation

Extract and convert the SRSS Linux packages to deb format.

ncampbell@naaman:~/SunRay$ unzip srss_3.1.zip
ncampbell@naaman:~/SunRay$ mkdir srsspkgs
ncampbell@naaman:~/SunRay$ cd srsspkgs
ncampbell@naaman:~/SunRay/srsspkgs$ for i in ../srss_3.1/Sun_Ray_Core_Services_3.1/Linux/Packages/* ../srss_3.1/Sun_Ray_Data_Store_2.1/Linux/Packages/* ../srss_3.1/GDM_2.* ../srss_3.1/Docs/Linux/Packages/*; do
  fakeroot alien -d $i

Install the resultant deb packages.

ncampbell@naaman:~/SunRay/srsspkgs$ sudo dpkg -i sunw*deb

Patch SUNWut Package

ncampbell@naaman:~/SunRay/srsspkgs$ cd / && sudo patch -p0 < ~/SunRay/sray31fcs-debian.patch
ncampbell@naaman:~/SunRay/srsspkgs$ cd ~/SunRay

Establish Init Scripts

ncampbell@naaman:~/SunRay$ sudo cp zsunray-init /etc/init.d/.
ncampbell@naaman:~/SunRay$ sudo chmod 755 /etc/init.d/zsunray-init
ncampbell@naaman:~/SunRay$ sudo update-rc.d zsunray-init defaults 99 20

Java Installation

Instructions are adapted from the RestrictedFormats page.

ncampbell@naaman:~/SunRay$ chmod +x jre-1_5_0_05-linux-i586.bin
ncampbell@naaman:~/SunRay$ fakeroot make-jpkg jre-1_5_0_05-linux-i586.bin
ncampbell@naaman:~/SunRay$ sudo dpkg -i sun-j2re1.5_1.5.0+update05_i386.deb

Change the default Java to Sun Java (option 3):

ncampbell@naaman:~/SunRay$ sudo update-alternatives --config java

Setup SRSS Java environment:

ncampbell@naaman:~/SunRay$ sudo ln -s /usr/lib/j2re1.5-sun /etc/opt/SUNWut/jre

GNU Database Setup

Link libgdbm.so.2 to libgdbm.so.3 as a workaround for SRSS.

ncampbell@naaman:~/SunRay$ sudo ln -s /usr/lib/libgdbm.so.3 /usr/lib/libgdbm.so.2

HMAC-MD5 Encryption Installation

ncampbell@naaman:~/SunRay$ sudo dpkg -i libsasl7_1.5.28-6.4_i386.deb

Sun Keyboard Support

Install xkbinstall script and setup a workaround to prevent the keyboard from locking up at the login screen:

ncampbell@naaman:~/SunRay$ sudo /bin/sh xkbinstall
ncampbell@naaman:~/SunRay$ sudo ln -s /usr/share/X11/XKeysymDB /usr/X11R6/lib/X11/XKeysymDB

Alt Keys

The Alt and the Meta (black diamond) keys are swapped around by default on a Sun Type6 USB keyboard. The swapping of the keys is handled by the /etc/X11/gdm/Init/Default script (only for Sparc processors), however the SRSS installation sets up /etc/X11/gdm/SunRayInit/Default and requires the following to be added after this line:


ncampbell@naaman:~/SunRay$ sudo vi /etc/X11/gdm/SunRayInit/Default

  # Switch Sun's Alt and Meta mod mappings
  if /usr/bin/xmodmap | /bin/grep mod4 | /bin/grep Alt > /dev/null 2>/dev/null; then
    /usr/bin/xmodmap -e "clear Mod1" \
                   -e "clear Mod4" \
                   -e "add Mod1 = Alt_L" \
                   -e "add Mod1 = Alt_R" \
                   -e "add Mod4 = Meta_L" \
                   -e "add Mod4 = Meta_R"

  # Turn on Num Lock
  /usr/bin/xset led 1  

Keyboard Shortcuts

In addition to the Alt keys, the right shift key doesn't work by default in Gnome. It appears to be a conflict with the default Keyboard Shortcuts (System -> Preferences -> Keyboard Shortcuts) and is fixed by removing all references to the <shift> key. However, after removing all references to the <shift> key, the issue still remained and was fixed by removing all entries in Keyboard Shortcuts. The following shortcuts were reinstated:

  • Launch help browser - Help
  • Lock screen - "Moon"
  • Home folder - Open
  • Search - Find
  • Take a screenshot - Print
  • Take a screenshot of a window - <Alt>Print

  • Close window - <Alt>F4

  • Move between windows with popup - <Alt>Tab

  • Switch to workspace on the left - <Control><Alt>Left

  • Switch to workspace on the right - <Control><Alt>Right

To set these shortcuts globally, save the kbdshortcuts script, kbdshortcuts and make it executable:

ncampbell@naaman:~/SunRay$ chmod u+x kbdshortcuts

Log all users out and log into a console (CTRL+ALT+1) or SSH remotely in - this step can be left until later. After logging in, execute the kdbshortcuts script:

ncampbell@naaman:~/SunRay$ sudo ./kbdshortcuts

SunRay LAN Interconnect Setup

* bug submitted - see below

Prior to setting up the SunRay LAN Interconnect, a few 'Ubunturisations' need to be made..

  • DHCP
      ncampbell@naaman:~/SunRay$ sudo mkdir /etc/sysconfig
      ncampbell@naaman:~/SunRay$ sudo ln -s /etc/dhcp3/dhcpd.conf /etc/sysconfig/dhcpd
      ncampbell@naaman:~/SunRay$ sudo ln -s /etc/dhcp3/dhcpd.conf /etc/dhcpd.conf
      ncampbell@naaman:~/SunRay$ sudo ln -s /etc/init.d/dhcp3-server /etc/init.d/dhcpd
  • getent Change the following line in /opt/SUNWut/sbin/utadm:
      # get the intf's symbolic name
      INTF_NAME=`getent hosts ${INTF_IPA} | awk '{print $2}'`;
      ncampbell@naaman:~/SunRay$ sudo vi /opt/SUNWut/sbin/utadm
        # get the intf's symbolic name
        INTF_NAME=`getent hosts | grep -w ${INTF_IPA} | awk '{print $2}'`;

Install the SunRay LAN Interconnect (it is handy to have a filled-out Worksheet from the SRSS Install Guide for this step):

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utadm -A
  Selected values for subnetwork ""
    net mask: 
    no IP addresses offered
    auth server list:
    firmware server:
  Accept as is? ([Y]/N):  N
  new netmask: []
        You have specified a netmask different than the class
        based netmask for this subnet.
        Do you want to keep this netmask?  ([Y]/N):  Y
  Do you want to offer IP addresses for this subnet? (Y/[N]):  Y
  new first Sun Ray address: []
  number of Sun Ray addresses to allocate: [70] 15
  auth server list:
To read auth server list from file, enter file name:
Auth server IP address (enter <CR> to end list):
If no server in the auth server list responds,
should an auth server be located by broadcasting on the network? ([Y]/N):  N
  new firmware server: [ ]
  new router: []
  Selected values for subnetwork ""
    net mask: 
    first unit address:
    last unit address:
    auth server list:
    firmware server:
  Accept as is? ([Y]/N):  Y
### successfully setup "/etc/opt/SUNWut/net/netmasks" file
Error: host name for not found
### Error: unable to start dhcp services.
    Please restart dhcp manually after utadm has completed.

Installing the SRSS LAN Interconnect does not turn on LAN connections on Ubuntu and is enabled by the following:

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utadm -L on
ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utrestart

SRSS Administration Setup

Setup SRSS Administration and allow remote connections:

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utconfig

Configuration of Sun Ray server Software

This script automates the configuration of the Sun Ray server software
and related software products.  Before proceeding, you should have read
the Sun Ray server 3.1 Installation Guide and filled out the Configuration
Worksheet.  This script will prompt you for the values you filled out on
the Worksheet.  For your convenience, default values (where applicable)
are shown in brackets.

Continue ([y]/n)?
Enter Sun Ray admin password:
Re-enter Sun Ray admin password:

Configure Sun Ray Web Administration? ([y]/n)?

Warning: Apache is not installed on this system.
Configuration parameters will be stored in the file
/etc/opt/SUNWut/http/apache.conf.  Please refer to the Installation Guide to
complete configuration of Apache.
Enter port number [1660]:
Enter CGI username [utwww]:
Enable remote server administration? (y/[n])? y

Configure Controlled Access Mode? (y/[n])?

Configure this server for a failover group? (y/[n])?

About to configure the following software products:

Sun Ray Data Store 2.1
    Hostname: naaman
    Sun Ray root entry: o=utdata
    Sun Ray root name: utdata
    Sun Ray utdata admin password: (not shown)
    SRDS 'rootdn': cn=admin,o=utdata

Apache Web Server Not installed
    Apache Web Server port number: 1660
    Remote server administration: yes
    CGI username: utwww

Sun Ray server 3.1
    Failover group: no
    Controlled Access Mode: no

Continue ([y]/n)?

Updating Sun Ray Data Store schema ...

Updating Sun Ray Data Store ACL's ...

Creating Sun Ray Data Store Datastore ...

Restarting Sun Ray Data Store ...
Starting Sun Ray Data Store daemon .
Thu Nov 10 13:33 : utdsd starting

Loading Sun Ray Data Store ...

Executing '/usr/bin/ldapadd -h naaman -x -p 7012 -D cn=admin,o=utdata' ...
adding new entry "o=utdata"

adding new entry "o=v1,o=utdata"

adding new entry "utname=naaman,o=v1,o=utdata"

adding new entry "utname=desktops,utname=naaman,o=v1,o=utdata"

adding new entry "utname=users,utname=naaman,o=v1,o=utdata"

adding new entry "utname=logicalTokens,utname=naaman,o=v1,o=utdata"

adding new entry "utname=rawTokens,utname=naaman,o=v1,o=utdata"

adding new entry "utname=multihead,utname=naaman,o=v1,o=utdata"

adding new entry "utname=container,utname=naaman,o=v1,o=utdata"

adding new entry "utname=properties,utname=naaman,o=v1,o=utdata"

adding new entry "cn=utadmin,utname=naaman,o=v1,o=utdata"

adding new entry "utname=smartCards,utname=naaman,o=v1,o=utdata"

adding new entry "utordername=probeorder,utname=smartCards,utname=naaman,o=v1,o=utdata"

adding new entry "utname=policy,utname=naaman,o=v1,o=utdata"

adding new entry "utname=resDefs,utname=naaman,o=v1,o=utdata"

adding new entry "utname=prefs,utname=naaman,o=v1,o=utdata"

adding new entry "utPrefType=resolution,utname=prefs,utname=naaman,o=v1,o=utdata"

adding new entry "utPrefClass=advisory,utPrefType=resolution,utname=prefs,utname=naaman,o=v1,o=utdata"

Added 18 new LDAP entries.

Creating Sun Ray server Configuration ...
Adding user account for 'utwww' (ut admin web server cgi user) ...

The Admin GUI has not been configured.
Your parameters have been stored in a
temporary file.
no crontab for root

Unique "/etc/opt/SUNWut/gmSignature" has been generated.

Restarting Sun Ray Data Store ...
Stopping Sun Ray Data Store daemon
.Sun Ray Data Store daemon stopped
Starting Sun Ray Data Store daemon .
Thu Nov 10 13:33 : utdsd starting
Adding user admin ...
User(s) added successfully!

The current policy has been modified.  You must restart the
authentication manager to activate the changes.

Configuration of Sun Ray server has completed.  Please check
the log file, /var/log/SUNWut/utconfig.2005_11_10_13:24:57.log, for errors.

If the SunRay server is not being used to serve web pages, save the following httpd.conf into the /etc/apache directory: httpd.conf

Restart the apache server after changes to the configurations:

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/apache restart

Start SunRay Service

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init start

Test the SRSS Administration setup by viewing http://localhost:1660 in a browser.

DHCP Server Configuration

Adjust dhcpd.conf.example to suit network configuration:

ncampbell@naaman:~/SunRay$ vi dhcpd.conf.example

# Example SunRay dhcpd.conf
# IP of SunRay server:
# IP-Range for SunRays:
# SunRay firmware version: 3.0_51,REV=2004.

#Sun Ray
option space SunRay;
option SunRay.AuthSrvr  code 21 = ip-address;
option SunRay.AuthSrvr;
option SunRay.FWSrvr    code 31 = ip-address;
option SunRay.FWSrvr;
option SunRay.NewTVer   code 23 = text;
option SunRay.NewTVer   "3.0_51,REV=2004.";
option SunRay.Intf      code 33 = text;
option SunRay.Intf      "eth2";
option SunRay.LogHost   code 24 = ip-address;
option SunRay.LogHost;
option SunRay.LogKern   code 25 = integer 8;
option SunRay.LogKern   6;
option SunRay.LogNet    code 26 = integer 8;
option SunRay.LogNet    6;
option SunRay.LogUSB    code 27 = integer 8;
option SunRay.LogUSB    6;
option SunRay.LogVid    code 28 = integer 8;
option SunRay.LogVid    6;
option SunRay.LogAppl   code 29 = integer 8;
option SunRay.LogAppl   6;

        vendor-option-space SunRay;
        subnet netmask {
                default-lease-time 720000;
                max-lease-time 1440000;
                option routers;

Replace current dhcpd configuration file with SunRay-customised file and restart the dhcpd service:

ncampbell@naaman:~/SunRay$ sudo cp dhcpd.conf.example /etc/dhcp3/dhcpd.conf
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/dhcp3-server restart

TFTP Server Configuration

SRSS needs the /tftpboot directory to exist to store and serve SunRay firmware images:

ncampbell@naaman:~/SunRay$ sudo mkdir /tftpboot

It is reported that IPv6 causes problems with serving SunRay firmware images and can be disabled by commenting out all IPv6 entries in /etc/hosts and creating the /etc/modprobe.d/bad_list file:

ncampbell@naaman:~/SunRay$ sudo sed -i -e '/ip6/s/^/#/g' /etc/hosts
ncampbell@naaman:~/SunRay$ sudo vi /etc/modprobe.d/bad_list

  alias net-pf-10 off

Load the firmware images into the /tftpboot directory:

ncampbell@naaman:~/SunRay$ sudo /opt/SUNWut/sbin/utfwadm -A -a -N

The current firmware version was printed in the output of the above command and needs to be included into the DHCP configuration file to update the firmware version numbering:

ncampbell@naaman:~/SunRay$ sudo sed -i -e 's/3\.0_51\,REV\=2004\.11\.10\.16\.18/3.1_32,REV=2005.' /etc/dhcp3/dhcpd.conf
ncampbell@naaman:~/SunRay$ grep REV /etc/dhcp3/dhcpd.conf
# SunRay firmware version: 3.1_32,REV=2005.
option SunRay.NewTVer   "3.1_32,REV=2005.";
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/dhcp3-server restart

XF86 Compatibility

Because Ubuntu uses x.org instead of X11, the following workaround is required:

ncampbell@naaman:~/SunRay$ sudo ln -s /etc/X11/xorg.conf /etc/X11/XF86Config

SunRay Variables

To get SunRay variables added to the user's environment on login, add the 10SUNWut script into the Xsession directory:

ncampbell@naaman:~/SunRay$ sudo cp 10SUNWut /etc/X11/Xsession.d/.

GDM Setup

Preparing gdm for use with SunRay on Linux requires alteration of the default environment.

By default, the SRSS packages for Linux include a gdm package, which is not installed when following this guide. The SRSS gdm package installs the gdm binary as gdm-binary instead of gdm and SRSS refers to the gdm-binary executable within scripts and possibly SRSS binaries. The following steps are a workaround to accommodate the differences between SRSS gdm and Ubuntu gdm:

ncampbell@naaman:~/SunRay$ sudo ln -s /usr/sbin/gdm /usr/sbin/gdm-binary
ncampbell@naaman:~/SunRay$ sudo vi /etc/init.d/gdm


  start-stop-daemon --start --quiet --pidfile $PIDFILE --name gdm-binary $SSD_ARG >/dev/null 2>&1 || log_end_msg 1

  start-stop-daemon --stop  --quiet --pidfile $PIDFILE --name gdm-binary $SSD_ARG --retry 30 >/dev/null 2>&1 || \

ncampbell@naaman:~/SunRay$ sudo vi /etc/X11/default-display-manager


ncampbell@naaman:~/SunRay$ sudo vi /opt/SUNWut/lib/xmgr/gdm/reset-dpy

  dpys=`/usr/bin/gdmdynamic -l | tr ";" "\012" | sed -e "s/:\(.*\),.*,.*/\1/" | tr "\012" " "`

Save the SunRay-customised gdm.conf - gdm.conf in the SunRay directory and install into /etc/gdm:

ncampbell@naaman:~/SunRay$ sudo cp /etc/gdm/gdm.conf /etc/gdm/gdm.conf.preSunRay
ncampbell@naaman:~/SunRay$ sudo cp gdm.conf /etc/gdm/.

Thanks to Michael Gernoth & Thomas Glanzmann for supplying the gdm.conf file.

Restart gdm and SRSS:

ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init stop
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/gdm stop
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/gdm start
ncampbell@naaman:~/SunRay$ sudo /etc/init.d/zsunray-init start

An additional configuration step is to disable users from saving gnome-sessions. When a user has a saved gnome-session and logs out within 10 seconds of logging in, the gdm session does not restart properly and is left in an unstable state. Once a user goes into the unstable state, all other users will go into the same state upon logging out. The only way to rectify the issue is to reboot the server as the /etc/init.d/zsunray-init script cannot stop the SunRay services.

To prevent users from saving gnome-sessions, remove the System -> Preferences -> Sessions menu and disable the logout prompt. Follow the steps below to remove the Sessions menu:

ncampbell@naaman:~$ sudo mkdir /usr/share/applications/disabledapps
ncampbell@naaman:~$ sudo mv /usr/share/applications/session-properties.desktop /usr/share/applications/disabledapps/.
ncampbell@naaman:~$ sudo sed -i -e '/NoDisplay/d' /usr/share/applications/disabledapps/session-properties.desktop
ncampbell@naaman:~$ echo "NoDisplay=true" | sudo tee -a /usr/share/applications/disabledapps/session-properties.desktop

Further information on removing menu items is available in the CorporateUbuntu wiki - GNOME Menu.

To disable the logout prompt which allows users to save the current session, the following gconftool-2 command will need to be executed when no users are logged in:

ncampbell@naaman:~$ sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-session/options/logout_option false

Smartcard Configuration

* bug submitted - see below

When a smartcard is inserted into a SunRay displaying the login screen, the session that is running on the SunRay goes into the Disconnected Idle state. Sessions, by default, remain in an idle state for 900 seconds before the /opt/SUNWut/lib/Xcleanup script is called. The Xcleanup script makes calls to scripts in the /opt/SUNWut/lib/xmgr/gdm directory which in turn call the gdmdynamic command to perform further cleaning up.

It appears that the gdmdynamic command inadequately cleans up sessions and therefore leaves "cleaned-up" sessions in a bad state. To avoid the "zombie" session scenario, Xcleanup can be replaced with a blank file to avoid using the cleanup feature of gdmdynamic:

ncampbell@naaman:~/SunRay$ sudo mv /opt/SUNWut/lib/Xcleanup /opt/SUNWut/lib/Xcleanup.old
ncampbell@naaman:~/SunRay$ sudo touch /opt/SUNWut/lib/Xcleanup
ncampbell@naaman:~/SunRay$ sudo chmod 755 /opt/SUNWut/lib/Xcleanup

SunRay Settings Menu

To allow users to change SunRay-specific audio, display and video settings, save the following .desktop file - sunray-settings.desktop - and copy it into the /usr/share/applications directory for the SunRay Settings menu to be available under Applications -> Sound & Video:

ncampbell@naaman:~/SunRay$ sudo cp sunray-settings.desktop /usr/share/applications/.

Audio Configuration

The SunRay audio device files need to be compiled to run on a 2.6 kernel.

ncampbell@naaman:~/SunRay$ cd /usr/src/SUNWut
ncampbell@naaman:/usr/src/SUNWut$ sudo tar zxvf ~/SunRay/makefiles-2.6.tar.gz
ncampbell@naaman:/usr/src/SUNWut$ sudo patch -p0 < ~/SunRay/SUNWut-modules-2.6.patch
ncampbell@naaman:/usr/src/SUNWut$ sudo make -C /usr/src/SUNWut/utadem all
ncampbell@naaman:/usr/src/SUNWut$ sudo make -C /usr/src/SUNWut/utio all
ncampbell@naaman:/usr/src/SUNWut$ sudo mkdir -p /lib/modules/`uname -r`/misc
ncampbell@naaman:/usr/src/SUNWut$ sudo cp /usr/src/SUNWut/ut{adem,io}/*.ko /lib/modules/`uname -r`/misc/.
ncampbell@naaman:/usr/src/SUNWut$ sudo depmod -a
ncampbell@naaman:/usr/src/SUNWut$ sudo sed -i -e 's/utadem\.o/utadem.ko/g' -e 's/utio\.o/utio.ko/g' /etc/init.d/utsyscfg

The SunRay X properties script does not account for xprop being located in /usr/bin. Change the following line in /etc/opt/SUNWut/basedir/lib/utxprop:

for XPATH in /usr/openwin/bin /usr/X11R6/bin /usr/X11/bin ; do

ncampbell@naaman:/usr/src/SUNWut$ cd ~/SunRay
ncampbell@naaman:~/SunRay$ sudo vi /etc/opt/SUNWut/basedir/lib/utxprop

  for XPATH in /usr/openwin/bin /usr/X11R6/bin /usr/X11/bin /usr/bin; do

Ubuntu comes with libesd-alsa0 by default, however this library is not compatible with the SunRay audio setup. Replace libesd-alsa0 with libesd0:

ncampbell@naaman:~/SunRay$ sudo apt-get install libesd0
ncampbell@naaman:~/SunRay$ sudo ln -s /usr/lib/libesd.so.0 /usr/lib/libesd.so.1

Note: removing the ubuntu-desktop package will leave everything intact as part of this process, it is a meta-package

In order for users to use the correct esd socket upon login and have read access to the relevant audio devices, the zsunray-init script needs to be edited and a "wrapper" script for gnome-session needs to be setup.

Add the following under this line in /etc/init.d/zsunray-init:

[ ! -f /bin/basename ] && ln -s /usr/bin/basename /bin/basename

ncampbell@naaman:~/SunRay$ sudo vi /etc/init.d/zsunray-init

# create the .esd directory to hold the socket files
if [ ! -d /tmp/.esd ]; then
  mkdir /tmp/.esd
# set the sticky bit on the .esd directory
chmod 1777 /tmp/.esd
# allow all users to read the dsp and mixer devices
chmod 666 /dev/dsp /dev/mixer

Perform the following to establish the gnome-session-sunray wrapper script:

ncampbell@naaman:~/SunRay$ sudo rm /etc/alternatives/x-session-manager
ncampbell@naaman:~/SunRay$ sudo ln -s /usr/bin/gnome-session-sunray /etc/alternatives/x-session-manager
ncampbell@naaman:~/SunRay$ sudo vi /usr/bin/gnome-session-sunray

  # gnome-session-sunray - establishes
  #                        GNOME user
  #                        environment for
  #                        SunRay users
  # Written: Naaman Campbell
  #          28 October 2005

  # setup sound daemon for current user
  if [ "$SUN_SUNRAY_TOKEN" ]; then
    pkill -U $USER esd
    /usr/bin/esd -d $AUDIODEV -nobeeps -terminate &

  exec /usr/bin/gnome-session "$@"

ncampbell@naaman:~/SunRay$ sudo chmod 755 /usr/bin/gnome-session-sunray

The gnome-session-sunray script is also available for download - gnome-session-sunray

The last step is to customise the user environment options for sound. A suggested setup is to remove the Volume Control applet from the system tray, turn on the esd sound server and turn off event sounds. The following gconftool-2 commands are to be performed (according to GNOME documentation) whilst no users are logged into GNOME:

ncampbell@naaman:~$ sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type list --set /apps/panel/general/applet_id_list --list-type string "[trashapplet_screen0,workspace_switcher_screen0,window_list_screen0,show_desktop_button_screen0,notification_area_screen0,clock_screen0]"
ncampbell@naaman:~$ sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /desktop/gnome/sound/enable_esd true
ncampbell@naaman:~$ sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /desktop/gnome/sound/event_sounds false

End Of Configuration Reboot

To ensure that the SunRay configuration will work following a power failure/reboot/etc.., it is recommended to reboot the server as a final configuration step.

Issues Being Investigated

  • BugID 326796 - gdmdynamic fails to remove a dynamically created display correctly when using the command /usr/bin/gdmdynamic -b -d $DISPLAY and causes gdm to not display the gdmgreeter screen

    • FIXED - fix released in upcoming Dapper release
  • BugID 6742 - The apache package needs to be installed twice.

  • BugID 28585 - getent hosts does not return entry

Document To-Do List

  • Submit bugs on current issues
  • Provide an unannotated, script-like version of this document at UbuntuOnSunRaySimple

CorporateUbuntu Compatibility Issues

  • perform the CorporateUbuntu steps prior to the UbuntuOnSunRay steps

  • problems may arise if the ssh and dhcpd3 packages are installed after setting up LDAP authentication
    • as a workaround, install the packages prior to setting up LDAP authentication
  • combine the /usr/bin/gnome-session-wrapper and /usr/bin/gnome-session-sunray scripts as /usr/bin/gnome-session-wrapper
    • essentially, these scripts perform the same function

Using This Guide With SRSS 3.1.1 And Dapper Drake

  • Small Contribution by Jose Molina based on my own installation experience...

This is only intended as a reference. I was following this guide without knowing if it would work at all with the new releases, and I think I would have appreciated any info about it. So, these are the changes:


The zipfile for the SRSS 3.1.1 version can be found at (also requires login): http://www.sun.com/download/products.xml?id=451dd631

Conversion and Installation

In SRSS 3.1.1 this would be the correct package directories:

unzip srss_3.1.1.zip
mkdir srsspkgs
cd srsspkgs
for i in ../srss_3.1.1/Sun_Ray_Core_Services_3.1.1/Linux/Packages/* ../srss_3.1.1/Sun_Ray_Data_Store_2.2/Linux/Packages/* ../srss_3.1.1/GDM_2.* ../srss_3.1.1/Docs/Linux/Packages/*; do
  fakeroot alien -d $i

Patch SUNWut Package

Since in SRSS 3.1.1 the scripts have changed, you will new this patch instead: http://wwwcip.informatik.uni-erlangen.de/~simigern/sunray-debian/files/sray311fcs-debian.patch.2007-02-02

Use it the same way as the other:

cd / && sudo patch -p0 </path/to/sray311fcs-debian.patch.2007-02-02
cd ~/SunRay

SRSS Administration Setup

Before starting utconfig you'll need to soft link two libraries that have changed in Dapper:

sudo ln -s /usr/lib/libldap.so.2 /usr/lib/libldap.so.199
sudo ln -s /usr/lib/liblber.so.2 /usr/lib/liblber.so.199

TFTP Server Configuration

This is already in the guide anyway but: Remember to check the firmware version and modify dhcp3.conf acordingly!!

GDM Setup

This setup didn't work for me. As suggested in the mailing list, I followed these instructions for debian:


I dind't install the patched gdm debian package, I'm using dapper's default GDM package instead.

  • Download xmgr-gdm.tar

wget -O xmgr-gdm.tar "https://steinbachs.org/download/attachments/52/xmgr-gdm.tar?version=1"
  • Extract xmgr-gdm.tar to a temporary directory. Make a backup of /opt/SUNWut/lib/xmgr/gdm and replace it with the gdm directory in his tarball.
  • The gdm-custom.conf in that guide is for debian themes. Here is a modified version using Ubuntu Human:


  • Copy gdm.conf-custom to /etc/gdm. This will override the necessary settings in the stock gdm.conf (Note: the above attachment is gdm-custom.conf and it should be named gdm.conf-custom)
  • Make sure the /etc/opt/SUNWut/xmgr symlink points to /opt/SUNWut/lib/xmgr/gdm
  • Start gdm via /etc/init.d/gdm and restart Sun Ray services via /etc/init.d/zsunray-init

UbuntuOnSunRay (last edited 2009-07-31 20:00:13 by enhickman)