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 [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to