Can I Create a .desktop Launcher For a Shell Script?

Hello,

Can I create a .desktop launcher for a shell script?

Hi
Sure, just use the full path if it’s not in a system directory eg /usr/bin etc

Here is an example one;


cat ~/.local/share/applications Arduino.desktop

[Desktop Entry]
Name=Arduino
Comment=Arduino integration environment tool
Version=1.0
Icon=/home/malcolml/.icons/Arduino_Logo.svg
Exec=/home/malcolml/bin/arduino
Type=Application
Terminal=false
Encoding=UTF-8
Categories=Development;IDE;

cat ~/bin/arduino

#!/bin/sh
cd ~/data/makeblock/arduino && exec ./arduino $*

If you do it in KDE, select the Advanced options in the Applications tab and check Run in terminal.