SRSS 4.2 on Ubuntu 9.10 (i386, 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 (SRSS) on an Ubuntu 9.10 i386 and amd64 machine. It is largely based on the 8.10 and 9.04 guides.
Requirements
This HOWTO is based on the following requirements:
Installation of SRSS (SunRay Server Software)
(1) Install of required packages
sudo apt-get install libldap-2.4-2 libmotif3 module-assistant tk8.4 tomcat6 sun-java6-jre \
ldap-utils dhcp3-server nscd gawk iputils-ping pdksh unzip libgdbm3 \
libx11-6 libfreetype6 libsasl2-2 libxt6 zlib1g devscripts \
xfonts-base atftpd xfonts-100dpi xfonts-75dpi xfonts-cyrillic wget ed \
X11-xserver-utils tcsh alien
NOTE: It might happen that your system asks you to confirm the removal of the gdm-2.28 package in case you already have GNOME installed. This is required because gdm-2.28 doesn't have the old "gdmdynamic" functionality which the SRSS requires. When prompted to select the default display manager, select "gdm-2.20". By default the gdm-2.20 no work correctly on lastest system, may be needed run this:
sudo /etc/init.d/gdm stop sudo apt-get install gdm-2.20 sudo cd /etc/gdm sudo sed 's|X11R6/||' gdm.conf >/tmp/gdm.conf sudo mv /tmp/gdm.conf . sudo /etc/init.d/gdm start
- Install your favourite window manager
The SRSS requires an approriate window manager installed. So in case you haven't installed any you can do that now. E.g. to install GNOME (which is the Ubuntu default) make sure to also run the following command:
sudo apt-get install gnome-core
If you installed Ubuntu from the Desktop CD with the default gdm-2.28 package, you will need to create the following symbolic link to get the window manager to start (another option is to change all /usr/X11R6/bin/X entries to /usr/bin/X in /etc/gdm/gdm.conf):
sudo mkdir /usr/X11R6 sudo mkdir /usr/X11R6/bin sudo ln -s /usr/bin/X /usr/X11R6/bin/X
NOTE: If the window manager will not start consistently on the console, you may need to change "0=Standard device=/dev/console" to "1=Standard device=/dev/console" in /etc/gdm/gdm.conf.
(2) Download and unzip SRS packages
cd /tmp .... (download of SRSS 4.2 packages from sun.com -- see [3]) unzip srss_4.2_linux.zip
(3) Convert all .rpm packages to .deb packages
NOTE: ignore any error or warning caused during the following package conversion process. Especially the 'alien' conversion will throw out some errors which you can ignore as long as the conversion doesn't stop.
on amd64 (64bit):
sudo find srss_4.2 -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" \;
on i386 (32bit):
sudo find srss_4.2 -name "SUNW*i386.rpm" -exec alien -d {} \;
(4) install of generated .deb packages
sudo find . -name "sunw*deb" -exec dpkg -i {} \;
(5) apply patches to installation
wget -O /tmp/Patch-SRSS42-Ubuntu910.txt http://wiki.sun-rays.org/images/3/3d/Patch-SRSS42-Ubuntu910.txt cd / sudo patch -p0 </tmp/Patch-SRSS42-Ubuntu910.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 600 /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/* /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) 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/e/e8/Utadem.MR20090816.patch.txt wget -O /tmp/utio.patch http://wiki.sun-rays.org/images/1/11/Utio.MR20090816.patch.txt wget -O /tmp/utdisk.patch http://wiki.sun-rays.org/images/4/43/Utdisk-4.2-ubuntu910.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 (you need to have the linux-headers for your kernel installed, which should have been done with the "sudo m-a -t prepare" command above)
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
(10) start utsyscfg to let it create some links for you
sudo /etc/init.d/utsyscfg start sudo /etc/init.d/utsyscfg stop
NOTE: the message "utprodinfo: package SUNWuto not installed" can be displayed because some scripts are using ".../utprodinfo -r SUNWut?" test that have rpm commands included for find the installation path
(11) Finalize gdm setup
- comment out all pam entries in /etc/pam.d/gdm-2.20 referring to "pam_sunray_hotdesk.so" as hotdesking seems to be currently broken
- make sure that your /etc/gdm/gdm.conf contains the following things in [daemon]:
VTAllocation=false DynamicXServers=true Greeter=/usr/lib/gdm/gdmlogin RebootCommand= HaltCommand= SuspendCommand= HibernateCommand= XKeepsCrashing=/etc/opt/SUNWut/gdm/XKeepsCrashing.sunray
- if unsure you can try to use this version instead:
sudo wget -O /etc/gdm/gdm.conf http://wiki.sun-rays.org/images/0/05/Gdm41.txt
- link /etc/gdm/custom.conf:
sudo ln -sf /etc/gdm/gdm.conf /etc/gdm/custom.conf
(12) 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
(13) on amd64 systems 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/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/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 ldconfig
(14) generate the compatlinks of SRSS
sudo /opt/SUNWut/lib/utctl.d/features/utcompatlinksctl enable sudo ldconfig
NOTE: if this command fails or outputs an error that some libraries are not found you have to make sure that you have the required libgdbm.so, libldap-2.4.so and liblber-2.4.so installed (also as ia32 compat libraries as explained in another section of this guide)
(15) restore the write permission of /tmp
as the debian package conversion process modified the permission of /tmp, we need to restore them via:
sudo chmod 1777 /tmp
(16) if doing a clean new install, go and configure SRSS
sudo /opt/SUNWut/sbin/utadm -A <subnet> sudo /opt/SUNWut/sbin/utadm -L on sudo /opt/SUNWut/sbin/utconfig
- if asked during utconfig make sure to answer /usr/share/tomcat6 for the tomcat path:
Configure Sun Ray Web Administration? ([y]/n)? y Enter Apache Tomcat installation directory [/opt/apache-tomcat]: /usr/share/tomcat6 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
(17) check dhcpd.conf (if you want DHCP)
- make sure that /etc/dhcp3/dhcpd.conf contains the include statements for your added subnet/interface
- The default installation of Ubuntu includes appamor. The dhcp-server needs the permission to read the configuration files from /etc/opt/SUNWut/net/dhcp/. So add the following statements between the brackets in /etc/apparmor.d/usr.sbin.dhcpd3:
/etc/opt/SUNWut/net/dhcp/ r, /etc/opt/SUNWut/net/dhcp/** r,
(18) 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
(19) 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-udev \
pulseaudio-module-x11 libasound2-plugins gstreamer0.10-pulseaudio \
ubuntu-sounds pulseaudio-esound-compat alsaplayer-alsa
- create a global 'utpulse.pa' file in /opt/SUNWut/lib with the following content
load-module module-oss device=UTAUDIODEV playback=1 record=0 fragment_size=8192 load-module module-native-protocol-unix
- create a 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 [ "${UTAUDIODEV}" != "" ] ; then
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}
else
if [ -d ${HOME}/.pulse ] ; then
rm -f ${HOME}/.pulse/default.pa
fi
fi
(20) add 'drm' module to /etc/modules to get direct rendering applications running (e.g. glxgears)
To get direct rendering applications running it might be required to add the 'drm' module to /etc/modules so that it is loaded upon start of your server. So please check via 'lsmod' if the drm module is present after reboot and if not add it to /etc/modules.
(21) 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
in case this doesn't work, make sure to reboot your system.
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.2_linux.zip
(2) Convert all .rpm packages to .deb packages
NOTE: ignore any error or warning caused during the following package conversion process. Especially the 'alien' conversion will throw out some errors which you can ignore as long as the conversion doesn't stop.
- on amd64:
sudo find srwc_2.2 -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" \;
- on i386:
sudo find srwc_2.2 -name "SUNW*i386.rpm" -exec alien -d {} \;
(3) install of generated .deb packages
sudo find . -name "sunwuttsc*deb" -exec dpkg -i {} \;
(4) retrieve/install required libraries
As uttsc 2.2 requires an older version of libcrypto (0.9.7) and libstdc++ (5) we have to retrieve these versions and install them in /opt/SUNWuttsc/lib:
cd /tmp 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 xzf libssl0.9.7-0.9.7g.tgz sudo cp -a usr/lib/libcrypto.so.0.9.7 /opt/SUNWuttsc/lib/ wget http://de.archive.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb sudo alien --to-tgz libstdc++5_3.3.6-17ubuntu1_i386.deb sudo tar xzf libstdc++5-3.3.6.tgz sudo cp -a usr/lib/libstdc++.so.5* /opt/SUNWuttsc/lib/
(5) restore the write permission of /tmp
as the debian package conversion process modified the permission of /tmp, we need to restore them via:
sudo chmod 1777 /tmp
(6) execute uttscadm to configure the installation
sudo /opt/SUNWuttsc/sbin/uttscadm -c
NOTE: if you are asked for the libcrypto.so location enter /opt/SUNWuttsc/lib/libcrypto.so.0.9.7
Tips and Tricks
For general tips and tricks on running a SRSS on Ubuntu have a look at the SRSS on Ubuntu - Tips and Tricks section in this wiki.

