Openbox menu item to logout of Openbox and command line

Openbox has a menu item to logout. This will take me to the command line
where I have to type exit to lock my computer. Is there a way to edit the
menu item such that it both exits out of Openbox, then exits out of the
command line?
Here is the menu item code to logout of Openbox as it is now:

Code:
 <item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
  </item>

Thanks in advance for answering.
 
This will take me to the command line
where I have to type exit to lock my computer.

If your goal is to quickly lock your computer an alternative would be to install x11/xscreensaver and create a menu entry to lock the screen.
$ xscreensaver-command --lock
will lock your screen immediately with a wallpaper.

Another option would be to use x11/xlock
 
For what it's worth, I use a custom key command to exit, keeping it in $HOME/.config/openbox/rc.xml. (The systemwide file is in /usr/local/etc/xdg/openbox/rc.xml)

In the keyboard section I have

Code:
<keybind key="W-q">
      <action name="Exit">
        <prompt>no</prompt>
      </action>
    </keybind>

If you don't have a custom rc.xml, or menu.xml, in /usr/local/etc/xdg/openbox/menu.xml, look for the lines
Code:
 <item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
  </item>
and change the yes to a no, then it will just exit when you pick from the menu.
 
Ok. Thank you! I have not had time to look at my key bindings yet, and I can assure you they need changing! So I appreciate the advice! :)
 
Nice, thank you! I am coming from Fluxbox! :) I loved Fluxbox and still do, but I saw some of the Old Farts :) screen shots posted here of Openbox which were just great! I had to give Openbox a try. I found a great web site that made my Openbox look so good that I have not returned to my beloved Fluxbox. :) So you pretty much have me pegged. :) Thanks again.
 
Openbox has a menu item to logout. This will take me to the command line
where I have to type exit to lock my computer. Is there a way to edit the
menu item such that it both exits out of Openbox, then exits out of the
command line?
Here is the menu item code to logout of Openbox as it is now:

Code:
<item label="Log Out">
    <action name="Exit">
      <prompt>yes</prompt>
    </action>
  </item>

Thanks in advance for answering.


What exactly do you want? To lock your screen? To logout (i.e. to get a new login screen)? To reboot? To power off/shut down your system?

To lock your screen, you can activate a screensaver. To log out, it depends on your display/dession manager. But typically each one has some command for that purpose. To reboot or to power off, it depends on a) whether you have/want to use polkit and b) whether you want to have some solution with the usual nice graphical "buttons" or you want to have it raw and simple. For the graphical button way with polkit there are diverse solutions available, e.g. from diverse Linux distributions (and possibly PC-BSD). For the raw and simple solution it comes down to some (OS) configuration settings and then simply using the available shutdown and poweroff commands.

As soon as it's clear what exactly you're looking for, I can offer more help.
 
Back
Top