gnome-keyring Accessing keyring from cron job



Hi,

I'd like an application run from a user crontab to access a password
stored in the keyring. Apparently jobs run in the cron job environment
do not have access to the DBUS session data.

My current workaround is the following script which I run after
login.

touch $HOME/.dbus/Xdbus
chmod 600 $HOME/.dbus/Xdbus
env | grep DBUS_SESSION_BUS_ADDRESS > $HOME/.dbus/Xdbus
echo 'export DBUS_SESSION_BUS_ADDRESS' >> $HOME/.dbus/Xdbus

The resulting file is sourced by the script than runs as a cron job.
It is working, but feels clumsy.

Is there a proper or an easier way to access the keyring from cron
jobs?


Marco

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]