Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: bigpcman on May 30, 2009, 12:57:51 PM

Title: [solved] How to logout user tc in a script?
Post by: bigpcman on May 30, 2009, 12:57:51 PM
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?
Title: Re: How to logout user tc in a script?
Post by: mikshaw on May 31, 2009, 10:25:57 AM
Never tried it, but this might work:
sudo pkill -KILL -u username
Title: Re: How to logout user tc in a script?
Post by: bigpcman on May 31, 2009, 12:14:24 PM
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.