Udiskie is an automatic disk mounting service using udisks. It can be used for mounting CDs, flash drives, and other media. It is simple to use and requires almost to configuration.
Start the Udiskie service by adding
Once Udiskie is running, all removable media will automatically be mounted under
/media under a new directory that matches the device name.
udiskie-umount command to unmount and eject media. For example, for a device named "MY_USB_DRIVE":
Or, you can unmount all media with the command:
Window Manager Menu Scripts
For convenience, you can add a script to the menu in some window managers to allow for easy access and control of removable media.
Create a "Generated Submenu" entry in the root menu.
#!/bin/bash # For a Window Maker "Devices" menu # # This script will generate sub-menus for any device mounted # under /media. You can open the device in a file manager or # unmount it. # # It will ignore the "cd", "dvd", and "fl" directories. # # It uses "thunar" to browse the media. cd /media echo \"Devices\" MENU echo \"Open\" MENU for i in * do if [ "$i" != "cd" ] && [ "$i" != "dvd" ] && [ "$i" != "fl" ] then echo \"$i\" EXEC \"thunar /media/$i\" fi done echo \"Open\" END echo \"Unmount\" MENU for i in * do if [ "$i" != "cd" ] && [ "$i" != "dvd" ] && [ "$i" != "fl" ] then echo \"$i\" EXEC \"udiskie-umount /media/$i\" fi done echo \"Unmount\" END echo \"Devices\" END