PDA

View Full Version : shutting down as user



safknw
25th November 2006, 10:23
I'm building an application in which there is a button to shutdown the system.
I'm using suse 10.0 , which doesn't allow to shutdown (poweroff command) the system in user mode.
So how can I shutdown machin as normal user when shutdown button clicked.

wysota
25th November 2006, 12:44
If you use KDE you can take advantage of the dcop interface.

safknw
26th November 2006, 08:07
How I can use dcop interface.

wysota
26th November 2006, 09:25
If you don't want to have KDE dependencies, then just call a program called "dcop" and pass it appropriate parametres. You can use kdcop to find proper object, method and params. The method you're looking for is called "logout" and resides in "ksmserver" object.

safknw
27th November 2006, 08:35
Pls give link dcop documentation.

jpn
27th November 2006, 08:46
Try the first link: http://www.google.com/search?q=dcop

wysota
27th November 2006, 09:28
dcop --help should be sufficient as well.