[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Finding Out Current User
From:       Thomas =?UTF-8?B?TMO8Ymtpbmc=?= <thomas.luebking () gmail ! com>
Date:       2011-07-21 5:32:01
Message-ID: 20110721073201.154ff25d () gmail ! com
[Download RAW message or body]

Am Wed, 20 Jul 2011 19:14:01 -0400
schrieb Steven Sroka <sroka.steven@gmail.com>:

> How would a program know what user is currently logged in? I would
> like a program of mine to run and execute a task when a specific user
> is logged in, but not right a log in.

a) which level
b) what user? ("you"/daemon user or somebody else on the system)

Bash level:
- whoami (who am I?)
- finger (who's on atm?)

Source level
- KUser (whoami)
- ksmserver has aa finger-a-like check on shutdown, no idea how it's
  implemented (probably not using a portable lib call?!)

But maybe you don't even have to?
> but not right a log in.
"crontab -e", "sleep 600; do_some" in ~/.xprofile?

Cheers,
Thomas
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic