Removable volumes under i3

Posted on . Updated on .

One of the first problems I had with Fedora was to make sure I had a way of easily and graphically mounting and unmounting removable volumes like USB sticks under i3, coming from a minimal installation. Under Slackware, I used Thunar (the file manager from XFCE) for that task. So I went ahead and installed the “thunar” package in Fedora. It turned out to be insufficient. After searching a lot on Google and trying to find out what the problem was exactly, this is the recipe I came up with. None of this would happen if installing a full desktop or the workstation edition, but it’s useful for lightweight and minimalist window managers and other types of environments.

  • First of all, “thunar” will only install the file manager per-se, which is enough to do file managing operations. You need some additional packages to get removable volumes working. Specifically, you’ll need at least “thunar-volman” and “gvfs”. None of those are package requirements.

  • Second and most importantly, you may be using or improvising a quick “xinitrc” script to launch i3 with “startx”. You must not forget to launch i3 in that case through “dbus-launch”. For reference, here’s my “xinitrc” script.

#!/bin/sh
[ -f "$HOME/.Xresources" ] && xrdb -merge "$HOME/.Xresources"
[ -x /usr/bin/nvidia-settings ] && /usr/bin/nvidia-settings -l
exec dbus-launch --exit-with-session i3

Note the above script tries to load the configured settings for the NVIDIA binary driver if present. The important part is the last line and it’s where I lost more time searching.

Load comments