Wednesday, May 18, 2011

IceWM: Shutting Down the Lazy Way

A little background for those who might surf across this: I'm running Debian Squeeze right now, and IceWM didn't pick up whatever the appropriate shutdown command or script is. So, I found myself perusing these interwebz for a solution. The most common method seems to be adding another user without a password that has access to /sbin/shutdown. Yeah... screw that stuff. Sounds like a headache, especially when there's an easier way. Seeing as my "Ubuntu 10.10 Network Error Fix" post for empathy was fairly popular, I thought I'd add a little more linux rambling. Behold:

If you haven't already, copy the IceWM configuration files over to the .icewm folder in your home directory (they were in /usr/share/icewm on my installation.. snoop around). Open up the preferences file in an editor of your choice (off topic: I like nano and geany). Search for ShutdownCommand="". Uncomment the line by removing the #. Then slip in gksudo \"/sbin/shutdown -h now\"". All together, it'll look like:

ShutdownCommand="gksudo \"/sbin/shutdown -h now\""

That works great, but the only problem is that gksudo and IceWM's confirm logout are going to pop up one right after another. So, I disabled the logout confirmation. To do that, search for ConfirmLogout (in the same preferences file), uncomment it, and change the value to 0.

Easy as pie, right? You'll have to put in your password each time, but for me, that's not a real big deal. But if you're one of those uncool folks who likes to do things the 'right' way, check here for the method I rambled about in the opening paragraph.

Addendum: I was thinking. You may need your name in the sudoers file if it's not there already.

No comments:

Post a Comment