In graphical environments is a normal user (read: non root person) allowed to shutdown/halt through for example Gnome. But I am not sure how Gnome does it. But then you would have to find out how xfce does it and how kde does it and how...
Jesper Didier Ernotte wrote: > In Mac OSX (which is a Unix system), and Linux, there is a command > named "shutdown" or "shutdown now" most likely in "/sbin" to shutdown > the system. I'm pretty sure that you must be logged as "root" (super > user) to execute it. I don't know how you can grant your extension to > have root privilege to execute the shutdown. You can always create a > script that call the shutdown command, and give root privilege to > whoever runs the script, but that a big hole in the security of the > system. > > Didier > > */InBasic <[EMAIL PROTECTED]>/* wrote: > > hi > > As i don't have so much experience using Linux or Mac OS please > help me to find out shutdown commands in these two OSs > > In windows platform there are too many ways to turn > off/standby/hibernate System, > > In my extension (Auto Shutdown - InBasic) > <https://addons.mozilla.org/en-US/firefox/addon/5452> i use : > > var process = Components.classes["*@ > mozilla.org/process/util;1 <http://mozilla.org/process/util;1>*"] > > .createInstance(Components.interfaces.nsIProcess); > process.init(*DLL or ExE Path*); > process.run (false, *args*, args.length); > > to send shutdown command as args to "Command Prompt" or windows > API (shell32.dll or PowrProf.dll , ... ), > > if any body know similar way for shutdown/Hibernate/Standby Mac or > Linux Please reply, > > > Any help will be appreciated, > InBasic > > > > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners > > > ------------------------------------------------------------------------ > > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners > _______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
