This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Restarting KDE from terminal, can't do "restart kdm" anymore

Tags: None
(comma "," separated)
User avatar
tobek
Registered Member
Posts
13
Karma
0
OS
Hey folks. I used to be able to start and stop KDE from the command line with initctl - e.g. "restart kdm". On my machine (Kubuntu 13.04, KDE 4.10.0) there no longer seems to be a kdm job (I get the message "restart: Unknown job: kdm"). Is there any way I can do this now?

Thanks!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Are you sure you are using KDM as your display manager?
Kubuntu switched to using LightDM if I recall right.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
tobek
Registered Member
Posts
13
Karma
0
OS
Aha, I did not know about the switch to LightDM. "restart lightdm" now does the trick for me - cheers.
User avatar
Malsasa
Registered Member
Posts
58
Karma
0
OS
Wow, solved. So I know the trick to restart KDE now restart lightdm. Thank you...


User avatar
tobek
Registered Member
Posts
13
Karma
0
OS
Though I'm still not sure if it's a particularly friendly way to do it. When possible, I try to at least log out of the KDE session, first. It's useful though - certain things that might require a reboot (or if something has gotten buggy) can be solved by restarting KDE in this way.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Note that if KDE appears hung, then simply logging into a VT as your ordinary user and running the following should trigger a KDE logout:
Code: Select all
export DISPLAY=:0.0
qdbus org.kde.ksmserver /KSMServer logout 0 0 0


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
tobek
Registered Member
Posts
13
Karma
0
OS
Cool, also a very useful tip, thanks. I've always wondered what could be done with D-Bus. For any potential googlers that land here, this page is vastly illuminating: http://www.bramschoenmakers.nl/en/node/609
jorgeilc
Registered Member
Posts
1
Karma
0
Hi, I have the same problem. Please a solution
User avatar
tobek
Registered Member
Posts
13
Karma
0
OS
"sudo restart lightdm" from any terminal should restart KDE (older versions of KDE will require "sudo restart kdm"). If you want to log off first, as bcooksley says, try the following (you have to be logged in as the same user running the KDE session):

Code: Select all
DISPLAY=:0.0 qdbus org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.logout 0 0 0


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft