You are not logged in.
Hello everyone.
I have created a simple little systray application that allows you to conveniently execute configured commands
on specified device.
Traydevice
Traydevice displays configurable icon in system tray that allows you to mount/umount/play or to do anything
else with a single device(like cdrom, usbstick or keyboard or whatever:) ).
This might come particulary handy for those lightweight desktops - are you already bored by typing "mount /dev/cdrom" ?
Traydevice was created to help my wife with mounting of removable devices, without polluting my system with dependecies of gnome-volume-manager.
As far as i see most common usecase of traydevice is to hang it on halevt.
In halevt config file execute traydevice in insertion and on init hooks:
For traydevice version < 1.5 use :
<halevt:Device match="&MOUNTABLE;">
<halevt:Insertion exec="traydevice $hal.udi$"/>
<halevt:OnInit exec="traydevice $hal.udi$"/>
</halevt:Device>
For traydevice version >= 1.5 use :
<halevt:Device match="&MOUNTABLE;">
<halevt:Insertion exec="traydevice $hal.block.device$"/>
<halevt:OnInit exec="traydevice $hal.block.device$"/>
</halevt:Device>
This will cause halevt to launch traydevice whenever mountable device is inserted to system.
Actions that are available in right click menu of this device are completely under control of Traydevice configuration.
Requirements
It just depends=('dbus-python' 'pygtk' 'python-lxml').To use it's default configuration you'll need pmount too.
hal has to be running and a systray will be needed to display tradevice icon.
Installation
Nothing special, there's an AUR package prepared at http://aur.archlinux.org/packages.php?ID=32005
Configuration
In $XDG_CONFIG_HOME/traydevice/default.xml a default configuration file resides.
This one is well commented, so you should be able to customize it to your needs.
Custom configuration files can be specified using -c commandline option.
Downnload and have fun.
Last edited by shpelda (2010-06-20 10:44:42)
Offline
Project has moved to beta stage, release 1.3 is available for download.
Configuration file format is stable(and extensible), complex hal properties conditions are allowed, XDG used for configuration files.
Top post of this thread re-edited completely.
Please test it.
Offline
Works fine for me, thank you for this programme!
@other users: I recommend following the instructions on http://wiki.archlinux.org/index.php/Halevt
Offline
As HAL is deprecated, version 1.5 of traydevice is created using udisks as backend.
Semantics of comand line has changed - device file is passed instead of hal udi.
so eg.
traydevice /dev/sr0
starts traydevice for my cdrom.
This is still usable with halevt using $hal.block.device$ property.
@Franek please update the wiki
Last edited by shpelda (2010-06-20 10:45:38)
Offline
Nice! I have always want something like this. Thank you for this neat utility.
Offline
It seems that UDisks-based version (I don't know, maybe hal-based old ones too) doesn't correctly handle CD/DVD media removal. I mean, when you open cd tray, the traydevice icon doesn't disappear. It is so because there are no DeviceAdded or DeviceRemoved signals emitted on CD/DVD manipulation.
Offline
DEBUG:Executing:['/usr/bin/udisks', '--unmount', '/dev/sdb2']
DEBUG:Result:(0, ('Unmount failed: Not Authorized\n', ''))
How do I get authorization to unmount?
I used this udev rule to mount my USB drive:
Offline
How are you launching your X environment? If it is something like this:
~ $ cat .xinitrc
....
exec some-window-manager
then you have to change last line to
exec ck-launch-session some-window-manager
and install consolekit, of course.
Offline
@anonymous_user:
This is not really traydevice related, this is a setup of your desktop.
man 8 pklocalauthority on setting up rights with this *kit stuff.
This are very loose settings that should do. (/etc/polkit-1/localauthority/50-local.d/10-local.settings.pkla):
[Mounting permissions for everybody]
Identity=unix-group:users
Action=org.freedesktop.udisks.*
ResultActive=yes
ResultInactive=yes
ResultAny=yes
This should work no matter what your consolekit session status is.
@DPX-infinity:
A bug. Thank you.
Offline
Bump!
Traydevice series 1.6 is out. Supporting even udisks2.
Offline