On 08/21/2010 04:36 PM, Joe(theWordy)Philbrook wrote:
> It looks to me like whether I'm using e16 or e17 my habit of scrolling
> through my virtual desktops prior to a shutdown and/or (when in desperate
> hurry) just shutting down without and hoping I didn't lose anything
> important. will remain the order of the day... But thanks to an
> example in a URL I think James posted, I learned how to give my user (I
> went with %wheel rather than username) sudo permissions to poweroff.
> and wrote a simple script that uses dialog (openSuSE 11.3 doesn't seem to
> have xdialog in the repo...) for a confirmation prompt... (see attached)

You may also want to look at gxmessage or xmessage for a graphical prompt.

> There's probably a better way to check if X is running than relying on the
> existence of a running instance of startx, but that part works for me...

Yes, you can check for the $DISPLAY variable (if it is nonempty), or you 
can check the output of the command "who", which will typically contain 
the value of DISPLAY next to the username, etc.

> My only concern is whether I'm likely to do any damage to a running
> window manager if I execute a poweroff command without letting them
> close down first. ( would have to be in a real hurry for that though )

I am not sure about e16, but e17 allows you to shutdown using the 
"System" option in the menu. Which user or group gets the permission to 
shutdown the machine depends on how you configure 
/etc/enlightenment/sysactions.conf

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
enlightenment-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-users

Reply via email to