Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm having a little problem and it's DOING MY NUT ...
I maintain a school network of Slack (current), KDE 4.22.
I need to be able to logoff all PC's at a certain time.
I set up SSHd with no root password authenticated to the server, so I can auto login to each workstation and exec commands.
KDE 4 can be logged off via the dbus-send command. This will only execute as the current user. I tried exporting the dbus session but it didn't work. Then I used who | cut etc to grab the user name and su'do'd the dbus command. This worked.
Phew I thought. Cracked it.
Except if a unsaved document is open it will ask the user what they want to do and they can cancel the logoff. ARGHHHHHHHH.
So how can I terminate/destroy/force logoff the X/KDE session, putting it back to KDM?
I'm having a little problem and it's DOING MY NUT ...
I set up SSHd with no root password authenticated to the server, so I can auto login to each workstation and exec commands.
Andrew
um do you think thats wise?
as for your other problem, i guess you could kill the window manager completely,but that would suck for the people actually using the pc's at the time.
Well, if you have given your users adequate warning that the system is going down in 5,4,3,2,1 minutes, the sure-fire way to stop KDE3 is /etc/init.d/kdm stop as root. Users will loose data if they have "unsaved documents" and the like.
Then they'll only be left with a terminal login. Maybe you'll want to disable terminal logins as well?
To start KDE up again, as root, do /etc/init.d/kdm start
As I said, the above is for KDE3, I expect it's much the same for KDE4.
Slack is just another distro like the rest (ducks!) so most startup / shutdown scripts should be the same or very similar (eg maybe a different path to the equivalent executable).
There should be something in /etc/init.d/* that refers to the KDM
Doesn't /etc/init.d/kdm stop work?
What happens if you issue that command (and I am not sure that it is at all "nice", but you warned your users about an imminent shutdown. Yes?)
It may seem strange, but I get hung up on "doing things properly" too. Really what you are doing is wasting your time. killall kdm works fine, you might want to follow with a -9 if it doesn't die. Your task is to kill kde. Using kill to kill kde is a very appropriate solution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.