SDB:KIWI-LTSP twinkle
Kiwi-Ltsp softphones and sound.
With thanks to Jigish Gohil cyberorg@opensuse.org for his help
Objective.
To install a softphone as a local app on kiwi-ltsp.
Steps Along the Way
# Setting up kiwi-ltsp for the first time on Opensuse 11.4 After installing the ltsp package from the opensuse site, kiwi-ltsp is setup<!-- the root for the image is :- /srv/kiwi-ltsp-nfs-i386 I chose 10.0.0.254 as my server #Use yast to setup network card eth0 as 10.0.0.254 #edit /etc/sysconf/kiwi-ltsp for the following SUSE_VERSION="11.3" SERVER_IPS="10.0.0.254" LTSP_LOCALAPPS="twinkle" suse_1130_INSTALL_SOURCE=/mnt/11.3 (if the above is not mounted the download will be around 260MB) <pre> #Mount /dev/cdrom /dev/11.3 for the 11.3 opensuse distribution #Use yast to create repositories http://download.opensuse.org/update/11.3/ openSUSE-11.3 11.3-1.82 DVD ===Using mkiwi-ltsp-setup=== kiwi-ltsp-setup -h # read carefully. kiwi-ltsp-setup -s will build a new root image (if used with the -l option , the wrong /lib/modules get loaded and there will be no drivers for most things) ===Setup Server Configuration=== # The tftpd has to be run as root # The sshd has to be running (default is not running after install) the above 2 can be done using yast. # Use easy-ltsp to setup the variables you require. The add button gives a selection of options. SOUND=TRUE is a good one :) LDM_SERVER=10.0.0.254 (edit by hand) (did not work for me) (I changed the server ip address in /srv/kiwi-ltsp-nfs-i386/usr/share/ltsp/ltsp_config set at 192.168.0.254 !!!!!!!!!!!!!!!##################### ) This file does not get changed by kiwi-ltsp-setup -c # The image has to be mounted using NBD kiwi-ltsp-setup --nbd kiwi-ltsp-setup -c (essential if you decide to change the network) (I also ran -d -e -t ) will setup all the config files required. # Build the image kiwi-ltsp-setup -l2 cd /srv/kiwi-ltsp mv ltsp.... to i386.img (eg mv ltsp-suse-11.3.i686-0.0.1 i386.img) The client should boot. ===NO RESPONSE FROM SERVER=== Probably the ip address is wrong. ===Backup the Clean Image=== cp -a /srv /srv.version1 ===Customizing the Image=== #Add a user to the client image. ===CHROOT=== <pre> #!/bin/bash #file /usr/local/bin/gochroot root_dir="/srv/kiwi-ltsp-nfs-i386" mount -o bind /dev $root_dir/dev mount -o bind /proc $root_dir/proc chroot $root_dir umount $root_dir/proc echo " exit $root_dir"
gochroot useradd -gid 0 user1 passwd user1 # create a password Edit the file /etc/passwd file and change the uid of user1 to 0 save the changes run pwconv exit
.
You have now created a user1 on the client with full root powers.
root password
(Changing the image password for root caused image boot failure DO NOT CHANGE ROOT PASSWORD)
Adding a package to the client (Localapp)
I added vim.
Use yast to setup the repositories required. i.e. the install dvd and the 11.3 updates
http://download.opensuse.org/update/11.3/ and installation dvd This operation will save a repos.d directory in /etc/zypp cp -a /etc/zypp/repo.d /srv/kiwi-ltsp-nfs-i386/etc/zypp
update the repository info on the root image zypper --root /srv/kiwi-ltsp-nfs-i386 refresh zypper --root /srv/kiwi-ltsp-nfs install vim
Sound does not work in Twinkle.
Inspite of all the rules and permissions being set by the install, the sound does not work on the localapp Twinkle. The permissions of /dev/snd and /dev/dsp are set to 660 owner root , group audio pulse is a member of the audio group. A solution is to change the permissions to 666
******************************************************** echo "SOUND PERMISSIONS SETUP" >>/var/log/boot.msg #! /bin/sh # /etc/init.d/mod_snd # Copyright (c) 1998-2002 SuSE Linux AG, Nuernberg, Germany. # All rights reserved. # # Author: PD Knight # # /init.d/mod_snd # Script to change the permissions of /dev/snd snd /dev/dsp case "$1" in start) echo -n "SOUND permissions updated" chmod 666 /dev/snd/* chmod 666 /dev/dsp ;; stop) # Carry a random seed from shut-down to start-up # Save 512 bytes, which is the size of the entropy pool echo -n "Nothing to do" ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac rc_exit ****************************************************************
Set startup links in the rc.d directories.
chroot to the image cd /etc/init.d run the program chkconfig to make it all work !!!!! chkconfig -s mod_snd 2 3 exit from the image
NB make sure you unmount anything that you mount before leaving chroot.
Build the Customized Image
kiwi-ltsp-setup -l2 mv ltsp----.img to i386.img
ALL DONE
The Way It Should Be Done
The documented way below did not work for me.
root password
/usr/share/kiwi/images/ltsp/suse-11.3/config.xml <users group="users"> <user name="root" pwd="$2a$10$90AjhfXU2YIwTRrIftBauecvWXVuaNZ6JLM2IpWi0svu2kO16le9e" home="/root"/> </users>
Repositories Setup
/usr/share/image/kiwi/suse-11.3/config.xml
<!-- Note: first repository obligatory should be main all other repository should be below --> − <repository type="yast2" status="replaceable"> <source path="http://download.opensuse.org/distribution/11.3/repo/oss/"/> </repository> − <repository type="rpm-md"> <source path="http://mirror.leaseweb.com/opensuse/update/11.3/"/> </repository> − <repository type="yast2"> <source path="http://mirror.leaseweb.com/opensuse/distribution/11.3/repo/oss/"/> </repository> − <repository type="rpm-dir"> <source path="/usr/share/kiwi/image/ltsp/suse-11.3/extra-packages"/> </repository>
see /usr/share/doc/packages/kiwi/kiwi.pdf for more.
setup startup command on client
chmod 666 /dev/snd/* chmod 666 /dev/dsp
to /usr/share/kiwi/images/ltsp/suse-11.3/root/etc/init.d/boot.local
chmod +x /usr/share/kiwi/images/ltsp/suse-11.3/root/etc/init.d/boot.local