SRSS 4.1 on Ubuntu Server (i386 and amd64)
From Sun Ray User Group Wiki
SRSS on Ubuntu/Linux
The following instructions are a quick HOWTO which explains how to install the Sunray Server Software (SRSS4.1) on an Ubuntu machine. It is largely based on the howtos for Debian and Gentoo. Despite the other howtos it also concentrates on explaining the bits and bytes for installing SRSS4.1 for a 64bit server system because SRSS comes unfortunately only with 32bit tools and thus requires some additional considerations.
Requirements
This HOWTO is based on the following requirements: It has been tested on an Ubuntu 8.10 and 9.04 server system with an uptodate intrepid installation.
Installation of SRSS (SunRay Server Software)
(1) Install of required packages
sudo apt-get install libldap-2.4-2 libmotif3 module-assistant tk8.4 tomcat5.5 sun-java6-jre \
ldap-utils dhcp3-server nscd gawk iputils-ping pdksh unzip alien libgdbm3 \
libx11-6 libfreetype6 libsasl2-2 libxt6 zlib1g gdm devscripts xkb-data-legacy \
xfonts-base atftpd xfonts-100dpi xfonts-75dpi xfonts-cyrillic wget ed
(2) Download and Unzip SRSS package
cd /tmp .... (download of SRSS 4.1 package from sun.com -- see [1]) unzip srss_4.1_linux.zip
(3) Convert all .rpm packages to .deb packages
on i386 (32bit):
sudo find srss_4.1 -name "SUNW*i386.rpm" -exec alien -d {} \;
on amd64 (64bit):
sudo find srss_4.1 -name "SUNW*.rpm" -exec alien -d -g {} \;
sudo find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
sudo find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
(4) install of generated .deb packages
sudo find . -name "sunw*deb" -exec dpkg -i {} \;
(5) apply patches to installation
wget -O /tmp/Patch-SUNWut41-1.txt http://wiki.sun-rays.org/images/6/67/Patch-SUNWut41-1.txt wget -O /tmp/Patch-SUNWutref.txt http://wiki.sun-rays.org/images/1/15/Patch-SUNWutref.txt wget -O /tmp/Patch-SUNWkio.txt http://wiki.sun-rays.org/images/f/ff/Patch-SUNWkio.txt cd /opt sudo patch -p0 </tmp/Patch-SUNWut41-1.txt sudo patch -p0 </tmp/Patch-SUNWutref.txt sudo patch -p0 </tmp/Patch-SUNWkio.txt
(6) init.d startup-script installation
sudo wget -O /etc/init.d/zsunray-init http://wiki.sun-rays.org/images/3/33/Zsunray-init41.sh sudo chmod 755 /etc/init.d/zsunray-init sudo update-rc.d zsunray-init defaults 99 01
(7) more preparations on installation
sudo ln -s /usr/lib/jvm/java-6-sun/jre /etc/opt/SUNWut sudo mkdir -p /var/dt sudo rm -f /etc/opt/SUNWut/gmSignature sudo touch /etc/opt/SUNWut/gmSignature sudo chmod 644 /etc/opt/SUNWut/gmSignature
(8) link the global xkb settings into SRSS
sudo mv /opt/SUNWut/lib/xkb /opt/SUNWut/lib/xkb.bak sudo ln -s /usr/share/X11/xkb /opt/SUNWut/lib sudo cp -a /opt/SUNWut/lib/xkb.bak/xkbtable.map /opt/SUNWut/lib/xkb/ sudo ln -s /var/lib/xkb /opt/SUNWut/lib/xkb/compiled sudo ln -s /usr/bin/xkbcomp /opt/SUNWut/lib/xkb/xkbcomp
(9) start utsyscfg to let it create some links for you (ignore any warnings)
sudo /etc/init.d/utsyscfg start sudo /etc/init.d/utsyscfg stop
(10) replace the $PLATFORM variables with the one utsyscfg created in /etc/opt/SUNWut/lib/
for i386 (32bit):
sudo sed -i -e 's/\$PLATFORM/i686/' /etc/opt/SUNWut/xinitrc.d/0100.SUNWut sudo sed -i -e 's/\$PLATFORM/i686/' /etc/pam.d/gdm
for amd64 (64bit):
sudo sed -i -e 's/\$PLATFORM/x86_64/' /etc/opt/SUNWut/xinitrc.d/0100.SUNWut sudo sed -i -e 's/\$PLATFORM/x86_64/' /etc/pam.d/gdm
(11) modify /etc/pam.d/gdm
- move all @include statements in /etc/pam.d/gdm to the bottom
- comment out all pam entries referring to pam_sunray_hotdesk.so as Hotdesking seems to be currently broken
(12) modify /etc/gdm/gdm.conf
- make sure that your gdm.conf contains the following things in [daemon]:
VTAllocation=false DynamicXServers=true Greeter=/usr/lib/gdm/gdmgreeter RebootCommand= HaltCommand= XKeepsCrashing=/etc/opt/SUNWut/gdm/XKeepsCrashing.sunray
- if unsure you can try to use this version instead:
wget -O /etc/gdm/gdm.conf http://wiki.sun-rays.org/images/0/05/Gdm41.txt
(13) link /etc/gdm/custom.conf
sudo ln -sf /etc/gdm/gdm.conf /etc/gdm/custom.conf
(14) empty dhcpd.conf if you haven't used dhcp yet
sudo mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.sample sudo touch /etc/dhcp3/dhcpd.conf
(15) link libutdev.so.1 into /usr/lib to have USB mounting working properly
sudo ln -s /opt/SUNWut/lib/libutdev.so.1 /usr/lib/ sudo ldconfig
(16) on 64bit systems (e.g. amd64) you have to perform some manual modifications
- install the i32-libs to get the 32bit SRSS binaries running:
sudo apt-get install ia32-libs sudo apt-get install ia32-sun-java6-bin sudo ln -sf /usr/lib/jvm/ia32-java-6-sun/jre /etc/opt/SUNWut
- as not all required 32bit libraries exist as ia32 packages we go and extract them from ubuntu 8.10 (i386) deb packages:
cd /tmp sudo wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/main/g/gdbm/libgdbm3_1.8.3-3_i386.deb sudo wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/multiverse/o/openmotif/libmotif3_2.2.3-2_i386.deb sudo wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/main/libx/libxfont/libxfont1_1.3.3-1ubuntu1_i386.deb sudo wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/main/libf/libfontenc/libfontenc1_1.0.4-3_i386.deb sudo wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/universe/g/glib1.2/libglib1.2ldbl_1.2.10-19build1_i386.deb sudo alien --to-tgz lib*.deb sudo find . -name "lib*.tgz" -exec tar xzf {} \; sudo cp -a usr/lib/libgdbm.so.3* /opt/SUNWut/lib/ sudo cp -a usr/lib/libXm.so.3* /opt/SUNWut/lib/ sudo cp -a usr/lib/libXfont.so.1* /opt/SUNWut/lib/ sudo cp -a usr/lib/libfontenc.so.1* /opt/SUNWut/lib/ sudo cp -a usr/lib/libglib-1.2.so.0* /opt/SUNWut/lib/ cd /usr/lib32 sudo ln -s /opt/SUNWut/lib/libXm.so.3 sudo ln -s /opt/SUNWut/lib/libgdbm.so.3
- manually modify /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl to have the following LIB statements in the local_variables() function:
LIBGDBM=/usr/lib32/libgdbm.so.3 LIBGDBM64=/usr/lib64/libgdbm.so.3 COMPATLIB_LIBGDBM=/usr/lib32/libgdbm.so.2 COMPATLIB_LIBGDBM64=/usr/lib64/libgdbm.so.2 LIBLDAP=/usr/lib32/libldap.so.199 LIBLDAP64=/usr/lib64/libldap.so.199 COMPATLIB_LIBLDAP=/usr/lib32/libldap-2.4.so.2 COMPATLIB_LIBLDAP64=/usr/lib64/libldap-2.4.so.2 LIBLBER=/usr/lib32/liblber.so.199 LIBLBER64=/usr/lib64/liblber.so.199 COMPATLIB_LIBLBER=/usr/lib32/liblber-2.4.so.2 COMPATLIB_LIBLBER64=/usr/lib64/liblber-2.4.so.2
- regenerate the compatlinks of SRSS
sudo ldconfig sudo /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable sudo ldconfig
(17) if doing a clean new install, go and configure SRSS
sudo /opt/SUNWut/sbin/utadm -A <subnet> sudo /opt/SUNWut/sbin/utconfig
- if asked during utconfig make sure to answer /usr/share/tomcat5.5 for the tomcat path:
Configure Sun Ray Web Administration? ([y]/n)? y Enter Apache Tomcat installation directory [/opt/apache-tomcat]: /usr/share/tomcat5.5 Enter HTTP port number [1660]: 1660 Enable secure connections? ([y]/n)? y Enter HTTPS port number [1661]: 1661 Enter Tomcat process username [utwww]: utwww Enable remote server administration? (y/[n])? y Configure Sun Ray Kiosk Mode? (y/[n])? n Configure this server for a failover group? (y/[n])? n
(18) check dhcpd.conf (if you want DHCP)
- make sure that /etc/dhcp3/dhcpd.conf contains the include statements for your added subnet/interface
(19) patch and build the required kernel modules
- make sure to prepare for kernel module buiding:
sudo m-a -t prepare
- then download and apply the patches
wget -O /tmp/utadem.patch http://wiki.sun-rays.org/images/0/0c/Utadem-4.1-50.nww.patch.txt wget -O /tmp/utio.patch http://wiki.sun-rays.org/images/5/5d/Utio-4.1-50.nww.patch.txt wget -O /tmp/utdisk.patch http://wiki.sun-rays.org/images/e/e0/Utdisk-4.1-50.nww.patch.txt cd /usr/src/SUNWut sudo patch -p0 </tmp/utadem.patch sudo patch -p0 </tmp/utio.patch sudo patch -p0 </tmp/utdisk.patch
- then compile the kernel modules
sudo make -C /usr/src/SUNWut/utadem clean default install sudo make -C /usr/src/SUNWut/utio clean default install sudo make -C /usr/src/SUNWut/utdisk clean default install sudo depmod -a
(20) add an Xsession.d job for SRSS setup on Xnewt start
sudo wget -O /etc/X11/Xsession.d/10SUNWut http://wiki.sun-rays.org/images/d/d5/10SUNWut.41b.sh
(21) check that /etc/X11/xorg.conf contains correct FontPath statements
Section "Files"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection
(22) globally enable the XKB extension for all sessions
sudo /opt/SUNWut/bin/utxconfig -a -k on
(23) install and setup pulseaudio for audio support
- install of required packages
sudo apt-get install pavucontrol pavumeter paman padevchooser paprefs pulseaudio \
pulseaudio-utils pulseaudio-module-gconf pulseaudio-module-hal \
pulseaudio-module-x11 libasound2-plugins gstreamer0.10-pulseaudio \
ubuntu-sounds pulseaudio-esound-compat alsaplayer-alsa
- creation of global utpulse.pa file in /opt/SUNWut/lib with the following content
load-module module-oss device=UTAUDIODEV playback=1 record=1 fragment_size=8192 load-module module-native-protocol-unix
- creation of pulseaudio setup script 66SUNW-pulseaudio in /etc/X11/Xsession.d with the following content:
set +e
pkill -U $USER esd
pkill -U $USER pulseaudio
set -e
unset LD_PRELOAD
if [ ! -d ${HOME}/.pulse ] ; then
mkdir ${HOME}/.pulse
fi
# create pulseaudio configuration for utaudio
PULSECONF=${HOME}/.pulse/default.pa
sed "s|UTAUDIODEV|$UTAUDIODEV|g" /opt/SUNWut/lib/utpulse.pa > ${PULSECONF}
# create asoundrc for pulseaudio redirection
ASOUNDRC=${HOME}/.asoundrc
echo -n > ${ASOUNDRC}
echo "pcm.!default { " >> ${ASOUNDRC}
echo " type pulse" >> ${ASOUNDRC}
echo "}" >> ${ASOUNDRC}
echo "ctl.!default { " >> ${ASOUNDRC}
echo " type pulse" >> ${ASOUNDRC}
echo "}" >> ${ASOUNDRC}
(24) link tftpd server directory
sudo ln -s /tftpboot /var/lib
(25) manually fix the Xsetup file
It seems that the /etc/opt/SUNWut/gdm/SunRayInit/helpers/Xsetup in SRSS 4.1 contains a minor, but important bug which prevents commands like 'utwho' and 'utfwload' from working properly on some Linux distros. To fix this script you have to manually edit it and make sure that the very first like contain the exclamation mark (!) as shown here:
#!/bin/ksh -p
(26) manually fix the finishsession file
It seems that the /opt/SUNWkio/lib/finishsession file in SRSS 4.1 contains a minor bug which prevents the POST-execution scripts from being executed. To fix this script you have to manually edit it and make sure that the line with the if check for "$theSessionUserDynDir" actually contains the "$" sign.
if [ -d "$theSessionUserDynDir" ]
(27) finally you can start the SRSS by issuing the following commands
sudo /etc/init.d/gdm restart sudo /etc/init.d/zsunray-init stop sudo /etc/init.d/zsunray-init start
Installation SRWC (Windows Connector)
The SRSS comes with a SunRay Windows connector package (srwc_X.X) which allows to connect to windows machines via RDP. This short explaination should show how to install it under Ubuntu as well.
(1) Download and Unzip SRWC package
cd /tmp .... (download the SRWC from the same URL than the SRSS package) unzip srwc_2.1_linux.zip
(2) Convert all .rpm packages to .deb packages
on i386 (32bit):
sudo find srwc_2.1 -name "SUNW*i386.rpm" -exec alien -d {} \;
on amd64 (64bit):
sudo find srwc_2.1 -name "SUNW*.rpm" -exec alien -d -g {} \;
sudo find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
sudo find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
(3) install of generated .deb packages
sudo find . -name "sunw*deb" -exec dpkg -i {} \;
(4) retrieve/install libcrypto.so.0.9.7
To have the uttsc tool working properly you require an older openssl library (0.9.7) installed. In addition, if you are on a 64bit system you even require a 32bit version of this library. So go and perform the following operations:
wget http://www.ftp.uni-erlangen.de/pub/mirrors/ubuntu/pool/universe/o/openssl097/libssl0.9.7_0.9.7g-5ubuntu1.1_i386.deb sudo alien --to-tgz libssl0.9.7_0.9.7g-5ubuntu1.1_i386.deb tar xvzf libssl0.9.7-0.9.7g.tgz sudo cp -a usr/lib/libcrypto.so.0.9.7 /opt/SUNWut/lib/
(5) execute uttscadm to configure the installation
sudo /opt/SUNWuttsc/sbin/uttscadm -c
NOTE: if you are asked for the libcrypto.so location enter /opt/SUNWut/lib/libcrypto.so.0.9.7
Update Installation
As SUN is releasing updates to the SRSS packages via their own update process we have to manually install certain updates. The process of bringing the SRSS 4.1 suite to the very latest version ought to be listed here.
Update 139550-02 and 139727-01
- retrieve/unpack the patch updates:
cd /tmp .... (download the patch update for the core package from [2]) .... (download the uttsc update package from [3] unzip 139550-02.zip unzip 139727-01.zip
- convert the .rpm to .deb packages
on i386 (32bit):
sudo find 139550-02 139727-01 -name "SUNW*i386.rpm" -exec alien -d {} \;
on amd64 (64bit):
sudo find 139550-02 139727-01 -name "SUNW*.rpm" -exec alien -d -g {} \;
sudo find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
sudo find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
- install the update
sudo find . -name "sunw*deb" -exec dpkg -i {} \;
- apply the following patches to finalize the update
wget -O /tmp/Patch-patch.txt http://wiki.sun-rays.org/images/6/6f/Patch-patch-139550-02.txt wget -O /tmp/Patch-SUNWutref.txt http://wiki.sun-rays.org/images/1/15/Patch-SUNWutref.txt cd /opt/ sudo patch -p0 </tmp/Patch-SUNWutref.txt sudo patch -p0 </tmp/Patch-patch.txt
- if you are on a 64bit system make sure to reapply the above mentioned patch (see (16)) to /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl again then run "/opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable" again
- make sure the patch in (25) and (26) are reapplied as the update might have overwritten it again.
- restart the SRSS with
sudo /etc/init.d/zsunray-init stop sudo /etc/init.d/zsunray-init start
- update the firmware in /tftpboot
sudo /opt/SUNWut/sbin/utfwadm -A -a -N all
or for GUI firmware:
sudo /opt/SUNWut/sbin/utfwadm -A -a -N all -f /opt/SUNWut/lib/firmware_gui
Update 139550-01
- retrieve/unpack the patch update:
cd /tmp .... (download the patch update from [4]) unzip 139550-01.zip
- convert the .rpm to .deb packages
on i386 (32bit):
sudo find 139550-01 -name "SUNW*i386.rpm" -exec alien -d {} \;
on amd64 (64bit):
sudo find 139550-01 -name "SUNW*.rpm" -exec alien -d -g {} \;
sudo find SUNW*-* -name control -exec sed -i "s/i386/amd64/g" {} \;
sudo find SUNW*-*/ -maxdepth 0 -name "SUNW*-?.?" -exec sh -c "cd {} ; debian/rules binary-arch" \;
- install the update
sudo find . -name "sunw*deb" -exec dpkg -i {} \;
- apply patches to finalize the update
wget -O /tmp/Patch-patch.txt http://wiki.sun-rays.org/images/5/51/Patch-patch.txt wget -O /tmp/Patch-SUNWutref.txt http://wiki.sun-rays.org/images/1/15/Patch-SUNWutref.txt cd /opt/ sudo patch -p0 </tmp/Patch-SUNWutref.txt sudo patch -p0 </tmp/Patch-patch.txt
- if you are on a 64bit system make sure to reapply the above mentioned patch (see (16)) to /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl again then run "/opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable" again
- make sure the patch in (25) and (26) are reapplied as the update might have overwritten it again.
- restart the SRSS with
sudo /etc/init.d/zsunray-init stop sudo /etc/init.d/zsunray-init start
- update the firmware in /tftpboot
sudo /opt/SUNWut/sbin/utfwadm -A -a -N all
or for GUI firmware:
sudo /opt/SUNWut/sbin/utfwadm -A -a -N all -f /opt/SUNWut/lib/firmware_gui
Tips and Tricks
update the MANPATH
To make sure users are able to access the manual pages of SRSS go and add them globally in /etc/manpath.config
MANDATORY_MANPATH /opt/SUNWut/share/man MANDATORY_MANPATH /opt/SUNWuttsc/share/man MANDATORY_MANPATH /opt/SUNWkio/share/man
add the SRSS tools to the general user PATH
To make the SRSS tools (e.g. utxconfig) available to all users, make sure to add the following pathes to your /etc/environment file:
/opt/SUNWut/bin:/opt/SUNWuttsc/bin:/opt/SUNWut/sbin
useful GNOME default settings
There are some usefull GNOME default setting you might want to apply globally for all users:
- Allow no background pictures (reduces bandwidth)
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /desktop/gnome/background/picture_options none
- Allow only the blank screen saver (reduces bandwidth)
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /apps/gnome-screensaver/mode blank-only
- Make the lock screen and idle locking mandatory
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool \
--set /apps/gnome-screensaver/lock_enabled true
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool \
--set /apps/gnome-screensaver/idle_activation_enabled true
- Link some keys from the SUN keyboard to some GNOME functionality
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /apps/gnome_settings_daemon/keybindings/help "Help"
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /apps/gnome_settings_daemon/keybindings/screensaver "SunPowerSwitch"
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /apps/gnome_settings_daemon/keybindings/search "F19"
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type string \
--set /apps/gnome_settings_daemon/keybindings/home "F17"
- enable anti-aliased fonts in gnome-terminal because Xnewt does not have XRender extension
sudo gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type bool \
--set /apps/gnome-terminal/profiles/Default/no_aa_without_render false

