FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 11-11-2008, 08:16 PM
Derek Broughton
 
Default Gracefully logging off another user.

Colin Murphy wrote:

> What is the most graceful way, as a super user, to log out another
> user closing all of their processes and ending their session?

I'm pretty sure I've seen this done with dcop.

Try:
# sudo dcop --user USERNAME ksmserver default logout 0 0 0

(where USERNAME is the user you want to kill). I haven't a clue what
the rest of that does (I just googled - knowing that you'd need to use
dcop helps with that :-) ), except that ksmserver is definitely the right
program.
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-11-2008, 08:39 PM
Rashkae
 
Default Gracefully logging off another user.

Rashkae wrote:
> Colin Murphy wrote:
>> On my home, family machine, members of the household are quite happy
>> to 'Switch User' and open up a session for themselves - they seem far less
>> happy to log out again at the end of a session. This usually means there are
>> several, three, maybe four, active sessions running on the one machine. If
>> one of these sessions has some processor intensive task running, say they've
>> left a browser on some flash rich page, system response times really plummet.
>>
>> Instruction and education to family members, some times with a larting stick,
>> has not reaped the rewards one might have hoped for. So ...
>>
>> What is the most graceful way, as a super user, to log out another user
>> closing all of their processes and ending their session?
>>
>
> There is no graceful way.
>


Err, right, amend that to "I don't know of any graceful way"....

You'd think I would know better than to state absolutes on a list of
people like Derek who know stuff

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-11-2008, 08:47 PM
Bart Silverstrim
 
Default Gracefully logging off another user.

Rashkae wrote:
> Rashkae wrote:
>> Colin Murphy wrote:
>>> On my home, family machine, members of the household are quite happy
>>> to 'Switch User' and open up a session for themselves - they seem far less
>>> happy to log out again at the end of a session. This usually means there are
>>> several, three, maybe four, active sessions running on the one machine. If
>>> one of these sessions has some processor intensive task running, say they've
>>> left a browser on some flash rich page, system response times really plummet.
>>>
>>> Instruction and education to family members, some times with a larting stick,
>>> has not reaped the rewards one might have hoped for. So ...
>>>
>>> What is the most graceful way, as a super user, to log out another user
>>> closing all of their processes and ending their session?
>>>
>> There is no graceful way.
>>
>
>
> Err, right, amend that to "I don't know of any graceful way"....
>
> You'd think I would know better than to state absolutes on a list of
> people like Derek who know stuff

Well...

since you're the admin and you've said that your LART methods aren't
working,

open a terminal, "sudo passwd <username>"

Then switch back to the user in question, log them out.

Give them a note telling them to change their @#$ password and don't do
it again...this is really the only way I know of to gracefully eliminate
their sessions.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-11-2008, 09:14 PM
Colin Murphy
 
Default Gracefully logging off another user.

On Tuesday 11 November 2008 21:28:56 Rashkae wrote:
> Colin Murphy wrote:

> >
> > What is the most graceful way, as a super user, to log out another user
> > closing all of their processes and ending their session?
>
> If the concern is a cpu hungry task, you can always simply renice or
> suspend the process. However, if system response time is suffering so
> badly, I suspect your issue is more likely to be RAM starvation, and the
> system response slugishness is caused by swapping.

renice and suspend sound like options, better to leave the application ticking
over rather than killing it if at all possible. I know very little about
renice and suspend though. How would the owner of a process de-renice an
app, or would this happen automatically when they next make use of it?

--
Colin@Spudulike.me.uk
Gotta go, things to be, people to do, and stuff to, err, stuff.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-12-2008, 09:21 AM
Nils Kassube
 
Default Gracefully logging off another user.

Colin Murphy wrote:
> renice and suspend sound like options, better to leave the application
> ticking over rather than killing it if at all possible. I know very
> little about renice and suspend though. How would the owner of a
> process de-renice an app, or would this happen automatically when they
> next make use of it?

If you want to go the renice way, only root can renice processes to give
them a higher priority. Therefore the other users can't do it themselves
unless they are in the admin group. You can renice their processes with
the command

sudo renice 19 -u user

in a terminal where you replace "user" with the appropriate user name.
That will give the processes lowest priority. With the command

sudo renice 0 -u user

you can undo the previous command. It isn't perfect because all those
processes will have a "nice value" of 0 (the default value) afterwards
even if the other user had intentionally reniced some processes to lower
priority. If you forget to give the other users normal priority they can
still work with the lower priority but it may be a bit slow. However they
can logout and login again to get normal priority.

With the suspend way it would be the command

sudo pkill -STOP -u user

to stop the processes of that user. With the command

sudo pkill -CONT -u user

the processes will continue. However if you forget the last command the
other user can't do anything, not even logout and login again because
_all_ his processes are suspended.

Finally a thought about your original problem of users with high resource
use. Could it be that they have no programs running except the screen
saver? Some screen savers are real resource hogs (and cost real money).
Check with the "top -i" command which program uses all the CPU cycles. If
it really is the screen saver, ask the other users to select another one,
preferrably the blank screen.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-12-2008, 02:02 PM
Derek Broughton
 
Default Gracefully logging off another user.

Nils Kassube wrote:

> Colin Murphy wrote:
>> renice and suspend sound like options, better to leave the
>> application
>> ticking over rather than killing it if at all possible. I know very
>> little about renice and suspend though. How would the owner of a
>> process de-renice an app, or would this happen automatically when
>> they next make use of it?
>
> If you want to go the renice way, only root can renice processes to
> give them a higher priority. Therefore the other users can't do it
> themselves unless they are in the admin group. You can renice their
> processes with the command
>
> sudo renice 19 -u user
>
> in a terminal where you replace "user" with the appropriate user name.
> That will give the processes lowest priority. With the command
>
> sudo renice 0 -u user
>

You could, of course, create a script containing that (and replacing
"user" with "$USER"), give the users access to it via sudoers, but it's
ugly...
--
derek


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 11-12-2008, 06:04 PM
Aart Koelewijn
 
Default Gracefully logging off another user.

On Tue, 11 Nov 2008 20:10:07 +0000, Colin Murphy wrote:

> On my home, family machine, members of the household are quite happy to
> 'Switch User' and open up a session for themselves - they seem far less
> happy to log out again at the end of a session. *This usually means
> there are several, three, maybe four, active sessions running on the one
> machine. *If one of these sessions has some processor intensive task
> running, say they've left a browser on some flash rich page, system
> response times really plummet.
>
> Instruction and education to family members, some times with a larting
> stick, has not reaped the rewards one might have hoped for. *So ...
>
> What is the most graceful way, as a super user, to log out another user
> closing all of their processes and ending their session?
>
> --
> Colin@Spudulike.me.uk
> Gotta go, things to be, people to do, and stuff to, err, stuff.

Many possibilities have already been mentioned, but there might be one
more, depending if they leave there session password protected or not.

The first session on a X machine is usually in terminal 7, the second in
terminal 9, third in terminal 10 etc. Supposing you are in the first
session yourself, you can switch to the next sessions with [CTRL][Alt]
[F9] etc ([F10],[F11]) and when you are in their X session you can log
them out in the usual way.

Of course, you could also log out yourself when you are finished, your
family members then don't have a change to switch user but will have to
log in in the usual way, or you could leave your session password
protected, which would make it very difficult to get into the machine in
any way without switching it of.

Aart


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 06:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org