Bill Moseley | 1 Jul 17:30

Run script on login and/or wake

I'm looking for a way to know when a user is available -- similar to how a chat application might know if a user is available by keyboard or mouse activity.

That is, I'd like to run a script when a user first logs in (which might be automatic login as, for example, Ubuntu allows), and when the computer wakes from sleep or "unlocked".
Not sure if this is a Gnome issue or maybe lower level -- like via dpms.

Any easy hooks for doing something like this?

--
Bill Moseley
moseley <at> hank.org

_______________________________________________
gnome-list mailing list
gnome-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-list
ritz | 2 Jul 19:05
Picon

Re: Run script on login and/or wake

Hi

On Wed, 2009-07-01 at 08:30 -0700, Bill Moseley wrote:
> I'm looking for a way to know when a user is available -- similar to
> how a chat application might know if a user is available by keyboard
> or mouse activity.
> 
> That is, I'd like to run a script when a user first logs in (which
> might be automatic login as, for example, Ubuntu allows), and when the
I believe this can be accomplished by hooking into gdm PostLogin script,
along with gnome-power-manager/dbus messages.

>  computer wakes from sleep or "unlocked".
> Not sure if this is a Gnome issue or maybe lower level -- like via
> dpms.
> 
> Any easy hooks for doing something like this?
> 
> -- 
> Bill Moseley
> moseley <at> hank.org
> _______________________________________________
> gnome-list mailing list
> gnome-list <at> gnome.org
> http://mail.gnome.org/mailman/listinfo/gnome-list

--

-- 
Ritesh Khadgaray
Linux and Desktop
Ph: +919970164885
blog: http://khadgaray.blogspot.com
Eat Right, Exercise, Die Anyway.

_______________________________________________
gnome-list mailing list
gnome-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-list
Bill Moseley | 5 Jul 00:57

Re: Run script on login and/or wake



On Thu, Jul 2, 2009 at 10:05 AM, ritz <khadgaray <at> gmail.com> wrote:

On Wed, 2009-07-01 at 08:30 -0700, Bill Moseley wrote:
> I'm looking for a way to know when a user is available -- similar to
> how a chat application might know if a user is available by keyboard
> or mouse activity.
>
> That is, I'd like to run a script when a user first logs in (which
> might be automatic login as, for example, Ubuntu allows), and when the
 

I believe this can be accomplished by hooking into gdm PostLogin script,
along with gnome-power-manager/dbus messages.

PostLogin works for login from gdm, but doesn't catch the wake from sleep/unlock screen.  I suppose that's the gnome-power-manager that you mention.  Can you provide any suggestions where I might hook into that?

I suppose the other option would be to have cron watch xset output, but that's kind of a crude approach. 

Perhaps a script in /usr/lib/hal/scripts/linux to catch the wake up.  But, I'm just guessing...

Thanks,

 


--
Ritesh Khadgaray
Linux and Desktop
Ph: +919970164885
blog: http://khadgaray.blogspot.com
Eat Right, Exercise, Die Anyway.




--
Bill Moseley
moseley <at> hank.org
_______________________________________________
gnome-list mailing list
gnome-list <at> gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-list

Gmane