If you have recently tried to mount a filesystem in Ubuntu Lucid or Ubuntu Maverick from the command line in a Gnome friendly way you have probably run into some trouble. The pre-Lucid methods involved the use of gnome-mount or pmount, but both of these utilities rely on HAL (the Hardware Abstraction Layer) which has been deprecated in favor of new functionality in udev, the Linux kernel, and gvfs.
You might ask why someone wouldn’t just want to use plain old mount and fstab to handle mounting. Mount and fstab work great for behind the scenes filesystems you never need to unplug (such as external hard drives for automatic backups), but if you like to eject/safely remove/unmount your devices from the graphical interface in Ubuntu you will be out of luck. Also, the mount command requires superuser privileges while the graphical methods in Ubuntu do not.
The solution is apparently the new gvfs-mount command, available through the gvfs-bin package. While documentation on this utility is scant (no manpage!), devices can be mounted by executing:
gvfs-mount -d /dev/<devicename>
Note: When I execute this command from a terminal, I am greeted by 4 “Critical” warnings about various failures. Surprisingly, this does not mean the command didn’t work. Check your Desktop or /mount for your device.
This command can be executed by non-root users, and the mounting appears to be handled in exactly the same manner as the graphical method (desktop shortcut, mounting as /mount/<disk label or UUID>). Filesystems mounted with this command can be unmounted with a right-click from the Desktop or though the side pane in Nautilus.
Unmounting from the command line can be accomplished with this command:
gvfs-mount -u /media/<disk label or UUID>
For some reason, the -d switch with the /dev/<devicename> path does not appear to work.
Hopefully you have found this helpful. If you found this useful, or if you have some tips on using gvfs-mount, or if you have a better way of doing this, please leave me a comment!
July 20, 2009
Just today, Microsoft has contributed 20,000 lines of code to Linux, licensed under the GPLv2. This is the first time Microsoft has chosen to use the GPL to license it’s own code. The software they’ve released today helps to make Linux work better when running in a virtual machine on top of Microsoft’s Hyper-V hypervisor.
Microsoft’s announcement was a big surprise coming from the same company who argued that the “[GPL] debases the currency of the ideas and labor that transform great ideas into great products” and have compared it to a virus.
While this is the first time Microsoft has released code under the GPL, it isn’t the first contribution Microsoft has made to Free Software. For example, in January of this year, Microsoft made it’s first contribution to the Apache project. Microsoft’s Bing search engine includes some open source code. Microsoft also has it’s own Free Software license called the Microsoft Public License (Ms-PL) which is recognized as such by the Free Software Foundation.
Microsoft has also been showing support for Mono with promises not to sue Mono users for patent violations. I was also surprised to notice that Microsoft’s video website, which requires the Silverlight plugin, redirects Linux users to Mono’s Moonlight plugin page.
So, what’s next? Perhaps Windows 8 will run on the Linux kernel.
I just read an interesting, albeit admittedly unscientific, post by Starry Hope on the popularity of Ubuntu. Here are the two graphs from the post which I found to be the most interesting.
If you think Google search volume is a fair indicator of popularity, than it’s pretty clear that Ubuntu is more popular than all the rest of the Linux distributions put together.
While I think there is good reason for Ubuntu to be so far out in front, I hope that we in the Ubuntu Community don’t let that reality go to our heads, but continue to be good citizens in the greater Linux Community. While Ubuntu may be the most popular distrubution, Canonical (Ubuntu’s source of paid development) isn’t very profitable (yet?) and depends on the development efforts paid for by the makers of competing distrubutions like Red Hat and Novell to produce much of the software which makes Ubuntu complete.