tags:

views:

855

answers:

6

On my Ubuntu linux box I can easily mount USB connected drives or CDROM clicking on devices icons that I can found on the Desktop.

For example if I click on a USB connected drive icon the following things happen:

  • a /media/LABEL directory is automatically created (where LABEL is the label of the disk and may vary from disk to disk)
  • the filesystem on the device is mounted on /media/LABEL

This process is significantly different from mounting using the mount command. In particular:

  • you don't need to be root (or you don't need to modify /etc/fstab to allow ordinary user to mount the device)
  • the /media/LABEL directory is automatically created
  • the name of the directory changes according the volume label.

There is a command line command that behaves like the Gnome GUI mounting facilities does?

+4  A: 

pmount

Why can't I post just "pmount"? Not everybody is a Steve Yegge type of writer.

phihag
I think they want a link to the man page or an example or something. Also, it discourages people posting "Frist!"
Aaron Maenpaa
A: 

I don't believe Gnome itself handles the mounting—it's HAL. So if HAL is running, you should be able to automount. I assume that pmount talks to HAL somehow, and that would be the way to handle unmounting. I hope this gets you started, at least.

Paul Fisher
A: 

Yes there is. It's called ivman and handles all HAL events. I start it when running ion3. I simply start ivman as a daemon process, but has added the program to my sudoers file:

cat /etc/sudoers
[...]
ivman {hostname}=(root) NOPASSWD: /sbin/init, /usr/sbin/hibernate
[...]

so that it can manage power settings as well.

Steen
A: 

You can also use gnome-mount for mounting / unmounting from the command line.

bluebrother
A: 

I plug in my USB device, type "gnome-volume-manager" and this seems to do what you require.

vinc456
A: 

That would be "devkit-disks --mount /dev/sdxx" where xx is the letter and number of the partition to mount...

Samuel Audet