Diferenças entre edições de "Menu Principal"

De LXDE.org
Ir para: navegação, pesquisa
(Criou nova página com 'The Menu-plugin is part of the LXPanel and follows the standards of [http://freedesktop.org freedesktop.org]. Unfortunately, LXDE does not provide graphical editing of t…')
(Sem diferenças)

Edição atual desde as 04h00min de 29 de março de 2010

The Menu-plugin is part of the LXPanel and follows the standards of freedesktop.org. Unfortunately, LXDE does not provide graphical editing of the menu yet. This article thus explains how to add new entries to the menu or edit present ones.

*.desktop files

These files are the entrys for the menu, they are placed in:

  • /usr/share/applications
  • /usr/local/share/applications

Creating new ones or editing already existing files requires root-access.

A sample file can look like this:

[Desktop Entry]

This is my warsow.desktop file which I placed in /usr/local/share/applications

Here are the explanations for this file:

  • [Desktop Entry] - indicates that this file is a *.desktop file
  • Encoding=UTF-8 - UTF-8 encoding is used
  • Exec=warsow - path of a binary or script used to start the programm
  • Icon - path to the icon for the entry
  • Type=Application - desktop file is starting an application
  • Terminal=false - the program will not run in a terminal
  • Name=Warsow - displayed name in the menu
  • GenericName=warsow - description of the entry
  • StartupNotify=false - Startup notification is turned off
  • Categories - specifies the categories in which the entry will be placed in the menu (several categories are specified with a semicolon between them, e.g. 'Game;Education')

You can examine more examples in /usr/share/applications

Important for the menu is the 'Categories' key. Here are the most common categories: AudioVideo, Development, Education, Game, Graphics, Network, Office, Settings, System, Utility. There are also specific ones which can be viewed at freedesktop.org

adding entries

First of all, I suggest that you put your new entries in /usr/local/share/applications since packages normally put them in /usr/share/applications and you have a better overview on your self-made entries. Now, to add a new entry become root and invoke the following:

# leafpad /usr/local/share/applications/your-program.desktop

while 'your-program' is obviously your desired program, warsow in my case. You can also use nano or any other terminal based text-editor instead of leafpad if you are more convenient with it. Now you can copy my sample and replace the values with your own ones.

You can also edit already existing entries, e.g. if you want to change the icon. Simply invoke (as root certainly):

# leafpad /usr/share/applications/pcmanfm.desktop

to edit PCManFM for example.