Xfce Forum

Sub domains
 

You are not logged in.

#1 2014-06-21 07:27:23

imstot213
Member
Registered: 2014-06-21
Posts: 2

Couldn't get custom created sub-menu to show up.

Distro : Linux Mint 17 xfce
XFCE version : 4.11.1-2ubuntu1

I am trying to create a custom sub-menu at the same level as the default Accessories, Graphics etc..

My custom Testing1 sub-menu doesn't show up in the application menu. Any help is appreciated.

Below are the steps I did.

I added a .directory file under ~/.local/share/desktop-directories/.
Content of the .directory file :

[Desktop Entry]
Version=1.0
Type=Directory
Name=Testing1
Comment= tst1
Icon=trophy-gold
NoDisplay=false
Categories=X-XFCE;X-Xfce-Toplevel;
StartupNotify=false
Terminal=false

Next, I edited the ~/.config/menus/xfce-applications.menu file and added my custom sub-menu as follows :

<Menu>
<Name>Testing1</Name>
<Directory>testing1.directory</Directory>
<DirectoryDir>/home/drigoi/.local/share/desktop-directories</DirectoryDir>  <!-- With and without this line, both ways doesn't work -->
<Include>
  <Category>X-Testing1</Category>
</Include>
</Menu>

Under the <Layout> paragraph, I added

<Menuname>Testing1</Menuname>

.

Offline

#2 2014-06-21 13:17:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: Couldn't get custom created sub-menu to show up.

Did you add an application to this submenu by creating an application .desktop file? I believe that empty submenus won't show up.

Using your code snippets above and creating an application.desktop file whose categories line reads:

Categories=X-Testing1;

...made the submenu appear on my system.

(Tested on Xubuntu 14.04, Xfce 4.11)


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2014-06-22 09:44:30

imstot213
Member
Registered: 2014-06-21
Posts: 2

Re: Couldn't get custom created sub-menu to show up.

Oh I  didn't. Thanks for the tip. It worked, kudos.

Oh another question. If I want the custom menu to show up for every user, I have to edit the  /etc/xdg/menus/xfce-applications.menu file ?

Thanks and regards.

Last edited by imstot213 (2014-06-22 10:14:16)

Offline

#4 2014-06-22 12:14:16

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 10,949

Re: Couldn't get custom created sub-menu to show up.

imstot213 wrote:

Oh another question. If I want the custom menu to show up for every user, I have to edit the  /etc/xdg/menus/xfce-applications.menu file ?

Mint may have added its own default menu.

locate xfce-applications.menu

...to see where the menu files exist and:

env | grep XDG_CONFIG_DIRS

...to see the order of precedence. For example, in Xubuntu, the file menu at /etc/xdg/xdg-xubuntu/menus is the default one.

Also keep in mind that the user can edit the file menu which will create a new default one in ~/.config/menus. And if one already exists there, it will take precedence.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Board footer

Powered by FluxBB