[HOW TO] Graphically edit Xfce/Xubuntu Applications Menu
Xfce/Xubuntu Applications Menu is a panel plugin that displays a menu that allows access to installed applications.
The items on the menu can be edited using one tool called Alacarte. Alacarte can be access at Applications Menu > Settings > Main Menu or just type alacarte
in the command line (or in xf4run).
The Main Menu editor has 3 main sections: Menus list (left), Items list (center) and Action buttons (right).
The Menus list sorts applications by category. Each menu can hold items and other menus (a menu has to possess at least one item to be displayed). The available action buttons for menus are "New Menu" and "New Item", and their name is self-explanatory.
The Item list displays the list of application launchers for the selected menu/category. Items can be moved up and down on the list and their attributes (name, command...) can be edited using the "Properties" action. Items can also be hidden from the menu using the "Show" checkbox, next to the item's name.
On bottom of the Main Menu editor's (Alacarte) interface there is a button "Revert" that restores the default menu layout.
Adding a separator crashes alacarte. From what i googled, im not the only one. Do you know any solution or how to manually edit the menu? Thanks!
ReplyDeleteTo add a new item it's easy: http://goo.gl/c8ocN
DeleteTo add a separator manually, however, it's more cumbersome:
- The file you need to edit is ~/.config/xfce/menus/xfce-applications.menu
- Inside the first "Menu" element create a new "Menu" element (if it doesn't exist) for the category you wish to add the separator in.
- The structure for the new "Menu" element is:
<Menu>
<Name>CATEGORY</Name>
<Layout>
<Filename>SOME_APP.desktop</Filename>
<Separator/>
<Merge type="all"/>
</Layout>
</Menu>
- Replace CATEGORY and SOME_APP
- /usr/share/applications is a good place to find the correct SOME_APP.desktop
- The important thing to retain is: the "Separator" element needs to be inside the "Layout"
- You can place more "Filename" elements above the "Separator"
Well, I summarized the process the best I could. Please let me know if you need further assistance.
The only xfce-applications.menu ive got is in /etc/xdg/xdg-xubuntu/menus (there's another in /xfce4 but i am using xdg-xubuntu). I just had to add . Thanks very much again!
ReplyDeleteThe one in ~/.config/xfce4/menus didn't exit because you haven't used alacarte to edit the menu yet. Then it would add it and add a line saying that the file should be merged with /etc/xdg/xdg-xubuntu/menus
ReplyDeleteYou can edit either one, but editing /etc/xdg/xdg-xubuntu affects all users, whereas the other one only affects your user.
Im still not able to add folders (like settings, accessories) or separators but i can edit items inside them.
ReplyDeleteI get the following message:
Traceback (most recent call last):
File "/usr/share/alacarte/Alacarte/MainWindow.py", line 330, in on_new_separator_button_clicked
self.editor.createSeparator(parent, after=after)
File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 237, in createSeparator
self.__positionItem(parent, ('Separator',), before, after)
File "/usr/share/alacarte/Alacarte/MenuEditor.py", line 661, in __positionItem
current = parent.contents.index(item)
ValueError: ('Separator',) is not in list
^CTraceback (most recent call last):
File "/usr/bin/alacarte", line 37, in
main()
File "/usr/bin/alacarte", line 34, in main
app.run()
File "/usr/share/alacarte/Alacarte/MainWindow.py", line 76, in run
gtk.main()
The only way i found was by editing /etc/xdg/xdg-xubuntu/menus
Can you give me a hand please?
I'm using Xubuntu 12.10 (Xfce 4.10 and alcarte 3.5.5) and I am able to add separators and submenus.
DeleteThank you, this was helpfull!
ReplyDelete