CD ICON

From: Bartman tonybart@bigfoot.com

KDE CD Icon

I was having trouble getting the CD-ROM icon on my KDE desktop to work with my CD ROM, and I have noticed a lot of other users have also had this problem. Well, I got it working, and here's how.

First ensure that you have a directory set up for the CD ROM in /mnt. It should be called /mnt/cdrom. If it's not there, you need to create it or else this process will NOT WORK! Create it using -

mkdir /mnt/cdrom

Now, the way the icon operates is not by simply automating the standard mounting procedure, eg - mount -t iso9660 /dev/hdc /mnt/cdrom - which most Linux users would have used a million or so times before. Instead, it utilises the auto-mount daemon (amd) which must be running as a process in the background. Type 'ps aux' in an xterm and look for a process which in Caldera OpenLinux 2.2 defaults to - amd -F /etc/am.d/conf - but could be something else, possibly just 'amd'. As long as it starts with 'amd' it's OK. If you don't see it, you'll need to set up your system to get amd running. 

For OpenLinux start COAS, select System->Daemons and tick the box beside 'Auto Mount Daemon (NFS & local)'. Other distros should have their own tools for this. It really shouldn't be a problem for most users, as KDE runs it by default. If you can't get amd running, seek further help! 

Assuming amd is running, we need to edit the config files it uses. Look at the amd process (ps aux) and note the path following the -F. This is the location of the amd config file. (If you just see 'amd' with no path, it is using the default of /etc/amd.conf). You should not have to edit this file (I didn't anyway!) but note the line that looks like -
map_name = /etc/am.d/localdev
It will probably be the last line in the file. The path name gives the location of the file that we need to edit, in this case it is /etc/am.d/localdev.

Here is my localdev file:

# /etc/am.d/localdev : automounter map for local devices
/defaults dev:=/dev/${key};type:=program;\
mount:="/bin/mount mount -o nodev,nosuid,sync ${dev} ${fs}";\
unmount:="/bin/umount umount ${dev}";\
opts:=nodev,nosuid,sync,rw,intr;fs:=/mnt/${key};
floppy dev:=/dev/fd0;addopts:=utimeout=5
cdrom dev:=/dev/hdc;addopts:=ro,utimeout=10
cdrw dev:=/dev/hdd;addopts:=ro,utimeout=10
hd* addopts:=utimeout=5
fd* addopts:=utimeout=5

# If you really want any user to be able to mount any device, at least
# be sure you have all the appropriate directories under /mnt
# * dev:=/dev/${key}

Make appropriate changes to your own file. Where I have put '/hdc' you may need a different name, probably '/hdb' if your box has just one hard drive. In any case, it will be the same name you use to mount the CD with the standard 'mount' command. The line starting with 'cdrw' is for my CD burner, which I only use as a second CD-ROM under Linux. If you only have one CD device, just leave this line out. I include it in this example simply to show that it can be done. :)

OK, with a bit of luck this will be all you need to do. The changes will only take effect after amd has been stopped and restarted (easiest way is to shutdown the machine and reboot).

If after rebooting the icon STILL doesn't work, right-click on the icon and select 'Properties' and then the 'Execute' tag. It should read -

kfmclient openURL file:/auto/cdrom/.

The period at the end of the above line should be in there too. If the line is different to this, change it as required.
The CD icon should now work correctly.

NB. I have read that the amd daemon in its current form has a serious security hole which can be used by hackers to access your PC. Of course, this is only an issue if you are connected to a network or the Internet. If this is of concern to you, either kill the amd process when you are connected, or don't use it at all. New versions of amd will hopefully address this problem

searchSearch Index