I want to insert a CD-ROM and have it automatically be mounted to someplace like /media/cdrom
and create an icon on the Gnome desktop, while logged in as a non-root user under SLED 11.
How can I accomplish this?
You can accomplish what you want with autofs. Once you've installed autofs you need to edit autofs' master file, /etc/auto.master. In this file you typically specify a mount point (/media) in your case and a resource file that says mounts all these things under the mount point.
For example in my auto.master file:
/misc /etc/auto.misc
This tells autofs to create a mount point, /misc and mount everything in the file /etc/auto.misc under it.
Contents of auto.misc:
cdrom -fstype=auto :/dev/sda
removable -fstype=ext4 :/dev/hdd
These are just examples, for more information consult the man page for auto.master. Autofs is very powerful and can automount from a variety of sources, NIS, LDAP, files, SMB, FTP sites, etc.
I'm not sure about how to create the icon, but as for the automount, try using the automount command instead of mount.
automount /dev/<device> /media/cdrom
As for the link on your desktop, try creating a link to /media/cdrom. If automount is correctly set, the device will automatically be mounted when trying to access the mountpoint.
automount
is not in the repositories, yet autofs
is, but it does not show up in Software Management.
zypper install autofs
on the command line.