Linux: xdm shutdown button

w /etc/X11/xdm/Xsetup dopisać:
/usr/local/sbin/xdmshutdown -geometry +350+400 &
echo $! > /var/run/xdmshutdown.pid

w /etc/X11/xdm/Xstartup dopisać:
pid=$(cat /var/run/xdmshutdown.pid 2>/dev/null)
test “$pid” && kill -9 $pid 2>/dev/null

i skrypt /usr/local/sbin/xdmshutdown:
#!/usr/bin/wish
# NT 20 October 2002 – adapted/copied from various similar
# scripts dragged kicking and screaming from the bowels of the web:)
#
proc shutdownf {} { exec /sbin/shutdown -h now 2>/dev/console >/dev/console }
button .shutdown -text “Shutdown this computer” -background yellow \
-activebackground red -command shutdownf
pack .shutdown -side right

…i to DZIAŁA!…przynajmniej u mnie 😉

źródło: neil on the web – computing – xdm shutdown button

1 thought on “Linux: xdm shutdown button

Leave a Reply

Your email address will not be published. Required fields are marked *