![]() Registered Member ![]()
|
In my project, if the process receives some specific messages, it will run a script to logout the KDE desktop forcely even there are some unsaved data in the application.
I searched in Google and got the following command: qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 2 The above command works fine if there are no applications can block the logout process. But if there are unsaved data in some applications, the application will pop-up a dialog to block the logout, such as the application "kwrite": ![]() I referred the KDE doc: http://git.net/ml/kde-users/2014-03/msg00040.html It seems the third parameter "2" passed to the org.kde.KSMServerInterface.logout means the application "kwrite" should be killed immediately instead of pop-up dialog. But it doesn't work. I am a newbie for the KDE desktop. Is there any expert know the reason that why the third parameter "2" doesn't work? How can I logout the KDE forcely even if the application "kwrite" is running with the un-saved date? My KDE version is kdebase-workspace-4.3.4-30.el6_6.x86_64 and the distribution is CentOS 6.7. Thanks a lot. |
![]() Registered Member ![]()
|
where username is your username Remember to not just search the web for "issue kde" (where issue is your issue) but also for "issue linux" separately. Logout is not necessary desktop-specific; it also involves the desktop manager and the account daemons.
Hi, I'm Ivan, a competent computer user (which means geek to most). I run KDE neon Developer when it works and KDE neon User when Developer doesn't work.
Hope I helped you with any problems you may have had ![]() |
![]() Registered Member ![]()
|
There's also Ctrl+Alt+Backspace which kills the X server, immediately ending the session. Requires the target session to be the current session (kills whichever instance of X server handled the keyboard shortcut), and that the shortcut not be disabled (a google search for Ctrl Alt Backspace and your distro should provide further information).
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
![]() Registered Member ![]()
|
It works fine. Thanks your solution. I have another question: why the parameter "2" doesn't work in the command? qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 2 Is it a KDE bug? |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]