0

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?

2 Answers 2

1

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.

0

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.

5
  • I get automount: command not found.
    – eleven81
    Apr 21, 2010 at 18:55
  • Try installing "autofs" or "automount"
    – Pylsa
    Apr 21, 2010 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, 2010 at 19:15
  • Try looking for options to display "advanced"/"developer" (Or something similar) packages in Software management
    – Pylsa
    Apr 21, 2010 at 19:22
  • You could also try executing: zypper install autofs on the command line.
    – Pylsa
    Apr 21, 2010 at 19:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .