paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

jessie: unable to edit menus as user Pi

Wed Apr 20, 2016 7:05 pm

I have been trying to add /edit menu items using the option from the menu (editor) as user Pi.

I can bring up options and add them, but they won't stick.

Looking at the directory in which the *.desktop files reside, I can see that they are all owned by user root.
This means that user Pi cannot edit them, as X has been started as Pi, without sudo rights.

Obviously, the files can be edited from a terminal using 'sudo nano', but that kinda defeats the object.

Can anyone else confirm this?

And is this how it was meant to work?
It has been my custom to use Xeyes

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: jessie: unable to edit menus as user Pi

Wed Apr 20, 2016 7:08 pm

I had the same issue. (I was trying to create and add images/files to a dir in /usr/local/)

Code: Select all

gksu pcmanfm
Will allow you to edit the contents via file manager as 'root'. My understanding is the only dir 'pi' user has ownership of is /pi/.
DNPNWO

User avatar
jojopi
Posts: 3268
Joined: Tue Oct 11, 2011 8:38 pm

Re: jessie: unable to edit menus as user Pi

Wed Apr 20, 2016 7:40 pm

paulie wrote:Looking at the directory in which the *.desktop files reside, I can see that they are all owned by user root.
Name "the directory in which the *.desktop files reside". (Such files exist in at least a dozen places.)

The way things are supposed to work is that if a change will affect every user, only root can make that change. If it solely affects the current user, no special privilege is required.

Most applications read two sets of configuration; the system-wide one in /usr or /etc, and the per-user one in ~/.SOMEWHERE.

It is possible to add to LXDE menus on a per-user basis by creating *.desktop files in ~/.local/share/applications/. Unfortunately LXDE has no good interactive menu editor, so this has to be done by editing text files. I am not sure it is worth the effort.

For more gory details: http://wiki.lxde.org/en/LXDE:Questions# ... in_menu.3F

(It can be a bad idea to edit system-wide files. Apart from the risk of breaking the whole system, there is also the problem that many such files belong to the packaging system and could be reverted by a future apt-get command.)

User avatar
Rive
Posts: 586
Joined: Sat Mar 26, 2016 5:21 pm
Location: USA

Re: jessie: unable to edit menus as user Pi

Wed Apr 20, 2016 8:06 pm

(It can be a bad idea to edit system-wide files. Apart from the risk of breaking the whole system, there is also the problem that many such files belong to the packaging system and could be reverted by a future apt-get command.)
Exactly.

That is why when I made changes to my menu settings /desktop preferences/etc, I created a new dir in /user/local/ (instead of making changes in /user/share/).

I copied over what i wanted from user/share/ to the new /local/ directory, added the new content, gave it the same dir name, and that was it. Done. Easy Peasy.
DNPNWO

Return to “Troubleshooting”