Re: [opensuse] log user out from kde via ssh?



On Monday 24 November 2008, David C. Rankin wrote:

If I want to log a user out from a kde session after I have connected to
the box via ssh, how is the right way to do it? I would like to do it
gracefully so applications close and aren't just crashed. Would 'kill
/bin/sh
/usr/bin/startkde3' be a way to do that?

I don't know much about being graceful... :-)
But there's several options available to you, as far as I see it.

First, and the most graceful way I can think of:

-> kdeinit_shutdown.
First of all, you need to be root to do this.

1) Find out which terminal a user is running on:
# who
user1 :0 2008-11-24 10:19
user2 pts/1 2008-11-24 10:21
etc.

2) Become the user you want to log off
# su - user1

3) Export the DISPLAY variable to match that user's display:
# erport DISPLAY=:0 (don' forget the colon)

4) Kill the session:
# kdeinit_shutdown.

And that takes care of that session. :-)

Second and less graceful:

-> The skill command (be root)

Kill and logout user user1:

# skill -KILL -u user1

And that really takes care of that session.

Okay, so I am not one for grace, but it gets the job done. Plus, if I need to
interrupt a user's session like that, you can bet it's for a reason ;-)

HTH,

Joop

Attachment: signature.asc
Description: This is a digitally signed message part.



Relevant Pages

  • Re: unkillable sids
    ... same sql  and the onstat -g ses are all the same. ... but the result is usually just the stack of what the thread ... the onmode command to kill sessions doesn't actually ... kill the session, it just sets a kill flag that needs to be checked ...
    (comp.databases.informix)
  • Re: problem connecting to db.
    ... rerun the service with above problem, and kill its oracle-session ... alter system kill session ... ... So do you see the memory being released after you kill? ... like lock type we might be able to help figure out what is going on. ...
    (comp.databases.oracle.misc)
  • Re: unkillable sids
    ... same sql and the onstat -g ses are all the same. ... but the result is usually just the stack of what the thread ... the onmode command to kill sessions doesn't actually ... kill the session, it just sets a kill flag that needs to be checked ...
    (comp.databases.informix)
  • Re: Newsreaders and 10.5
    ... locks up after a post and I have to kill it. ... This also marks read as ... unread in the current session. ...
    (comp.sys.mac.advocacy)
  • Re: Com object Garbase disposal
    ... By Kill the App, ... IE, a new session is created, but the memory allocation isn't increased. ...
    (microsoft.public.dotnet.framework)