Xfce Forum

Sub domains
 

You are not logged in.

#1 2010-07-17 17:48:18

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Customize xfce-menu (for one user)

Hello,
I've used xfce for 2 years, I'm today on xfce 4.4.2 on Debian Lenny (5).

I read subjects to customize the xfce menu, editing the *.desktop files

My problem is to customize the menu for each user. I don't want to modify the *.desktop in /usr/share/applications/.

I tried to create new *.desktop in ~/.local/share/applications/  (cf http://wiki.xfce.org/howto/customize-menu)
But this method doesn't work.
If I modify the "Name" or I add "NoDisplay=true", the entry in menu won't change. (It works if I edit the file in /usr/share/applications).

Has anybody an idea?

Thanks

Offline

#2 2010-07-21 17:12:43

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Customize xfce-menu (for one user)

It's easier just to copy the .desktop files from /usr/share/applications/, to ~/.local/share/applications/ and edit them from there. That way, you know the filenames are identical (so the local one is recognised as an override for the global one) and all the information the launcher needs to work, is already there; you don't have to recreate all the necessary details; you just have to alter the attributes you want.

As for locally changing the structure of the menu, you want to copy /etc/xdg/menus/xfce-applications.menu to ~/.config/menus/ and edit from there.

Offline

#3 2010-07-23 20:13:28

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Re: Customize xfce-menu (for one user)

OK, thanks. I copied the desktop file and edit it. But I found something strange.

If I modify the "Name" in the locale file, the name in the menu will be modified.
If I add "NoDisplay=true" in the locale file to hidden the entry, the entry will still appear but with the name of the global file...

I don't understand this and so, I can't hidden entry in menu. :-|

Offline

#4 2010-07-24 05:55:44

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Customize xfce-menu (for one user)

That shouldn't be happening. Try adding Hidden=true to the bottom of the file.

Offline

#5 2010-07-24 07:53:15

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Re: Customize xfce-menu (for one user)

I add "Hidden=true" but the old entry still appears.

for example :
This is my global file (/usr/share/applications/sun-java5-controlpanel.desktop):

[Desktop Entry]
Encoding=UTF-8
Name=Sun Java 5.0 Plugin Control Panel
Comment=Sun Java 5.0 Plugin Control Panel
Exec=/usr/lib/jvm/java-1.5.0-sun-1.5.0.22/bin/ControlPanel
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/sun-java5.xpm
Categories=Application;Settings;

And this is my local file (~/.local/share/applications/sun-java5-controlpanel.desktop) :

[Desktop Entry]
Encoding=UTF-8
Name=A new name
Comment=Sun Java 5.0 Plugin Control Panel
Exec=/usr/lib/jvm/java-1.5.0-sun-1.5.0.22/bin/ControlPanel
Terminal=false
Type=Application
Icon=/usr/share/pixmaps/sun-java5.xpm
Categories=Application;Settings;
NoDisplay=true
Hidden=true

And my menu :
100724095102104127.png

Offline

#6 2010-07-24 09:17:18

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Customize xfce-menu (for one user)

Like I said, I don't know why that's happening. It doesn't happen on my system.

What happens if you revert back to the original name, or remove everything from the local file, except for:

[Desktop Entry]
NoDisplay=true
Hidden=true

Offline

#7 2010-07-24 09:41:27

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Re: Customize xfce-menu (for one user)

Unfortunately,nothing changes when I do theses actions...  :-|

Offline

#8 2010-07-24 10:52:03

etnlWings
Member
Registered: 2007-10-30
Posts: 218

Re: Customize xfce-menu (for one user)

Well I'm out of ideas. Maybe 4.4's menus don't support that part of the freedesktop spec. Sorry.

Offline

#9 2010-07-25 06:17:27

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Re: Customize xfce-menu (for one user)

OK.
If I find something, I will post.

Thanks.

Offline

#10 2010-07-26 15:51:31

the98
Member
Registered: 2009-11-10
Posts: 62

Re: Customize xfce-menu (for one user)

I don't think it will work if you edit your desktop files in your home directory, but don't edit them in /etc/share/applications/
I think that by doing that, xfpanel will read both .desktop files, the ones located in your home, and the ones located in /etc/...

What you need to do is edit the files in /etc/... and then create a .desktop in the user you want the entry to be shown. For example, let's say you don't want Iceweasel's menu entry in your user, but you want that entry in the rest of the users. You need to make it hidden in /etc/... so that no user will have this entry, and then create .desktop files in the home directory of the users where you want Iceweasel's entry to be present.

Cheers.

Offline

#11 2010-07-31 12:50:51

sabozzz
Member
From: Flandres (France)
Registered: 2010-04-30
Posts: 6

Re: Customize xfce-menu (for one user)

OK, it works. But I need although edit the files in /etc/...

Thank you for your post.

Offline

Board footer

Powered by FluxBB