FAQ > OS > HOW TO > SHORTCUT > MENUS

MENUS
Create your own menus and sub menus off the main menu and add your own shortcuts / launchers / .desktop entry files to them. This page will show you how to make global menus; ones available to all users.

Your Menu

Start by creating the menu itself. Right-click any empty space on the Desktop and choose Create New... Empty File. Save the file as your-menu.menu Then open the file with Leafpad. Right-click it and choose Leafpad. Copy and paste the following into it:

     <Menu>
       <Name>Applications</Name>
       <Menu>
         <Name>Your Menu</Name>
         <Directory>your-menu.directory</Directory>
         <Include>
             <Category>Your-Menu</Category>
         </Include>
       </Menu> <!-- End Your-Menu -->
     </Menu>

Save and "X" out of the file. Right-click and Cut the menu. Go to Menu --> System Tools --> LXTerminal (or Ctrl+Alt+T) and type: gksu pcmanfm to open the file manager as root. Navigate to /etc/xdg/lubuntu/menus/applications-merged [you'll see our christian.menu already there] and paste.

your menu in applications-merged

The rest of the time will be spent in the /usr/share directory. Make a folder in /usr/share/ called your-menu and another inside that named your-folder.

your-menu, your folder

Now, inside your-folder, add a shortcut. Create New... Empty File. Save the file as shortcut.desktop, then right-click it and choose to open it with Leafpad. Copy and paste the following text into it:

[Desktop Entry]
Type=Application
Terminal=false
Name=Shortcut
Exec=whatever /you/want/a/shortcut/to
Icon=/usr/share/icons/Your-Menu/shortcut.png
Categories=Your-Menu;
Comment=Dektop Entry File

Save and "X" out of the shortcut. Now, add the icons for everything; the menu, the sub-menu and both shortcuts inside. Navigate to /usr/share/icons. Right-click and choose Create New... Folder and name it Your-Menu. Paste the following icons inside:

category icon folder icon
shortcut icon whatever icon

Make two more shortcuts; Your Folder and Webpage. Go to usr/share/applications, Right-click an empty space and choose Create New... Empty File. Save the file as webpage.desktop, then right-click it and choose to open that with Leafpad. Finally, copy and paste the following text into it:

[Desktop Entry]
Type=Application
Terminal=false
Name=Webpage
Exec=firefox http://www.whatever-wherever.com/
Icon=/usr/share/icons/Your-Menu/whatever.png
Categories=Your-Menu;
Comment=Website

Save and "X" out of that shortcut. Right-click an empty space in that folder again and choose Create New... Empty File. This time save the file as your-folder.desktop, then right-click it and choose Leafpad. Finally, copy and paste this text into it:

[Desktop Entry]
Name=Your Folder
Exec=pcmanfm -n /usr/share/your-menu/your-folder/
Comment=Directory
Icon=/usr/share/icons/Your-Menu/folder.png
NoDisplay=false
Categories=Your-Menu;
Terminal=false
Type=Application
StartupNotify=true

Save and "X" out of the shortcut. See what you've come up with. It should be there already, but if not; enter lxpanelctl restart in LXTerminal, or log out and log back in. If you still don't see the menu, restart.

Your Menu





MENU EXAMPLE

The following menu was created for guests of a Family Promise affiliate to provide quick access to community resources (Family), churches they'll stay in (Hosts), places to look for employment (Work) and the Zoho mail email login page.

Family Promise Menu Icon
 
We began by creating a Family Promise menu icon (above) named Family-Promise-Menu.png that matched the default icons in the main menu, yet would still stand out. We saved this and many other icons / images in a folder inside /usr/share/icons called Family-Promise.

Hosts directory

The following text made up the family-promise.menu we saved in /etc/xdg/lubuntu/menus/applications-merged:

    <Menu>
      <Name>Applications</Name>
      <Menu>       
        <Name>Family Promise</Name>     
         <Directory>family-promise.directory</Directory>
         <Include>
             <Category>Family-Promise</Category>
         </Include>
       </Menu> <!-- End Family-Promise -->
     </Menu>


We created a family-promise folder in /usr/share, which in turn, contained the folders of family, hosts and work. Inside those folders, were the appropriate website shortcuts (we also added bookmarks in the Bookmarks Toolbar of Firefox that would take Family Promise guest to the same websites).

Family directory

We created the family-promise.directory in /usr/share/desktop-directories with the following text:

[Desktop Entry]
Type=Directory
Encoding=UTF-8
Name=Family Promise
Comment=Cheyenne WY
Icon=/usr/share/icons/Family-Promise/Family-Promise-Menu.png

The sub-menus opened windows (folders / directories) containing shortcuts to the website categories that corresponded to the sub-menu names.

Work directory

The Family Promise menu is easy for guests to use:

Family Promise menu in action

Note: to avoid guest distraction and prevent abuse; Internet apps were removed, all bookmarks (other than the ones shown above) were deleted and these machines were whitelisted.


MORE INFO See Adding LXDE start menu sections (or “sub-menus”) and Adding LXDE start menu entries and desktop shortcuts on The skiing cube. Openbox Root Menus, Sub-Menus, Pipe Menus on Debian Linux Openbox Guide. Also see the GUI application MenuLibre on it's homepage and / or watch the video How to install MenuLibre on Ubuntu 16.04 on YouTube.




Top