Menu entry with arguments

I want to change the command of the menu entry of teamspeak 3 to this one:
"/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh"
When i do this the menu entry vanishes.

I didn't have a teamspeak 3 menu entry now.
How can i prevent this?

To prevent confusions:
Yes "/home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh" is a parameter for /media/HDD/Nextcloud/Audioquelle.sh

Hi there :slight_smile:
It means that there is a typo somewhere.
You can edit it back, the file should be inside /usr/share/applications/ (need root privileges to edit)
Make sure that your /media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh works and it's executable :

chmod +x /media/HDD/Nextcloud/Audioquelle.sh
chmod +x  /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh

Good luck :slight_smile:

No, the file (or files, i tested it serveral times because i couldn't believe it) is not in the folder.
Yes i tested it in the terminal and it works fine...

The files are in
~/.local/share/applications/

Otherwise, create one new :slight_smile:

Let's say /usr/share/applications/teamspeak.desktop

[Desktop Entry]
Type=Application
Name=Run special teamspeak
Terminal=false
Exec=/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Icon=/usr/share/icons/youricon.png
MimeType=application/x-executable;

You can chose a icon to be used, this should work if your scripts have executable flag.
You can insure it :

ll /media/HDD/Nextcloud/Audioquelle.sh
ll /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh

Should be looking like -rwxr-xr-x (the x is importent here).

Keep us updated :slight_smile:

The file is in ~/.local/share/applications/
But i didn't understand why it is not shown in the menu or menu editor...

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon=/home/jokergermany/Downloads/iconfinder_teamspeak_logo_4177738.png
Icon[de_DE]=/home/jokergermany/Downloads/iconfinder_teamspeak_logo_4177738.png
Exec=/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh
Name[de_DE]=Teamspeak 3
Comment[de_DE]=TS3
Name=Teamspeak 3
Comment=TS3

-rwxrwxr-x 1 jokergermany jokergermany 165 Jan 18 13:48 /media/HDD/Nextcloud/Audioquelle.sh*
-rwx------ 1 jokergermany jokergermany 1328 Apr 17  2019 /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh*

Try like this :

Exec="/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh"

I tested both.
Do i have anything to restart for letting it reappearing?

You need to restore it's original content for that.
The icon will disappear if there is a typo or a permission issue inside it.

Try like this so :

Exec=sh - C "/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh"

I just done a test my side and got it working :

[Desktop Entry]
Type=Application
Name=Run test      
Terminal=false
Exec=sh - C "/opt/microscope /opt/mouse"
Icon=/usr/share/icons/circuit.png
MimeType=application/x-executable;

image

The icon is reappearing then, but i only get a "sh is getting startet", but then it disappears and nothing happened.
Error when i try to start it in the terminal:

sh -C "/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh"
sh: 0: Can't open /media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh

€dit:
lower case c

This works:

sh -c "/media/HDD/Nextcloud/Audioquelle.sh /home/jokergermany/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh"
1 Like

my bad ! I done 2 mistakes - C is not correct, -c is correct :slight_smile:
I done copy paste, Strange xD Sorry :slight_smile: