View Single Post
  #3   (View Single Post)  
Old 28th February 2009
BSDKaffee's Avatar
BSDKaffee BSDKaffee is offline
Real Name: Jason Hale
Coffee Addict
 
Join Date: May 2008
Location: Wintersville, Ohio
Posts: 212
Default

Using killall isn't a good idea for KDE. A better to logout of KDE via the commandline is through dcop for KDE 3.x or dbus for KDE 4.x.

For KDE 3.x, I use the command:
$ dcop --all-sessions --user username ksmserver default logout 0 0 0

For KDE 4.x, make sure the environment variable DBUS_SESSION_BUS_ADDRESS is set for the appropriate session. You can usually find this in /usr/home/username/.dbus/session-bus/. Then use the command:
$ qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0
Reply With Quote