You are not logged in.

#1 2009-11-14 23:42:28

shpelda
Member
Registered: 2008-08-07
Posts: 59

traydevice - Lightweight single device systray representation

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

#2 2009-12-01 21:52:36

shpelda
Member
Registered: 2008-08-07
Posts: 59

Re: traydevice - Lightweight single device systray representation

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

#3 2010-05-17 12:33:15

Franek
Member
Registered: 2010-05-16
Posts: 100

Re: traydevice - Lightweight single device systray representation

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

#4 2010-06-20 10:41:05

shpelda
Member
Registered: 2008-08-07
Posts: 59

Re: traydevice - Lightweight single device systray representation

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

#5 2010-07-04 14:24:13

zodmaner
Member
Registered: 2007-07-11
Posts: 653

Re: traydevice - Lightweight single device systray representation

Nice! I have always want something like this. smile Thank you for this neat utility.

Offline

#6 2010-08-17 07:55:41

DPX-Infinity
Member
From: Russia
Registered: 2009-10-16
Posts: 35

Re: traydevice - Lightweight single device systray representation

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

#7 2010-08-17 16:51:11

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: traydevice - Lightweight single device systray representation

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:

http://wiki.archlinux.org/index.php/Ude … if_present

Offline

#8 2010-08-17 17:16:12

DPX-Infinity
Member
From: Russia
Registered: 2009-10-16
Posts: 35

Re: traydevice - Lightweight single device systray representation

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

#9 2010-09-04 22:53:22

shpelda
Member
Registered: 2008-08-07
Posts: 59

Re: traydevice - Lightweight single device systray representation

@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

#10 2012-08-04 23:02:44

shpelda
Member
Registered: 2008-08-07
Posts: 59

Re: traydevice - Lightweight single device systray representation

Bump!
Traydevice series 1.6 is out. Supporting even udisks2.

Offline

Board footer

Powered by FluxBB