Updating obdevicemenu to use Udisks2 In Debian Buster (and Other Linux Distros)

I am a fan of a …minimal … desktop. And I also tend to get irritated when computers assume I want them to do things for me. So for that reason, I really dislike utilities that automount removable drives.

In the past, I’ve used (along with openbox) the fantastic obdevicemenu script (AUR, Arch Forum Post) by Jamie Nguyen. It provides a menu with volume information and lets you mount and unmount your devices at your whim without firing up Thunar, Nautilius, and so on.

Except it utilized the udisks protocol, which has now been completely dropped for udisks2in Debian Buster (and probably other distros as well). And so now with my clean Debian Buster install, my damn pipe menu doesn’t work.

So I stripped out the parts that simply aren’t supported (or I couldn’t figure out) and updated as much as I could to udisks2 and called it obdevicemenu_udisks2_bash. There are a few other implementations I’ve seen, but they’re in python or other languages, and as I’m also having to deal with a python2 program I still have to support, I wanted to have something where the syntax wasn’t going to change any more than it had to.

The code probably isn’t the greatest, but it works. I am pretty sure the optical disk stuff works properly as well. You’ll have to manually eject CDs, though.

You can find obdevicemenu_udisks2_bash at:

GitHub: https://github.com/uriel1998/obdevicemenu_udisks2_bash
GitLab: https://gitlab.com/uriel1998/obdevicemenu_udisks2_bash
My Git: https://git.faithcollapsing.com/obdevicemenu_udisks2_bash

Featured Photo by Markus Spiske on Unsplash