0

The following command from terminal works perfectly:

sh /home/flux/Downloads/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh

How would I go about adding this as a shortcut, so I can open teamspeak from my Unity Launcher panel on the left without using the terminal?

Jacob Vlijm
  • 85,475

1 Answers1

2

In its most basic form:

create a .desktop file (paste the text below in an empty file):

[Desktop Entry]
Name=Start Teamspeak
Exec=/bin/bash /home/flux/Downloads/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Icon=/path/to/your/icon
Type=Application

save the file as team.desktop in ~/.local/share/applications and drag it from there on to the launcher.

Explanation

Running scripts from a .desktop file

If you run a script in the Exec= line from a launcher like this, it works like in the terminal:

  • If the script is not executable:

    language /path/to/script.language_extension
    
  • If the script is executable, just:

    /path/to/script.sh
    

    If the script is executable, the language extension is not strictly needed. However, if you use it on the file, also use it in the command.

Running more complicated shell commands from a .desktop file

Exec=/bin/bash -c "your_complicated_command_here"
(command inside quotes)
Jacob Vlijm
  • 85,475