1

I use CrunchBang Linux and the Openbox window manager which is very minimal. The Exit command on the openbox main menu opens this window which does not list Suspend.

enter image description here

enter image description here

Currently , I have to login as root in terminal and issue this command to suspend my machine :

root@Tron:/home/aswin# pm-suspend

This is rather time consuming and I would like to add suspend to the exit menu.Is there any way I can add suspend to the exit menu ?

0

1 Answer 1

2

Crunchbang seems to come with a differently configured Openbox than what I get when installing on Debian. My Exit menu is not as pretty as yours and has even fewer options:

enter image description here

enter image description here

So, it looks like your Openbox is configured to launch a different exit menu than mine. I might be able to help more if you figure out exactly what it launches and what it's called. In the meantime, as a workaround, you can add a Suspend menu entry to your menu:

  1. Set up sudo to allow you to run pm-suspend with no password. Open a terminal, run visudo and add this line (assuming your username is aswin):

    aswin ALL=NOPASSWD:/usr/sbin/pm-suspend
    

    If you're not used to vi, you can also edit the file /etc/sudoers directly but using visudo is safer.

  2. Add a new menu entry to the Openbox menu that runs sudo pm-suspend. Edit the menu file at ~/.config/openbox/menu.xml (if the file is not there, copy it from /etc/xdg/openbox/menu.xml) and add these lines:

    <separator />
    <item label="Suspend">
     <action name="Execute"><execute>sudo pm-suspend</execute></action>
    </item>
    

Now, restart Openbox and your menu will include the new Suspend entry which should suspend your computer with no need for a password:

enter image description here

3
  • this solves the problem even though copying /etc/xdg/openbox/menu.xml changed the contents of my main menu.
    – Ashildr
    Nov 27, 2013 at 17:23
  • @Ash strange, you probably already had a ~/.config/openbox/menu.xml and overwrote it with the default.
    – terdon
    Nov 27, 2013 at 17:24
  • no probs.I always used alt+f2 for all other programs.
    – Ashildr
    Nov 27, 2013 at 17:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .