Howto run a script via dbus??

Stef Bon stef at bononline.nl
Wed Apr 1 04:22:46 PDT 2009


Hello,

I'm working on a construction which adds a networkmountpoint in the 
homedirectory of the user logging in.
It makes use of the ConsoleKit and autofs. Via this mountpoint access to 
Windows Networking(via cifs),
SSH (via sshfs/FUSE) and FTP (via curlftpfs/FUSE) is possible, on a 
dynamic way. Access to Novell networks should also be possible.

After login ConsoleKit runs a script. This script is looking for 
networkresources the user has access to. Especially with
SMB this may take some time, and can take a lot of time when there are 
network problems. And waiting for a script to finish when logging in is 
not a good thing. (ConsoleKit is waiting for scripts to finish, with a 
limit of 15 seconds)

Now there are some ways to solve this.

First is to start the script asynchron, by adding an ampersant after the 
shell script. This works.

Second, it is possible to let a daemon run the script, like the at 
daemon. Now the only thing which is done by ConsoleKist is to make the 
at daemon run this script, which is very simple via the commandline 
utility at.

Now I would like to know it's possible to do this via dbus, so to run a 
script after login. I've seen earlier constructions at FreeNX, so it is 
probably possible, but is this a good idea? And if yes, how do I do this?

Thanks in advance,

Stef Bon




More information about the dbus mailing list