You are not logged in.

#1 2011-09-24 03:38:50

Plus
Member
Registered: 2011-09-24
Posts: 17

Openbox Exit Issue [SOLVED]

I recently did a new Arch install by following the steps in the Wiki.  This is my second time doing this.  My first time around was a successful install using KDE but I wanted to start fresh with a lighter load so I went with LXDE/Openbox (I installed the LXDE package group but removed lxpanel and am using tint2 instead).  Everything boots OK, LXDM starts, then in to Openbox OK.  My problem is when I choose Exit from the Openbox menu, I am not sent back to LXDM but instead the system kind of freezes.  My wallpaper and tint2 panel are still present but the Openbox menu does not function and I'm forced to Ctrl-Alt-F12 or bang on my keyboard hoping to get to a terminal window.  Does anyone know what might be causing this?

Last edited by Plus (2011-10-02 04:29:54)

Offline

#2 2011-09-24 09:23:06

xamaco
Member
From: Corsica, France
Registered: 2010-04-05
Posts: 87

Re: Openbox Exit Issue [SOLVED]

I'm not sure it will cure your problem, but here is my experience:
I use Openbox without lxde. But, as you did, I installed lxde first (it put a good deal of the things I needed in just one step). The difference is in the .xinitrc script. I use: 'exec ck-launch-session openbox-session' instead of 'exec ck-launch-session startlxde'.

As a side note, have a look at fbpanel: It does more than tint2 and it uses less memory... It's quite configurable and can do as little as tint2 or more...

Offline

#3 2011-09-24 09:42:55

NotFromBrooklyn
Member
Registered: 2011-07-24
Posts: 37
Website

Re: Openbox Exit Issue [SOLVED]

What did you mean with "exit"?

My problem is when I choose Exit from the Openbox menu

Offline

#4 2011-09-24 18:56:09

gshroc
Member
Registered: 2011-09-23
Posts: 4

Re: Openbox Exit Issue [SOLVED]

I'd have to ask are you looking to:

a) logout [ exit ] back to tty1 for some reason or
b) do you just need a quick method to have the options to shutdown / reboot your system without installing additional software?

If your looking for b you can use my method if you like. In all the examples obviously replace "photek" with your username.

1. Create a new menu entry [ I use obmenu ] called System Power. Create two sub headers with commands on the right:
   
    Label:               Command:

    Reboot              /home/photek/.startup/reboot.sh
    Shutdown         /home/photek/.startup/shutdown.sh

Now create these dead simple scripts in a new directory ".startup" in your home folder.

reboot.sh

#!/bin/bash
sudo reboot

shutdown.sh

#!/bin/bash
sudo shutdown -hP 0

I know the scripts are ridiculously simple but this method you can add commands like "play ~/.startup/shutdown.ogg && sudo shutdown -hP 0" if you want sox to play an outro sample or whatever. I used to use startup and shutdown sounds but they began to grate over time!

Last thing is to make sure you have the scripts as executable and you then just need a simple edit visudo "User alias" and "Cmnd Alias". Respectively as such:

photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot

I've attached a copy of my visudo for reference. Anyhow, hope this helps a little with your new Openbox Arch install. Excellent WM choice BTW smile


## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias    WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias    ADMINS = millert, dowdy, mikef

photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias    PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
#                           /usr/bin/pkill, /usr/bin/top

Cmnd_Alias SHUTDOWN_CMDS = /sbin/shutdown, /sbin/halt, /sbin/reboot

##
## Defaults specification
##
##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!/sbin/reboot !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL) ALL

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL) ALL

## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

photek ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw  # Ask for the password of the target user
# ALL ALL=(ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d

Last edited by gshroc (2011-09-24 18:58:25)

Offline

#5 2011-09-26 08:53:25

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: Openbox Exit Issue [SOLVED]

I have the same issue- If I select the default Exit option from the menu, everything freezes.

+ 1 on using fbpanel, and if you do, try fbpanel-svn- the move to workspaces option is awesome.

You can do as suggested above adding shutdown and reboot via visudo and that would allow a reboot. Since I rarely reboot or shutdown, I did a very brutal fix- I just simply changed the exit command to 'killall X'.  I logout just fine now wink

I should caution you that such an approach will not prompt you to save anything nor give any applications a chance to close as they would want to. I like fixing problems though, so it works for me (havent had an issue yet) tongue

Offline

#6 2011-10-02 04:28:32

Plus
Member
Registered: 2011-09-24
Posts: 17

Re: Openbox Exit Issue [SOLVED]

Thanks for all the good ideas!  I ended up using Obmenu to change the Exit menu item to execute the lxsession-logout command and now I've got the option to shutdown, reboot, suspend, hibernate, or logout when choosing Exit from the menu which is exactly what I was looking to do.  I'll have to check out fbpanel.  I like tint2 since it's real simple and configurable but haven't used fbpanel before.

Offline

Board footer

Powered by FluxBB