-1

Ok so I have saved it as test.sh and chmod +x the script.


nmcli con up id myvpn=
/opt/google/chrome/google-chrome %U
geany /home/crunch/downloads/lr.txt

I execute it using terminal however it only connects to the vpn and runs chrome, Geany only executes once I close down chrome, Any suggestions.

Captain Obvlious
  • 19,754
  • 5
  • 44
  • 74

2 Answers2

1

In Linux, paste your lines into a new file and prepend a line with a shebang:

#!/bin/bash
nmcli con up id myvpn
/opt/google/chrome/google-chrome %U
pidgin
geary /etc/crunchbang/notes.txt

Then do a chmod +x filename (replace filename with the name of the file you used), to give it execute permission.

Axel
  • 13,939
  • 5
  • 50
  • 79
0

unix do not need special file extension.

Just put the 4 lines into a file is ok.
Then, chmod u+x the file
so that the file can be executed.

Also, make sure the PATH variable contain the directories storing the programs nmcli, pdgin, geary.

OR, use the full path just like the google-chrome line.

Alvin SIU
  • 1,022
  • 10
  • 28