0

I just wanted to create a script that opens Teamspeak. I was on here before about that, but I thought it would be more simple by just creating a script.

I wanted to make a script to launch the script that opens Teamspeak.

So I did this:

#!/bin/bash
exec /home/austin/Programs/Teamspeak/launch(what I renamed the file to for ease).sh

I named this Teamspeak.sh and it didn't work. The thing that is frustrating is that it works if I go into terminal on the Desktop and type

./Teamspeak.sh

it works!

How can I get this to work by just double-clicking it?

ElefantPhace
  • 3,281
Kiwi
  • 1

2 Answers2

0

I'm not sure where you're "double clicking" on it but if it's in Nautilus there is a setting in preferences about how to handle executable files. It's on the "Behavior" tab of the preferences dialog.

Speaking of executable, you did chmod to make your script executable right?

No Time
  • 1,073
0

Easy way, right-click Teamspeak.sh on your desktop. Click Properties. Go to Permissions tab, and tick the Execute option at the bottom. Click OK, and now try double-clicking it.

You may have to use dconf-editor if it doesn't ask you if you want to run, or launch it immediately.

If you don't have dconf-editor you can install it by

sudo apt-get install dconf-tools

Then type dconf-editor into your terminal to open it.

Navigate to org ➤ gnome ➤ nautilus ➤ preferences
and look for executable-text-activation

Click the option next to it and choose whether you want to launch or ask

Close dconf-editor and now double-click it.

If you chose launch it'll run your script the same as if it were a program.
If you chose ask it'll prompt you with the options to Run in Terminal, Display, Cancel, or Run

ElefantPhace
  • 3,281