You are not logged in.

#1 2009-12-01 21:26:54

itburnz
Member
Registered: 2009-12-01
Posts: 26

[SOLVED] OpenBox ~/.config problem

Okay I installed Arch for the 1st time and everything seems fine. My 1st Linux install from the command line and so far it works - sort of smile

I decided to go for a slim WM and installed OpenBox. It works like a charm except for one little thing. When I start OpenBox through startx (just appended ~/.xinitrc with "exec openbox-session") everything comes up but it seems that OpenBox looks for its configuration files under /etc/xdg/openbox instead of ~/.config/openbox. When I edit the files in the /root folder I can see the changes when I restart OpenBox. When I change the files in ~/.config/openbox nothing happens. I deleted the config files in the /root directory in the hopes that OpenBox would then look into ~/.config/openbox. All that happened was that I lost my menus... roll

Further, Openbox tries to create the directory /root/.local/share/openbox/sessions upon startup, which fails since I don't start it as root or sudo - doesn't seem to bother OpenBox though and it works despite not being able to create that directory.

This situation is a bit undesirable for me since I can't create individual user profiles for OpenBox as it is right now. Anyone an idea what to change to point OpenBox into the right direction - ie convince it to look into ~/.config/openbox and create its sessions folder in the /home directory rather than /root.

Last edited by itburnz (2009-12-05 08:36:17)

Offline

#2 2009-12-02 01:31:10

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] OpenBox ~/.config problem

Are you logged in as root??

From the terminal, the command that you need to find out who you are is, of all things....  whoamismile

If you ARE logged in as root, then you need to create a user with the command useradd  then log in as that user rather than as root (which should have a password btw), as being logged in as root allows you ultimate cosmic power over your system and no itty bitty living space.

If you are logged in as a normal user, if you issue a system destroying command it will tell you no.   AS root, it will do it until it has eaten itself, and you get messages that a certain command is not found -- at that point, you get a certain cold feeling that runs through your system that starts out near your recently clenched sphincter and climbs from there.

HTH


Knute

Offline

#3 2009-12-02 15:50:52

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,182

Re: [SOLVED] OpenBox ~/.config problem

Did you edit .xinitrc using sudo by any chance? simply edit it using user privs not admin.


and when you say "restart openbox" do you actually log off? Because you dont have to.

There is a Reconfigure in the menu, so once you make changes in the .config/openbox files, you have to click 'Reconfigure' and that will bring up your new changes.

Last edited by Inxsible (2009-12-02 15:52:58)


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#4 2009-12-04 01:32:45

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

Thanks for the replies. I'm definitely running it from my user account and not the root account. I may have edited my .initrc using sudo. I'll try editing it using user privs and see what happens.

Mmh... There's no reconfigure button. Actually I don't have a menu at the moment. It's really bare bones openbox at the moment and I mainly use the CLI unless I want to do some office work - then I start openbox with startx and ooo with gmrun or a terminal.

By now I figured that my autostart.sh is actually grabbed from ~/.config - just for the other two configs it uses the global ones that were installed with the package. So when I edit those I can change the feel of the GUI.

I'll take another stab at it when I have some spare time.

Offline

#5 2009-12-05 02:06:53

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

I have had a closer look at my problem. I have all the files in my home directory and the permissions and owners are set correctly, too.

I found the following in the OpenBox documentation:

"First Openbox will try for your config files in $HOME/.config/openbox/. If it is unable to find them there, then it will try the system configuration dir (use ./configure --sysconfdir to modify this when configuring the Openbox build. If you installed Openbox from a distribution package, then it will most likely be looking in /etc/xdg/openbox/. If you built Openbox yourself and do not specify --sysconfdir, then it will be looking in /usr/local/etc/xdg/openbox. "

I installed openbox using pacman and the bold part above pretty much describes what's happening on my machine - instead of looking into ~/.config openbox looks into /etc/xdg/openbox/. Can anyone tell me if it's possible to modify the openbox build so that it looks in the right place?

Thanks!

Last edited by itburnz (2009-12-05 03:02:29)

Offline

#6 2009-12-05 04:26:08

Knives
Member
Registered: 2008-12-26
Posts: 25

Re: [SOLVED] OpenBox ~/.config problem

"First Openbox will try for your config files in $HOME/.config/openbox/. If it is unable to find them there, then it will try the system configuration dir (use ./configure --sysconfdir to modify this when configuring the Openbox build. If you installed Openbox from a distribution package, then it will most likely be looking in /etc/xdg/openbox/. If you built Openbox yourself and do not specify --sysconfdir, then it will be looking in /usr/local/etc/xdg/openbox. "


Are you sure menu.xml and rc.xml are in ~/.config/openbox/ ?

Is "exec openbox-session" the only thing in your ~/.xinitrc ?

Offline

#7 2009-12-05 05:40:25

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

Yes to both questions. Interestingly enough it gets the autostart.sh from ~/.config/openbox. That one is specified directly in openbox-session. At some point I did try to modify that script to point OpenBox top ~/.config. I don't understand the syntax, however, and it didn't work.

Shouldn't it be possible to add a few lines analogous to the ones pertaining autostart to fix my problem? Maybe not the most elegant way, but if it'd work...

That still wouldn't solve the problem that OpenBox tries to write its session directory in the root directory and not home. Something's just not right.

openbox-session:

#!/bin/sh

if test -n "$1"; then
    echo "Syntax: openbox-session"
    echo
    echo "See the openbox-session(1) manpage for help."
  exit
fi

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null

AUTOSTART="$HOME/.config/openbox/autostart.sh"
GLOBALAUTOSTART="/etc/xdg/openbox/autostart.sh"

if test -e $AUTOSTART; then
    . $AUTOSTART
else
    if test -e $GLOBALAUTOSTART; then
        . $GLOBALAUTOSTART
    fi
fi

exec /usr/bin/openbox "$@"

Last edited by itburnz (2009-12-05 05:46:04)

Offline

#8 2009-12-05 06:45:56

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

Mmh, just installed xfce for the fun ot it, too. XFCE tries to acces the /root folder, too, though. I begin to think that I have a fundamental set-up problem with X.

Last edited by itburnz (2009-12-05 06:54:32)

Offline

#9 2009-12-05 08:04:04

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

SOLVED:

I was being an idiot. Instead of logging out properly I switched between root adn user using su. Apparently others have had issues with that: http://bbs.archlinux.org/viewtopic.php?pid=129322

Now I'm switching using su - username and it works. I still have to edit the config files under /etc/xdg/openbox, but I can live with that. At least neither WM is tryingt to access /root instead of /home anymore. Well, by now I butchered my install severely and I may as well redo it from scratch since it was quite fresh anyway. Thanks for the suggestions/comments. Still liking the Arch way of learning through mistakes smile G'night!

Last edited by itburnz (2009-12-05 08:05:43)

Offline

#10 2009-12-05 08:08:31

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

How do I actually flag my thread as [SOLVED]?

Last edited by itburnz (2009-12-05 08:28:54)

Offline

#11 2009-12-05 08:36:35

itburnz
Member
Registered: 2009-12-01
Posts: 26

Re: [SOLVED] OpenBox ~/.config problem

Guess I figured it out..

Offline

Board footer

Powered by FluxBB