You are not logged in.

#1 2012-04-20 07:11:59

brent012
Member
Registered: 2012-04-20
Posts: 10

[SOLVED] LXDE menu blank unless root?

I'm new to Arch Linux and have been setting it up for my netbook and have run into a problem. I have installed LXDE but when i run it as a non-root user the menu is blank showing only "Run" and "Logout", as root everything is there. When i logout there are a few errors in the terminal (cannot load netstat plugin, unable to find a valid menu file and some dbus stuff) but these same messages come up regardless of whether im root or the normal user so they dont explain why the menu isnt working. The openbox menu.xml file is the same for both root and my user account. I haven't had any luck looking for a solution on the forums, wiki or google.

Last edited by brent012 (2012-04-21 00:58:24)

Offline

#2 2012-04-20 07:16:01

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

Just a stab in the dark:

Who is the owner of the openbox menu.xml file?  If the owner is root then that would explain why your regular user is unable to use it?

See: Chmod/Chown

Last edited by headkase (2012-04-20 07:16:20)

Offline

#3 2012-04-20 07:29:48

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

I just set Chmod of the menu.xml file to 777 (i know that's probably not best idea but i will only ever have root and this one user on there) and the owner to my users name:users and still having the same problems.

Could the problem have anything to do with "Hal"? Thats what the remaining DBUS error messages mention, and it was something i tried to install but it cant be done through pacman anymore.

Offline

#4 2012-04-20 07:36:49

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

I assume you followed the: LXDE Wiki when you installed and configured LXDE?  If not, you should have, if so, reviewing that page did you follow it as closely as possible?  Were there any steps where you deviated from its instructions?  If so, why?

Last edited by headkase (2012-04-20 07:38:30)

Offline

#5 2012-04-20 08:02:45

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

Yeah i followed it, i was reading a few different things at the same time so i think i may have done some steps in a slightly different order or tried to run it before doing some things but i can't see how that would change anything considering i've done everything there. If you google it a few other people have had similiar problems, some guy supposedly fixed it by chmodding the home folder which either didnt work for me, or i did wrong and some others just gave up.

https://bbs.archlinux.org/viewtopic.php?id=82545

Offline

#6 2012-04-20 08:07:47

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: [SOLVED] LXDE menu blank unless root?

Your own app/system menu in lxpanel, thats the one, not openbox menu ? If that's the case then the menu config should be in /home/"user"/.config/lxpanel. You might have to rebuild the menu cache for lxpanel menu; rm all in .cache/menus - restart lxpanel.

Offline

#7 2012-04-20 08:10:06

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

Did you do this:

mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart ~/.config/openbox

?

What is in your "~/.config/openbox" folder?  Perhaps you are using a system-wide configuration instead of a user-configuration if you didn't copy those skeleton files?

I'll try to help but I don't have much experience with LXDE, I'll take a moment to do a shameless plug for Xfce4 which I'm competent enough with that it's not broken... Yet... wink

Edit,
Also if you did do those two commands: did you execute them as root or as your own user?  You would have had to do them as your own user or root would be the owner of the created structure.

Last edited by headkase (2012-04-20 08:24:11)

Offline

#8 2012-04-20 08:24:51

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

headkase wrote:

Did you do this:

mkdir -p ~/.config/openbox
cp /etc/xdg/openbox/menu.xml /etc/xdg/openbox/rc.xml /etc/xdg/openbox/autostart ~/.config/openbox

?

What is in your "~/.config/openbox" folder?  Perhaps you are using a system-wide configuration instead of a user-configuration if you didn't copy those skeleton files?

I'll try to help but I don't have much experience with LXDE, I'll take a moment to do a shameless plug for Xfce4 which I'm competent enough with that it's not broken... Yet... wink

Yeah i did do that. In root i only have lxde-rc.xml, but as my user it has autostart, environment, lxde-rc.xml, menu.xml, rx.cml. Autostart, environment and menu.xml are green too?

swanson wrote:

Your own app/system menu in lxpanel, thats the one, not openbox menu ? If that's the case then the menu config should be in /home/"user"/.config/lxpanel. You might have to rebuild the menu cache for lxpanel menu; rm all in .cache/menus - restart lxpanel.

That would make sense, i dont have any config files there a root or user though - so once again i can't understand why it's working normally as root. I've already removed the menu caches stuff once before and it didn't change anything when i ran lxde again.

Offline

#9 2012-04-20 08:28:30

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

I did an edit seconds before you posted:

Edit,
Also if you did do those two commands: did you execute them as root or as your own user?  You would have had to do them as your own user or root would be the owner of the created structure.

Green means they are executable.  As in a "chmod +x <filename>" was done to them.  Whether or not they need to be I don't know.

Offline

#10 2012-04-20 08:33:58

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

headkase wrote:

I did an edit seconds before you posted:

Edit,
Also if you did do those two commands: did you execute them as root or as your own user?  You would have had to do them as your own user or root would be the owner of the created structure.

Green means they are executable.  As in a "chmod +x <filename>" was done to them.  Whether or not they need to be I don't know.

I did it as root, i thought i needed to be root to copy things from root folders (remember something like this from another distro) - i'll try again as the user and see if it works.

I didn't chmod +x anything, just chmod 777 some stuff so i guess pacman or lxde did it and they are meant to be like that. Also, reason i'm using LXDE and not XFCE or another environment is this is on my netbook and i want the fastest and lightest stuff possible. Once i get familiar with arch and linux in general i can see myself using it on my main computer though (probably around the time others are transitioning to Win8)

EDIT: Tried again, didnt work. I'm guessing i'm supposed to chmod the folder and files or something?

Last edited by brent012 (2012-04-20 08:52:41)

Offline

#11 2012-04-20 10:16:40

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

You can copy files from any where in the file-system, except the /root folder, without root permissions.  As long as the file/folder permissions you are copying from are set to allow it.  See: Users and Groups.  Pretty well everywhere but /root allows all users to read from them.

When you are reading the wiki's, prefacing the commands, a "#" means you execute it as root, a "$" means you execute it as your regular user.  It is unfortunate that the two given commands have neither prefacing them.  The rule of thumb for you to know however is that if the files are going inside your home folder then you want to be executing them as your own user.  99.9% of the time that will be the right understanding.

Yes, you'll have to chown all the files.  You want to use the recursive option.  Recursive means that it does all the files, goes into any folders, does all the files and folders within that and so on.

In a terminal type "man chown" and read all about it.

I would do

sudo chown -R USER /home/USER/*

Replacing both instances of "USER" with your user name.  Don't blame me if your netbook catches on fire - read the chown man page as given.

Sudo is given because some files are probably owned by root.  If you haven't set up sudo then read the: Beginners' Guide.

Last edited by headkase (2012-04-20 10:23:03)

Offline

#12 2012-04-20 12:40:23

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

Still doesnt work =S. If i run "sudo startx" it will run but that seems to just run it as root just also as my user (not sure how to explain it), i dont think thats of much use though.

Offline

#13 2012-04-20 13:15:30

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

sudo elevates a single command to root privileges.  Sudo.  Since you're starting X with that then that X, and everything that X starts, will have root rights.  In theory there is no reason you couldn't be root all the time - especially in a single-user on the computer setting - but, it is incredibly bad-form to run as a root user day-to-day.

Offline

#14 2012-04-20 13:20:15

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

Since everything works with root and not with your user then it is almost certain that the category of error is a permissions error.  Root has all the permissions so it works, your user has limited permissions so it is attempting something, somewhere, and your user doesn't have the rights to do so.

Attempt a chown again, this time specifying both user and group:

sudo chown -R USER:users /home/USER/*

Replace "USER" with your user name.  The "users" leave alone: that is what it is supposed to say.

Edit:
I will also refer you to this section of the: Beginners' Guide.  In that section you should have added your user to some predefined groups.  Each of those groups you add your user to gives it a sub-set of permissions so you want to make sure you have all those groups for your user.  See: here for instructions to add your user to any groups you may have missed.

The command is (as root or with sudo):

gpasswd -a USER GROUP

Replace USER and GROUP with valid names.  Don't forget to log out and then log back in if you change any of your user's groups.

Last edited by headkase (2012-04-20 13:35:10)

Offline

#15 2012-04-20 13:35:09

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

Thanks for all your help, but it's still not working. Is it perhaps something to do with user groups?

Offline

#16 2012-04-20 13:35:52

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

See the edit I just made 1 second after your post.. ?

Offline

#17 2012-04-20 13:46:23

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

Here is an alternative way to approach the problem:

You don't have much invested in this user.  You haven't configured dozens of programs in it just the way you like.  So, instead of trying to rescue the user instead delete the user.  Create a new user, referring to the beginners' guide for which groups to add it to and such, then go back to the LXDE wiki, skip all the "installation of LXDE parts" - you have those packages already installed - and just re-do the "user configuration parts."

This time, right from the start: when it asks you to copy over those skeleton files, copy them as your user and then the other appropriate parts of the LXDE wiki.

Last edited by headkase (2012-04-20 13:46:52)

Offline

#18 2012-04-20 13:49:16

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

I was in all the recomended groups and just tried some other stuff, rebooted and still no luck! Rather than a new user should i just do a fresh install tomorrow? (providing no one has the solution overnight) I have a suspicion that it might not work if i redo everything but since i have been fiddling around with heaps of stuff it might be a good idea anyway.

Offline

#19 2012-04-20 13:55:53

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

A fresh install doesn't take long.  It wouldn't hurt to try to create a new user first.  Just as a test and to gain experience.  If it's broken it's broken, but before reinstalling: you can poke around and try things you wouldn't dare to try if you had keeping your system working as a requirement.

Offline

#20 2012-04-20 14:26:53

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

Thankyou so much lol! Deleted my account, started it again (realised i DID follow that guide for the user group stuff originally), copied the skeleton files over but then when i went to add the lines to .xinitrc there was a whole bunch of stuff, mostly commented out, already there, which was definitely not there before. Sure enough it all worked! It's pretty bizarre since .xinitrc is just in the ~ folder (home right?) so it wasn't one of the things copied over, not sure how this fixed it - but it did so i'm happy.

I wonder if it had something to do with not setting a password on my user account? I didn't have a password when i did everything at first and just set one, but it still does work now i've added a password.  Oh and also just realised, when i try and run startx as "username@hostname root"  it's having the same old problem which doesn't matter since it does work as the normal user.

Last edited by brent012 (2012-04-20 14:32:28)

Offline

#21 2012-04-20 14:34:24

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

Right on.  Yes, you should always have a password on your user account: sudo takes the user account password not the root password so it expects something.  Depending on the login manager you are using there is usually a way to configure it to automatically log in if you like that way better.  The command to change your password is:

passwd

Type

man passwd

In a terminal to read all about it!

Once your user account has a password see if the "username@hostname" issue resolves?! smile

Offline

#22 2012-04-20 14:48:44

brent012
Member
Registered: 2012-04-20
Posts: 10

Re: [SOLVED] LXDE menu blank unless root?

headkase wrote:

Right on.  Yes, you should always have a password on your user account: sudo takes the user account password not the root password so it expects something.  Depending on the login manager you are using there is usually a way to configure it to automatically log in if you like that way better.  The command to change your password is:

passwd

Type

man passwd

In a terminal to read all about it!

Once your user account has a password see if the "username@hostname" issue resolves?! smile

You posted while i was editing haha, i added a password and everything is still fine. But strangely if i try and run it while the user that has root permisions or whatever (i.e. it says "username@hostname root") the old problem still persists - but as i said its just weird and doesn't affect anything.

I've got Slim as a login manager atm, it's slow though so i might look at alternatives/not use a login manager at all. Once the terminal gets to the login part it takes a second or two before slim kicks in and the screen goes blank for a couple of seconds and then the login manager comes up. Might not be a problem if i use a splash screen, but it's still a bit annoying.

Once again, thanks for all the help!

Offline

#23 2012-04-20 14:54:13

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] LXDE menu blank unless root?

You're welcome, it was good for me too to brush up on some of the commands we went over! big_smile

Offline

Board footer

Powered by FluxBB