Udiskie

From ArchWiki
Revision as of 17:54, 28 September 2010 by Drcouzelis (Talk | contribs) (Created page with "Category:Auto-mounting (English) == Introduction == Udiskie is an automatic disk mounting service using [http://www.archlinux.org/packages/?q=udisks udisks]. It can be used ...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Introduction

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.

Installation

You can install Udiskie by using the udiskie package that is found in the AUR.

Start the Udiskie service by adding

 udiskie &

to your xinitrc file, before the window manager is loaded.

Once Udiskie is running, all removable media will automatically be mounted under /media under a new directory that matches the device name.

Unmounting

Use the udiskie-umount command to unmount and eject media. For example, for a device named "MY_USB_DRIVE":

 udiskie-umount /media/MY_USB_DRIVE

Or, you can unmount all media with the command:

 udiskie-umount -a

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.

Openbox

todo

Window Maker

#!/bin/bash

# For a Window Maker "media" menu
#
# This script will generate a sub-menu for any device mounted
# under /media. Click on one to browse the media in a file manager.
#
# It will ignore the "fd", "cdrom", and "dvd" directories.
#
# It is setup to use the "xfe" file manager.

# Used to prevent a comma from being added to the last entry
n=0

for i in /media/*
do
  if [ $n -gt 0 ]
  then
    echo ","
  fi
  if [ "$i" != "fd" ] && [ "$i" != "cdrom" ] && [ "$i" != "dvd" ]
  then
    echo "(\"Browse $i\", EXEC, \"xfe /media/$i\"),"
  fi
  let n=n+1
done
#!/bin/bash

# For a Window Maker "unmount" menu

# Used to prevent a comma from being added to the last entry
n=0

for i in /media/*
do
  if [ $n -gt 0 ]
  then
    echo ","
  fi
  if [ "$i" != "fd" ] && [ "$i" != "cd" ] && [ "$i" != "dvd" ]
  then
    echo "(\"Unmount $i\", EXEC, \"udiskie-umount /media/$i\"),"
  fi
  let n=n+1
done

Links