Autostart TCL Script

I am a total NEWB to FVWM2 but not Linux. I need to start a TCL/Tk script when fvwm is done loading. The script throws up a splash screen and configures eth0 and some other stuff so I need root privlidges. How do I make it start automatically as root as the last thing.

Thanks,
Mark :question:

This is an extremely bad idea – why should such things be done as the window manager loads? It should ideally happen at init, like most things of that nature. That said, if you want it run as root (another bad idea), then configure sudo:

hantslug.org.uk/cgi-bin/wiki … PseudoRoot

– Thomas Adam

The reason I want to do it as the window manager loads is becuase the script requires user intervention. They need to enter the IP and some other data at boot time.

Thanks for the quick reply

you could put it to
~/.xinitrc

sleep 5 &&kdesu myscript &
exec fvwm2

Sleep will wait until fvwm has fired up.

Then kdesu is launched to ask for the rootpassword, then your scripts starts as root.
Instead of kdesu you might use gsu ,maybe the are other tools using less resources.

hth, Mark

sourceforge.net/project/showfile … up_id=7315

xsu runs much faster than kdesu on my system.

Greetings, Mark

You say “when FVWM is done loading”. What particularly is it that you need to be complete? You can launch the command from StartFunction to make it happen as part of startup, and you can use the ModuleSynchronous command to make sure certain modules are done. You can also use the Wait command to wait for certain windows to appear, and schedule to defer execution if you know how long the process generally takes.

It all depends on what you’re waiting for

Good ideas I will look into them. That is what I want to do. StartFunction should work.

Thanks