Re: gnome-session: how to shutdown gnome-session from root?



On Fri, 2006-12-08 at 15:43 +0100, Stefano Sabatini wrote:
> Hi all, 
> 
> I would like like to setup acpid to automatically launch the
> gnome-session-save program when the power button is pressed (and gnome
> is running).
> 
> The problem is that when I run from the power-button associated script
> the command:
> 
> sudo gnome-session-save --gui --kill
this will most probably not work.
we need a functional SESSION_MANAGER value.

$ echo $SESSION_MANAGER

> 
> I get this message in a GTK error window dialog:
> 
> "Could not connect to the session manager"

SESSION_MANAGER variable as stated above.




> I've tried this either running sudo with the identity of the owner of
> the gnome-session user with:
> 
> sudo -u <gnome username> gnome-session-save --gui --kill
> 
> getting the same result.
> I'm using gnome-session 2.14.3 (Debian unstable).	
> 
> How can I convince gnome-session-save to execute the command launched
> by root?  
> Is there another system to shutdown automatically and gently gnome
> (maybe sending some signal to the gnome-session process)?
> 
> Thanks in advance for any help.
> 
> Cheers
> 
-- 
Ritesh Khadgaray
LinuX N Stuff
Ph: +919822394463
Eat Right, Exercise, Die Anyway.

Attachment: smime.p7s
Description: S/MIME cryptographic signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]