 |
 |
Is it possible to log out remotely? -help-
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: 34.06 N 118.47 W
Status:
Offline
|
|
I occasionally leave my computer on and I would much rather prefer to have it secured. I can access it via SSH and reboot, but I want only to log myself out. Can that be done via logging in with SSH?
|
|
A lie can go halfway around the world before the truth even gets its boots on. - Mark Twain
|
| |
|
|
|
 |
|
 |
|
Posting Junkie
Join Date: Nov 2001
Location: Retired.
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: 34.06 N 118.47 W
Status:
Offline
|
|
thought of that.. It's not available right now.. Any other suggestions?
|
|
A lie can go halfway around the world before the truth even gets its boots on. - Mark Twain
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status:
Offline
|
|
ssh in and kill loginwindow
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status:
Offline
|
|
or to be more detailed, ssh in to your machine, run top and find the PID for loginwindow (it'll be near the bottom) then type sudo kill ### where ### is the PID for loginwindow.
That ought to do it. If you can't find loginwindow there try ps -auwwwx | grep loginwindow
The PID should be in the first row, 2nd column, right after your username (whoever's logged in on that machine)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Feb 2001
Location: 34.06 N 118.47 W
Status:
Offline
|
|
Really?
That will kick me to the login window!?
Excellent?
I'm going to try it. I'll know if it worked in the morning.
|
|
A lie can go halfway around the world before the truth even gets its boots on. - Mark Twain
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Apr 2001
Location: Seattle, WA
Status:
Offline
|
|
Originally posted by awaspaas:
or to be more detailed, ssh in to your machine, run top and find the PID for loginwindow (it'll be near the bottom) then type sudo kill ### where ### is the PID for loginwindow.
That ought to do it. If you can't find loginwindow there try ps -auwwwx | grep loginwindow
The PID should be in the first row, 2nd column, right after your username (whoever's logged in on that machine)
you only need one 'w' (-auwx)
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Mar 2001
Location: Minneapolis, MN
Status:
Offline
|
|
you're right - why did i think it was auwwwx i wonder? 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by awaspaas:
you're right - why did i think it was auwwwx i wonder?
Because ps -auxw produces this:
Code:
[arkham@flybook ~] ps -auxw | grep login
arkham 181 0.0 0.8 68576 4956 ??
Ss 8:19PM 0:10.59 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/logi
while ps -auxww produces this:
Code:
[arkham@flybook ~] ps -auxww | grep login
arkham 181 0.0 0.8 68576 4956 ??
Ss 8:19PM 0:10.59 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
The extra "w" makes the line that is displayed longer. I don't know that the third "w" does anything though.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
heh, i used to do this to my mate's mac, all the time. funny
by the way, you can be as short as this:
ps ax | grep loginwindow
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Mar 2001
Location: yes
Status:
Offline
|
|
Be careful when doing this though, you won't have the opportunity to save unsaved changes and I'm not certain if it will quit "cleanly" (i.e. any files that are written to at that moment might become corrupt).
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|