-
Notifications
You must be signed in to change notification settings - Fork 53
Installation
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 python3-udiskie # Fedora 23
sudo emerge sys-fs/udiskie # Gentoo (outdated udiskie version)
sudo slpkg -s sbo udiskie # Slackware
(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:
There are OS specific guides on how to setup udiskie manually:
First grep the following required runtime dependencies:
- setuptools
- PyGObject
- UDisks (UDisks2)
- docopt
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:
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 .
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