FVWM: another way to shutdown/reboot with xdm

From: <f.kater_at_gmx.net>
Date: Thu, 2 Jan 2003 14:35:04 +0100

Hi,

who every may be interested in that...: Here is (another) way to
shutdown/reboot from a fvwm2 session created by xdm:

Add the following lines to one of your menu config files

[...]
+ "log off" Quit
+ "restart computer" func_restart
+ "shutdown" func_shutdown

Add the following functions:

DestroyFunc func_restart
AddtoFunc func_restart
+ I Exec exec echo '1' > /tmp/fvwm_exit_reboot
+ I Quit

DestroyFunc func_shutdown
AddToFunc func_shutdown
+ I Exec exec echo '1' > /tmp/fvwm_exit_shutdown
+ I Quit


Change the file which starts your window manager (in my case using
a gentoo distribution it's: /etc/X11/Session/fvwm2):

#!/bin/bash
/usr/local/bin/fvwm2
#add the following lines:

#sleep may help if this script is two quick
sleep 2

if [ -e /tmp/fvwm_exit_reboot ]
then
        rm /tmp/fvwm_exit_reboot
        /sbin/shutdown -r 0
fi

if [ -e /tmp/fvwm_exit_shutdown ]
then
        rm /tmp/fvwm_exit_shutdown
        /sbin/shutdown -h 0
fi


There are probably other solutions for this issue but this one works for
me.
Bye
 Felix
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Jan 02 2003 - 07:27:50 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST