Audio CD's on LTSP
Page for discussion of Audio CD support in LTSP >= 4.2
Using cdfs

This section is under construction.

For the time being it seems like it's necessary to have the audiocd
in the thinclient when the user logs on.
The setup of localdevise as described above works very well with cd's that is mountable, but not so good with audiocd's that
isn't mountable at all.
Luckily there is a solution by the name of
cdfs
You need to compile cdfs for ltsp4.2

These step to compile cdfs has not yet been proofread.
su -
cvs -d :pserver:anonymous@cvs.ltsp.org/usr/local/cvsroot checkout lbe
cd lbe
./build_all --fetch
cd kernel-src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.1.tar.bz2
tar jxf linux-2.6.16.1.tar.bz2
cd linux-2.6.16.1
cp ../../initramfs-src/ltsp_kernel_kit/ltsp_kernel_kit/config-2.6.16.1-ltsp-2 .config
replace
EXTRAVERSION = .1 with
EXTRAVERSION = .1-ltsp-2 in
Makefile
make oldconfig
Compiling the kernel is probably going to take some time, 30-60 minutes is to be expected, even on a relatively fast machine.
Experienced users will know how to reduce this time significantly (hint ctrl-C) (hint2: make menuconfig, barbarians!)
make CC=gcc-4.0
cd ..
wget http://www.elis.ugent.be/~ronsse/cdfs/download/cdfs-2.6.12.tar.bz2
tar jxf cdfs-2.6.12.tar.bz2
cd cdfs-2.6.12
make KDIR=../linux-2.6.16.1
Once you have the
cdfs module compiled, you must copy it into place
cp cdfs.ko /opt/ltsp-4.2/i386/lib/modules/2.6.16.1-ltsp-2/kernel/fs/
I think you should have 0644/-rw-r--r-- on the module:
chmod 0644 /opt/ltsp-4.2/i386/lib/modules/2.6.16.1-ltsp-2/kernel/fs/cdfs.ko
Then you need to inform modprobe about it:
echo "/lib/modules/2.6.16.1-ltsp-2/kernel/fs/cdfs.ko:" >> /opt/ltsp-4.2/i386/lib/modules/2.6.16.1-ltsp-2/modules.dep
Then you need to modprobe cdfs, ad this
modprobe cdfs to about line 53 of
/opt/ltsp-4.2/i386/etc/rc.localdev
Now your soundtracks should apear as track-01.wav, track-02.wav ...
Once successfull, you will see in the users file
$HOME/.lbussd.out while the cdrom is available the following
event: [AddBlockDevice|0|2|readonly|1|0|(null)], messagetpe: [AddBlockDevice]
Saved:
device_id: 2
sharename: readonly
removeable: 1
size: 0
desc: (null)
type: block
From the shell on the thinclient (enabled with
SCREEN_02 = shell in
lts.conf) you should see the tracks on the cd:
bash-2.05# cat /proc/cdfs
[cdfs 2.6.12]
CD (discid=73080A0A) contains 10 tracks:
Track 1: audio track (track-01.wav), [ 1 - 15626], length= 3:28
Track 2: audio track (track-02.wav), [ 15627 - 26320], length= 2:22
Track 3: audio track (track-03.wav), [ 26321 - 38426], length= 2:41
The method for accessing audiocd's presented here is a sure bandwidth-killer, see this
graph of network traffic on the thinclient, guess what happend in the timeperiod 16:00-18:00 and 18:00-..
-
KlausAdeJohnstad - 07 Jun 2006
--
ScottBalneaves - 10 Jul 2006
Using adcd
adcd is a local, text-mode application, but it doesn't require enabling LTSP's
LocalApps support.
Unlike cdfs,
adcd uses no bandwidth and may be easier to install. Also, CDs may be inserted or removed any time.
1. Get
adcd or some other
text-mode CD player with few binary dependencies.
2. Compile it.
3. Copy the binary to
/opt/ltsp-4.2/i386/usr/bin.
4. Create the file
/opt/ltsp-4.2/i386/etc/screen.d/adcd with the following contents
#!/bin/sh
# Audio CD player system for LTSP
# See <http://wiki.ltsp.org/twiki/bin/view/Ltsp/LocalApps>.
echo "Note: While the audio CD player is running, you may"
echo "be unable to eject data CDs."
echo ""
echo "Press ENTER to play audio CDs"
read blah
echo "searching for CD-ROM..."
# Since we don't know for sure where the CD
# player might be, guess various devices
# in a reasonable order.
adcd /dev/cdrom
adcd /dev/hdc
adcd /dev/hdd
sleep 10s
adcd /dev/hdb
sleep 10s
adcd /dev/hda
echo "WARNING: cycled through all CD-ROM devices!"
echo ""
echo "Press ENTER to try again."
read blah
sleep 10s
5.
chmod +x /opt/ltsp-4.2/i386/etc/screen.d/adcd
6. In
/opt/ltsp-4.2/i386/etc/lts.conf, add a line like
SCREEN_03=adcd.
Then, the user can switch to the CD player using CTRL+ALT+F3 and switch to the regular display using CTRL+ALT+F1.
If you want to show your users how to start adcd, then you may want to create a file
/usr/share/applications/adcd.desktop which runs
zenity with a message on the keyboard commands to start adcd and then return to X windows.