Bug#433960: gnome-session: script to warn users of a shutdown/reboot via zenity

Martin-Éric Racine q-funk at iki.fi
Fri Jul 20 16:08:24 UTC 2007


Package: gnome-session
Version: 2.14.3-5
Severity: wishlist

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The rough script below could be converted into a "gnome-wall" that is 
called at the very start of rc0.d and rc6.d, followed by a long sleep, 
to warn all users of the impeding system interruption.

Of course, this is a rough hack. 

Ideally, GNOME would simply have a way to catch all wall messages 
(such as those issued by 'reboot') and to display them via the 
notification area.

#!/bin/bash
for PID in $(pgrep metacity); do
   DISPLAY=$(cat /proc/${PID}/environ | tr '\0' '\n' | grep DISPLAY | sed -e 's/DISPLAY=//')
   XAUTHORITY=$(cat /proc/${PID}/environ | tr '\0' '\n' | grep XAUTH | sed -e 's/XAUTHORITY=//')
   zenity --info --text="$1"
done
#EOF

PS: the above script was hacked by LTSP developer Scott Balneaves.

- -- 
System Information: Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i586)

Kernel: Linux 2.6.22-dbe61 (PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gnome-session depends on:
ii  gconf2                      2.16.1-1     GNOME configuration database syste
ii  gnome-control-center        1:2.14.2-7   utilities to configure the GNOME d
ii  libatk1.0-0                 1.12.4-3     The ATK accessibility toolkit
ii  libbonobo2-0                2.14.0-3     Bonobo CORBA interfaces library
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libesd-alsa0 [libesd0]      0.2.36-3     Enlightened Sound Daemon (ALSA) - 
ii  libgconf2-4                 2.16.1-1     GNOME configuration database syste
ii  libglib2.0-0                2.12.4-2     The GLib library of C routines
ii  libgnome-desktop-2          2.14.3-2     Utility library for loading .deskt
ii  libgnome2-0                 2.16.0-2     The GNOME 2 library - runtime file
ii  libgnomeui-0                2.14.1-2     The GNOME 2 libraries (User Interf
ii  libgtk2.0-0                 2.8.20-7     The GTK+ graphical user interface 
ii  libice6                     1:1.0.1-2    X11 Inter-Client Exchange library
ii  liborbit2                   1:2.14.3-0.1 libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0               1.14.8-5     Layout and rendering of internatio
ii  libsm6                      1:1.0.1-3    X11 Session Management library
ii  libwrap0                    7.6.dbs-13   Wietse Venema's TCP wrappers libra
ii  libx11-6                    2:1.0.3-7    X11 client-side library
ii  libxau6                     1:1.0.1-2    X11 authorisation library
ii  libxrandr2                  2:1.1.0.2-5  X11 RandR extension library

Versions of packages gnome-session recommends:
ii  dbus                        1.0.2-1      simple interprocess messaging syst
pn  desktop-base                <none>       (no description available)
ii  gnome-panel                 2.14.3-5     launcher and docking facility for 
ii  metacity                    1:2.14.5-4   A lightweight GTK2 based Window Ma
ii  nautilus                    2.14.3-11+b1 file manager and graphical shell f

- -- no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGoN34eXr56x4Muc0RAnMPAJ4yHkUqQVVNPQse90AR+yhHgl5q3wCglk2A
KwxbUpia03u+LRIno4nd+K4=
=hdcj
-----END PGP SIGNATURE-----





More information about the pkg-gnome-maintainers mailing list