Personal Application Launchers

Personal Application Launchers

Wikis > Personal Application Launchers

Personal Application Launchers

Application launchers are central to the Moksha window management system. The control, among other things, which menu (if any) lists an application, and how that application is to be run. Application launchers are also called ‘desktop configuration files’, and they have the extension .desktop. You can see these files at /usr/share/applications.

Personal application launchers are .desktop files that you create yourself. These are not stored in the above folder but in your Home directory at .local/share/applications. (Folders beginning with a ‘.‘ are hidden folders; to see them, open your file manager and press Ctrl+H.)

Example 1: Disabling the touchpad at startup

Suppose you normally use your laptop computer with a mouse, and you wish to disable the touchpad. One way is to create a personal application launcher which runs the TouchPadOff command, and then to add that launcher to your list of startup applications. Here are the steps in detail:

1.  Open the Personal Application Launcher dialog box (Main menu > Settings > Settings Panel > Apps > Personal Application Launchers).

2.  Click Add, and the Desktop Entry Editor opens. Make the entries shown in the screenshot below, i.e. enter a suitable name (e.g. Touchpad Off), and, in the Application field, the command which turns off the touchpad:
synclient TouchPadOff=1
(Type in the command exactly as shown, or copy-and-paste it.)

Desktop Entry Editor

3.  Click on the General tab and in the Categories field enter Settings. (This will add your launcher to Applications > Preferences.)

4.  There is no need to change anything in the Options section (i.e. leave the first time items unticked but Show in Menus ticked).

5.  Click Apply, and your personal application launcher will be saved in the .local/share/applications folder.

6.  Now check that your application works: go to Main menu > Applications > Preferences, click on its entry, and try the touchpad.

7.  If this test is successful, you can close the dialog box, otherwise, correct your entries as necessary.

8.  To add this application to your Startup Applications, go to the Main menu > Settings > All > Apps > Startup Applications. At the Startup Applications dialog box, click on the Applications tab, scroll down the list applications and highlight yours, click Add, then click OK.

(To turn the touchpad on again, press Alt+Esc to Run Everything, and enter the command synclient TouchPadOff=0)

Example 2: Launching an Installed App

see: Create Desktop Icon – For an Installed App

Example 3: Launching PCManFM (to open a folder)

see: Create Desktop Icon – For a Folder

Example 4: Launching Conky

For details see: Create Desktop Icon – For an Installed App, substituting Name with Conky and Application with /usr/bin/conky.

In summary, open the Desktop Entry Editor (Main Menu > Settings > Settings Panel. Maximise the Settings window, then select  Apps > Personal Application Launchers.  From there click Add and enter the details below and click Apply then Close:

  • Name: Conky System Monitor
  • Application: /usr/bin/conky

The above will have created a new Application under Main Menu > Applications > Other > Conky System Monitor

Application launcher arguments

If you examine the application launchers at /usr/share/applications (by opening them in a text editor such as Leafpad), you will see that many applications are launched with an argument, often %U or %f. These two arguments control the number of files that can be passed to the application – one, in the case of %f, multiple files in the case of %U.

Thus if you examine the Desktop Entry Editor for Leafpad, you will see that it is launched with the %f argument, whereas Leafpad, which has tabs and can therefore handle multiple files, is launched with the command Leafpad %U.

For more information on these and other arguments see https://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html.

Category: