Help create custom application launchers

Hi everyone, I would like to ask you something I use Manjaro kde and I would like to ask how I can create launchers for certain applications? I have two programs in jar that I would like to start with a click and put them in the taskbar can you help me? Thanks

In the one case I had to do this I used 2 files - a start script for running the things, and a desktop file for the Application Launcher compatible entry.

So we will use the example dust which is a free game run using java that comes in a .jar.

Consider the following directory (the path is not really important);

~/Games/Dust

In which we have a few files.

dust_v0.5.1.jar
dust.ico
start.sh

start.sh contains only the shebang making it a script and the line launching the jar;

#!/usr/bin/bash

java -jar dust_v0.5.1.jar

Great … you can launch the jar using the script.

For the Application Launcher we want to create a Desktop file (this path is important).

~/.local/share/applications/dust.desktop

Which should contain something like
( use full paths in desktop files, language, replace $USERNAME )

[Desktop Entry]
Comment[en_US]=Dust java game
Comment=Dust java game
Exec=/usr/bin/bash /home/$USERNAME/Games/Dust/start.sh
Icon=/home/$USERNAME/Games/Dust/dust.ico
Name[en_US]=dust
Name=dust
StartupNotify=false
Terminal=false
Type=Application
Version=1.0
X-KDE-SubstituteUID=false

You can probably see here that you really dont need the start.sh at all, and could put your execution arguments directly in the .desktop file. But the are shown separate here because that can be useful as well.

1 Like

Tutorials

Use kmenuedit (or your DE’s equivalent if you aren’t using Plasma) to create new menu entries. (It’s pretty intuitive, at least in Plasma).
Then you can drag the new entries from the main menu onto a panel.

Even simpler still: start the application from the menu, and then right-click the entry on the task manager and choose “Pin to Task Manager”.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.