I had a request from an industrial machine user for a system shutdown button in 
Gscreen.
I looked into it and it's actually a bit of a pain - it normally require sudo 
password.

The best command I found was: shutdown -h now
There are other ways using Dbus but it seems it's a gamble what systems will 
follow this.

It seems the only way to have shutdown not require the user to enter the 
password,
would be to call a script with admin rights.

I am wondering if this is something we could add to linuxcnc's make file to add 
this script and
setuid it for admin rights.
I'd hate to add a button to Gscreen that require the integrator to have to add 
a guru script to
make it work (even if it is fairly easy).

reference link
http://stackoverflow.com/questions/8089471/remotely-shutdown-restart-a-linux-machine-without-password

Chris M


                                          
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to