WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [solved] How to logout user tc in a script?  (Read 2176 times)

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
[solved] How to logout user tc in a script?
« on: May 30, 2009, 09:57:51 AM »
This may seem like a stupid question but how can user tc be logged off in a script ( all the way to the system login prompt ) such that no manual entry of exit is required?
« Last Edit: May 31, 2009, 10:45:06 AM by bigpcman »
big pc man

Offline mikshaw

  • Sr. Member
  • ****
  • Posts: 368
Re: How to logout user tc in a script?
« Reply #1 on: May 31, 2009, 07:25:57 AM »
Never tried it, but this might work:
sudo pkill -KILL -u username

Offline bigpcman

  • Hero Member
  • *****
  • Posts: 719
Re: How to logout user tc in a script?
« Reply #2 on: May 31, 2009, 09:14:24 AM »
Never tried it, but this might work:
sudo pkill -KILL -u username

Thanks for the response. I tried that but it didn't quite work. I ended up with the big "X" on the screen. So here's what appears to work:

sudo killall Xvesa
sudo pkill -KILL -u username

edit: Actually I forgot that I had loaded procps.tce to try "skill and snice". As it turns out a different version of pkill is included as well. Seems this pkill version is what is required to logout from a script. Wow this one was hard to track down!

Note the info for procps.tce does not mention pkill as being included.
« Last Edit: May 31, 2009, 10:46:53 AM by bigpcman »
big pc man