Skip to content
Thomas G edited this page Jun 27, 2023 · 6 revisions

Before you set off to install udiskie the hard way, look if there is a package for your distribution:

sudo pacman -S udiskie                  # Archlinux
sudo apt-get install udiskie            # Debian (unstable/testing)
sudo dnf install udiskie                # Fedora
sudo rpm-ostree install udiskie         # Fedora ostree
sudo emerge sys-fs/udiskie              # Gentoo (outdated udiskie version)
sudo slpkg -s sbo udiskie               # Slackware
sudo xbps-install udiskie               # Void Linux

(slpkg installs the udiskie from slackbuilds)

You should also install a notification daemon (I personally recommend xfce4-notifyd) or disable notifications in udiskie (udiskie -N or set notify: false in the config file).

Note: Debian Stretch main stable lists package udiskie (1.5.1-2) https://packages.debian.org/stretch/udiskie. In case this is your install choice sudo apt-get install udiskie, note that Man Page https://raw.githubusercontent.com/coldfix/udiskie/master/doc/udiskie.8.txt refers to device_config: If you use a configuration file, please, replace device_config: with ignore_device:

OS specific guides

There are OS specific guides on how to setup udiskie manually:

Manual installation

First grep the following required runtime dependencies:

Recommended runtime dependencies:

  • GTK3 (+introspection) for tray icon and password prompt. GTK2 also works if not using the tray icon.
  • libnotify (+introspection)
  • notification daemon of your choice
  • PyYAML for config file (can automatically be installed by pip)
  • python-keyutils 0.3 to cache passwords

Optional build time dependencies:

  • gettext to build translation files (during setup step)
  • asciidoc to build man page

Access to system resources is mediated using PyGObject, which is why some packages need to be built with +introspection. Check the contents of the folder /usr/lib/girepository-1.0/ (or similar). There should be the following typelibs:

  • Gio-2.0
  • GLib-2.0
  • Gtk-3.0
  • Notify-0.7

If you installed the above dependencies, but some of the typelibs are missing they might be distributed in separate packages.

Once you have installed all dependencies, use pip to download and install udiskie itself:

# from PyPI:
pip install udiskie

# from a local checkout:
pip install .

GTK Icons

udiskie comes with a set of themeable custom Tango-style GTK icons for its tray icon menu. The setup script tries to install the icons into GTK's default hicolor theme. Typically this is located in /usr/share/icons/hicolor. If you have any problems with this or you need a custom path you can manually do it like so:

cp ./icons/scalable /usr/share/icons/hicolor -r
gtk-update-icon-cache /usr/share/icons/hicolor

When doing a local installation, for example in a virtualenv, you can manually change the installation prefix for the icon data files like so:

python setup.py install --install-data ~/.local