You are not logged in.
Links
Sourceforge Project Page
AUR Package
Gitorious
Screenshots
Menu
Notifications
Overview
obdevicemenu is an Openbox pipe menu that uses udisks to easily mount, unmount or eject removable devices. An extensive configuration file allows desktop notifications about the success or failure of operations, as well as the modification of several commands.
This script does not provide automounting of removable media as there are already many ways to automount. The file managers in GNOME and KDE handle automounting, while udev rules or scripts like Udiskie can be used in other environments.
You might also be interested in bashmount, which is more versatile and works in any desktop environment or window manager.
Notes
Dbus and consolekit/policykit need to be running. If you aren't using a login manager, put this in ~/.xinitrc:
source /etc/X11/xinit/xinitrc.d/30-dbus
exec ck-launch-session openbox
If it doesn't already exist, create the file "/etc/polkit-1/localauthority/50-local.d/10-udiskie.pkla" with these contents:
[Local Users]
Identity=unix-group:storage
Action=org.freedesktop.udisks.*
ResultAny=yes
ResultInactive=no
ResultActive=yes
Then put inside the "root-menu" part of ~/.config/openbox/menu.xml something like this:
<menu id="devices" label="Devices" execute="/usr/bin/obdevicemenu" />
Last edited by jnguyen (2011-09-18 15:53:59)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
0.8.1 released fixing various issues.
0.8.2 released fixing optical media naming.
Last edited by jnguyen (2011-04-06 06:55:01)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
0.8.3 released with more information in the README and another fix for optical media naming.
0.8.4 released with better handling for blank optical discs.
0.8.5 released with various fixes and better handling of devices without labels.
0.8.6 released with some typos fixed.
0.8.7 released with code fixes.
0.8.8 released with a ChangeLog included.
Last edited by jnguyen (2011-03-10 15:28:08)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
When I in config file leave removable_devices="sd[b-z].[0-9]*", I can't to see any usb devices in pipemenu and when I change it to removable_devices="sd[b-z]*.[0-9]*"- I can
Offline
When I in config file leave removable_devices="sd[b-z].[0-9]*", I can't to see any usb devices in pipemenu and when I change it to removable_devices="sd[b-z]*.[0-9]*"- I can
Hi rrobis, thanks for the feedback. What are your removable devices called? What is your output of "udisks --enumerate" when these usb devices are plugged in?
On my system the devices are only ever called /dev/sdXY, where X is a letter and Y is a number. Based on your feedback, I'm guessing that device naming is not limited to this.
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Output:
[robis@myhost ~]$ udisks --enumerate
/org/freedesktop/UDisks/devices/sda
/org/freedesktop/UDisks/devices/sdb
/org/freedesktop/UDisks/devices/sda1
/org/freedesktop/UDisks/devices/sda2
/org/freedesktop/UDisks/devices/sr0
/org/freedesktop/UDisks/devices/sda5
Offline
Output:
[robis@myhost ~]$ udisks --enumerate
/org/freedesktop/UDisks/devices/sda
/org/freedesktop/UDisks/devices/sdb
/org/freedesktop/UDisks/devices/sda1
/org/freedesktop/UDisks/devices/sda2
/org/freedesktop/UDisks/devices/sr0
/org/freedesktop/UDisks/devices/sda5
Oh of course. I forgot about devices that don't have a partition Thanks for pointing this out. I've fixed this in 0.8.9.
However, in 0.8.9, when I plug in my USB drive I get two entries show up: "sdc" and "sdc1" for example. Only sdc1 is mountable, so I've released 0.8.10 to not show "sdc" if partitions exist. I don't have much exotic hardware to test on (I have some bog-standard usb sticks and a couple of unexciting external usb hard drives), so thanks for the feedback
Last edited by jnguyen (2011-03-10 18:19:08)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
jnguyen,thanks. imo mounting the device with volume name would be more opt.
Offline
jnguyen,thanks. imo mounting the device with volume name would be more opt.
I'm not sure which name you mean. For one of your devices, run "udisks --show-info /dev/sdXX" and tell me which of the fields you would prefer to see. I'm guessing you're talking about "by-id:" which is informative, but also very long in some/most cases.
I might put some simple configurable options in the configuration file for naming, so that you can view a "short" name (as currently) or "long" name (by-id:).
edit: Oh, perhaps you mean the "label:" field?
Last edited by jnguyen (2011-03-10 18:33:25)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
kgas wrote:jnguyen,thanks. imo mounting the device with volume name would be more opt.
I'm not sure which name you mean. For one of your devices, run "udisks --show-info /dev/sdXX" and tell me which of the fields you would prefer to see. I'm guessing you're talking about "by-id:" which is informative, but also very long in some/most cases.
I might put some simple configurable options in the configuration file for naming, so that you can view a "short" name (as currently) or "long" name (by-id:).
edit: Oh, perhaps you mean the "label:" field?
I think using the "label" field in the pipe menu would be fantastic (i.e. show it as "ARCH_201005" rather than "sdb1")
This app is great BTW. Thanks!
Offline
I think using the "label" field in the pipe menu would be fantastic (i.e. show it as "ARCH_201005" rather than "sdb1")
This app is great BTW. Thanks!
OK 0.8.11 released with the "label" field now shown in preference. I never bother putting a label on my removable drives, so that's why I overlooked it, but I can see now it's quite important to show the label if it's available (after all, that's the reason you put the label on in the first place!).
Thank you very much the feedback
Last edited by jnguyen (2011-03-10 21:16:50)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
0.8.12 fixes a major issue in the string that matches devices. The menu should be a lot faster now if you are hiding several internal drives from the list.
0.8.13 causes the script to behave gracefully if udisks isn't functioning (e.g. dbus isn't running).
Last edited by jnguyen (2011-03-11 01:44:05)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
thanks for the update, By label I mean volume label.
Offline
0.9.0 [2011-03-12]
* Fixed display of device label if it is mounted
* Improve code
* Improve configuration file
* Add menu to show more detailed device information
* Add option to unmount all devices
I've also updated the screenshots if anyone is thinking about trying this out.
Last edited by jnguyen (2011-03-12 12:51:37)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Thank you very much! This is a great deal, really.
Offline
Thank you very much! This is a great deal, really.
No problem, I'm glad you are finding it useful. Thanks for taking the time to say thanks
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
1.0.0 released!
I've added options in the configuration file that allow every menu entry and notification message to be customized. This for example allows a different language to be used.
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Thanks. Under removable media, instead of displaying the generic sdb1 etc displaying the volume label (if available) will be opt , imo.
Offline
Thanks. Under removable media, instead of displaying the generic sdb1 etc displaying the volume label (if available) will be opt , imo.
Oops, I didn't implement it properly it seems. Fixed in 1.0.1
edit: 1.0.2 released with the device label field included in the device information sub-menu.
Last edited by jnguyen (2011-03-21 14:16:00)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
thanks for the quick fix. yet one suggestion is to display the volume label only (instead of sdb1:<volume lable> (mounted) simply Volume_Label) then the remaining in the next level display would be very nice
Thanks for the new version 1.0.2
Last edited by kgas (2011-03-21 14:37:33)
Offline
thanks for the quick fix. yet one suggestion is to display the volume label only (instead of sdb1:<volume lable> (mounted) simply Volume_Label) then the remaining in the next level display would be very nice
Thanks for the new version 1.0.2
Thanks again for the feedback.
I personally like having the device filename (e.g. sdb1) visible in the menu. But since you asked, I've now implemented options in the configuration file in 1.0.3. To hide the device filename, you can change the appropriate line in the obdevicemenu.conf to this:
show_removable_device_filename="0"
Last edited by jnguyen (2011-03-21 15:33:25)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
1.0.4 released, with the menu separator for optical devices now fixed to actually display the right text.
Again, if anybody finds any bugs or missing features then please don't hesitate to mention.
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
jnguyen, thanks for your work and the time you spend.
Offline
jnguyen, thanks for your work and the time you spend.
No problem, i'm glad you find it useful
Last edited by jnguyen (2011-03-22 20:03:05)
TOMOYO Linux: Mandatory Access Control.
My AUR packages
Offline
Thanks so much for this!! It's such a useful part of my desktop now
Offline