Confirm reboot and shutdown??

Is it possible to confirm or cancel a reboot or shutdown when I chose those options from my menu?

If I choose reboot, shutdown or logout be accident there is now way to regret this.

DestroyMenu MenuFvwmQuitVerify
AddToMenu MenuFvwmQuitVerify “Really Quit Fvwm?” Title

  • “&R. Restart” Restart
  • “&O. Log out” Quit
  • “&R. Reboot” exec sudo shutdown -r now
  • “&S. Shutdown” exec sudo shutdown -h now
  • “&C. Cancel” Nop

See the ‘FvwmForm-QuitVerify’ form that comes with Fvwm as standard.

– Thomas Adam

Ok I have tried to add this:

DestroyMenu MenuFvwmQuitVerify
AddToMenu MenuFvwmQuitVerify “Really Quit Fvwm?” Title

  • “&R. Restart” Restart
  • “&O. Log out” Quit
  • “&R. Reboot” exec sudo shutdown -r now
  • “&S. Shutdown” exec sudo shutdown -h now
  • “&C. Cancel” Nop

Style “*” FvwmForm FvwmForm-QuitVerify

But it still reboots etc. without confirmation

Because you misunderstood me…

Basically, you could create an item which says )in your “AddToMenu” section):

+ "&Exit" Module FvwmForm FvwmForm-QuitVerify

If you want to see what it looks like, open FvwmConsole, and type into it:

FvwmForm FvwmForm-QuitVerify

Don’t worry about exiting immediately, there’s a timer on it.

– Thomas Adam

What is a FvwmConsole? In an xterm I can open write FvwmCommand but then I get this error:

user@ubuntu:~ $ FvwmCommand
No such file or directory FvwmCommand error in opening message fifo
user@ubuntu:~ $

If I want to shut down my computer and I use:

  • “&S. Shutdown” Module FvwmForm FvwmForm-QuitVerify exec sudo shutdown -h now

I get a box that says Logout, Restart, Cancel

But it should just say:

Shutdown? Cancel

without a timer. Is that possible?

It’s a module – so it can only be started by fvwm – so you should add the following line to some menu:

+ "FvwmConsole" Module FvwmConsole"

You have extraneous commands at the end of that. You want precisely this:

+ "&S. Shutdown"	Module FvwmForm FvwmForm-QuitVerify

Yep – see: man FvwmForm have fun…

– Thomas Adam

In the man pages it only describes FvwmForm as a module that I can spawn like:

Module FvwmForm MyForm

But then I guees I have to make a FvwmForm module for:

reboot
shutdown
logout

if I want the text on the box to be:

Shutdown? Cancel

when I choose shutdown

And when I want to reboot I would like the text on the box to be:

Reboot? Cancel.

etc…

Is the only way to make this work to make 3 unique FvwmForm modules??