Managing user session question

I’ve got a somewhat anemic box, resource-wise, set up in the office where
any authorized user plus a guest account can log on. Guest is tightly
restricted, but we get a lot of people passing through who need one-time or
occasional access - this isn’t the big problem. What’s causing me problems
is that a user will log in, walk away or go to the john and the screen
locks. Next user (or this one comes back) and winds up doing another
login. At the end of a week or so, I may have a couple of dozen sessions
listed when I ask for “users”. Since some of these session contain open
applications they eat up an awful lot of a marginal amount of available
memory. How do I kill the entire session (as root) for a user? Gotta be
simple but it’s not obvious to me.


Will Honea

Hello Will Honea,

Could you tell us which version of openSUSE you have?
If you use KDE or GNOME and which version?

You can use the command skill which is available in the package procps.
You must be to halt/logout a user.
Use this command to halt a user:

skill -STOP -u <USERNAME>

And this one to resume a halted user:

skill -CONT -u <USERNAME>

Use this command to kill and logout a user:

skill -KILL -u <USERNAME>

And finally use this command to logout all users:

skill -KILL -v /dev/pts/* 

If you use these commands while the user is using an application there’s a chance that the user will lose data.
This is probably not the best way to do this but I don’t now which DE you use.

Good luck!:wink:

You might want to set it up as a kiosk. There is a kiosktool package for KDE in the OSS repository. I’ve never used it so can not say how well it works.

Edward Iii wrote:

>
> Hello Will Honea,
>
> Could you tell us which version of openSUSE you have?
> If you use KDE or GNOME and which version?
>
> You can use the command skill which is available in the package procps.
> You must be to halt/logout a user.
> Use this command to halt a user:
>
> Code:
> --------------------
> skill -STOP -u <USERNAME>
> --------------------
> And this one to resume a halted user:
>
> Code:
> --------------------
> skill -CONT -u <USERNAME>
> --------------------
> Use this command to kill and logout a user:
>
> Code:
> --------------------
> skill -KILL -u <USERNAME>
> --------------------
> And finally use this command to logout all users:
>
> Code:
> --------------------
> skill -KILL -v /dev/pts/*
> --------------------
> If you use these commands while the user is using an application there’s
> a chance that the user will lose data.
> This is probably not the best way to do this but I don’t now which DE
> you use.
>
> Good luck!:wink:

I’m running 11.2 with KDE4 and this was the level of info I needed; straight
to the point. I am no concerned with interrupting anyone actually doing
anything. Barring a VERY strange situation, anyone working after-hours
will be at their own station. The things I see are usually something like
FireFox left open and abandoned. Everyone knows that the grumpy old man
will likely wipe out any trash they leave so they use this machine for
short shot convenience only. Its’ primary role is as a print/database/file
server so no one uses it regularly from the console.


Will Honea