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

Re: shutdown from gnome logout dialog



Hi,

and while your at it, consider adding a context menu to the
Logout-button (as produced by Add to Panel->Action->Log Out) to give
direct access to logout/reboot/halt/suspend, similar to the Lock-button,
hat provides screensaver control this way.

I know that this might not be easy (considering that we are debating
whether the gdm communication should happen on selecting or on clicking
"OK" in the logout dialogue), but would be really nice.

nomeata



Am Sa, den 18.10.2003 schrieb Jarno Gassenbauer um 03:33:
> Hi,
> 
> I made 2 patches for gdm and gnome-session to trigger machine
> shutdown/reboot/suspend from the gnome logout dialog. Now gnome-session
> 
> * opens a connection to GDM via the socket in /tmp/.gdm_socket
> * asks GDM about which actions are available (shutdown, reboot,
>   suspend). radio buttons for actions that aren't available will
>   be set insensitive.
> * updates the logout action variable in GDM each time you click a radio
>   button
> * greys out the radio button (makes it unselectable), waiting for GDM's
>   acknowledge
> * activates and makes the radio button clickable again upon GDM's
>   response. kind of visual feedback.
> 
> This is done 100% non-blocking, so (unless my code crashes) the logout
> dialog will always be responsive. GDM assigns one logout action variable
> to each X session and will not honor it before your X session ends.
> That is, other users can log in and out without problems between you
> setting your logout action to 'reboot' and actually ending your session.
> 
> If you hit the cancel button in the gnome logout dialog then GDM will
> remember your selection until you open the logout dialog again. Of
> course, the radio button you selected the last time will be
> pre-activated for you. If the wrong radio button is pre-activated
> then some script kiddie used the gdm-talk command line tool on your
> machine to set another exit action for you. She would have to have
> read access to your .Xauthority file and read/write access to the
> GDM socket, though.
> 
> If you hit OK and selected anything but 'logout only', gnome-session
> exits and GDM will run the post-session script, kill (or reset?) the
> X server and instead of starting the login prompt, will shutdown or
> reboot or whatever. Without flicker :-)
> 
> I think my patches won't make it into the current debian unstable
> because that functionality is gnome 2.6 stuff. Just posting it
> here for the impatient, like me.
> 
> See
> http://jarno.gmxhome.de/gdm-shutdown/logout.html
> 
> Best regards,
> Jarno
> 
> 
> PS: Bcc's sent to the GDM and gnome-session maintainers.
-- 
Joachim "nomeata" Breitner
  e-Mail: mail@joachim-breitner.de | Homepage: http://www.joachim-breitner.de
  JID: joachimbreitner@amessage.de | GPG-Keyid: 4743206C | ICQ#: 74513189
  Geekcode: GCS/IT/S d-- s++:- a--- C++ UL+++ P+++ !E W+++ N-- !W O? M?>+ V?
            PS++ PE PGP++ t? 5? X- R+ tv- b++ DI+ D+ G e+>* h! z?
Bitte senden Sie mir keine Word- oder PowerPoint-Anhänge.
Siehe http://www.fsf.org/philosophy/no-word-attachments.de.html

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Reply to: