[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to log yourself out remotely of a session you forgot to log out of?



On Tue, 22 Mar 2005, Joerg Johannes wrote:

> I don't think there is a "correct" way to do this. But what you did is 
> exactly what I would do as well. If you can use sudo un the machine in 

The only thing I'd add here is to say it is best to use kill (defaults to 
SIGTERM) rather than kill -9 (SIGKILL).  New users in unix often take to 
using SIGKILL right away when they discover it always[1] works whereas a 
process may choose to ignore a SIGTERM.  Let me emphasise, use SIGTERM 
first and give the process a chance to exist and save data.  Only use 
SIGKILL when you have to.

> question, just do sudo /etc/init.r/{x|d|k}dm restart to restart the 
> login manager. Every running X session (and child processes) will be 
> killed that way.

It is important to remember that some/many *nix boxes are multi-user (thin 
clients are becoming more popular again).  This will throw out everyone 
who is logged in through the display manager that gets restarted.  This 
makes for unhappy users.

[1] Actually there are cases where a process will survive a SIGKILL.  
These are not common and are a seperate discussion.

Rob

-- 
Robert Brockway B.Sc.
Senior Technical Consultant, OpenTrend Solutions Ltd.
Phone: 416-669-3073 Email: rbrockway@opentrend.net http://www.opentrend.net
OpenTrend Solutions: Reliable, secure solutions to real world problems.
Contributing Member of Software in the Public Interest (http://www.spi-inc.org)



Reply to: