Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

2 Answers 2

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.

share|improve this answer
add comment

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.

share|improve this answer
    
I get automount: command not found. –  eleven81 Apr 21 '10 at 18:55
    
Try installing "autofs" or "automount" –  BloodPhilia Apr 21 '10 at 18:57
    
It seems that automount is not in the repositories, yet autofs is, but it does not show up in Software Management. –  eleven81 Apr 21 '10 at 19:15
    
Try looking for options to display "advanced"/"developer" (Or something similar) packages in Software management –  BloodPhilia Apr 21 '10 at 19:22
    
You could also try executing: zypper install autofs on the command line. –  BloodPhilia Apr 21 '10 at 19:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.