The LXDE menu is created from the .desktop text files stored in /usr/share/applications; the details of how these files are structured are given by standards.

So changing the menu for one user, will change the menu for all users on that computer using LXDE, or any other menu that relies on those files.

Unfortunately, I can only work out how to do this manually with leafpad…

For example, to add a root user PCManFM file manager to the menu, I did the following:

In Terminal: gksudo pcmanfm
Browse to /usr/share/applications
Find the PCMan File Manager icon
Right-click on the icon, and select "Open with… Leafpad"
Change the following details:

Name=Root user File Manager
Exec=gksudo pcmanfm /

Then Save as… gksudopcmanfm.desktop

This should create a new menu entry with the same folder icon as PCManFM in the System Tools menu labelled Root user File Manager, which opens PCManFM as the root user. This is useful to allow you to browse these files and edit them without needing to return to the Terminal to invoke (gk)sudo each time.

I found that copying and pasting a similar .desktop file to create new menu entries is the simplest way to acheive your goal; select one in the same sub-menu, and then just edit the relevant details. Name (text in menu), Exec (location of executable binary), Icon (icon in menu) and Categories (sub-menu category) are perhaps the most important factors.

If you have entries you want to remove, you can either just delete the relevant .desktop file from /usr/share/applications (perhaps move it somewhere else for safe keeping), change the .desktop suffix to something like .desktopbkp, or add an extra line to the end of the .desktop file:
OnlyShowIn=KDE; - This means it will only be shown in the KDE environment (i.e. not in LXDE); other options include XFCE, GNOME or ROX instead of KDE; don't forget the ; at the end.
NoDisplay=true - This will remove it from all menus (perhaps the most appropriate option).
After each creation of or change to a .desktop file, you need to log out, and then log back in to make the changes stick.

If you want to move a menu entry to another submenu, just change the line:
Categories=xxx; - Don't forget the ; at the end - all lists require a semi-colon at the end.
Where xxx is Network, System, Settings, Graphics, Development or Utility (appears as Accessories); just delete all the other entries.

If you want to change the icon in the menu, just copy your chosen icon to /usr/share/app-install/icons and change the Icon=xxx.png line to refer to the full path of your chosen icon (i.e. Icon=/usr/share/app-install/icons/xxx.png)

Perhaps someone will create a GUI to simplify editing .desktop files to personalise your menu… It appears that the LXDE developers already had that thought.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License