13

I'm making a shell script that will start bunch on programs that l mostly use. I wants commands for them the programs are- 1. skype 2. sublime-text 3. google-chrome 4. Beyond-comopare 5. scudCloud 6. Lampp

i've found some of them-

#! /bin/sh
sudo service mysql stop
sudo /opt/lampp/lampp start
sudo /usr/bin/skype start
sudo /usr/bin/subl start
sudo google-chrome

I know the application can be set from startup application also but i need to run some command also.

After running command bash shell script will run.

2 Answers2

9

Your script with further two entries:

$ cat launchscript.sh
#! /bin/sh
sudo service mysql stop
sudo /opt/lampp/lampp start
sudo /usr/bin/skype start
sudo /usr/bin/subl start
sudo google-chrome
sudo scudcloud 
sudo bcompare

Make it executable:

sudo chmod +x launchscript.sh

Run it:

./launchscript.sh
h0ch5tr4355
  • 664
  • 9
  • 20
  • If $ scudcloud or $ bcompare doesn't work, you have installed/configured the programs wrongly. – h0ch5tr4355 Oct 08 '15 at 09:21
  • This are not proper commands to start those application, sudo /opt/lampp/lampp start sudo /usr/bin/skype start sudo /usr/bin/subl start. – Gaurav Gandhi Oct 08 '15 at 09:35
  • @ErrHunter I do not know anything of his configurations and so i just added the two cmds for the missing programs, seemed to work however – h0ch5tr4355 Oct 08 '15 at 10:10
  • You can even use this to open the exact same files, i.e.: xdg-open /path/to/your/file Also remember that some programs enable you to save your session/project which you can load later. – user30850 Feb 06 '23 at 04:58
0

Put the script to run all the services inside init.d directory to make them run at startup.

Bidyut
  • 759
  • 7
  • 14
  • i don't want them to run on startup i want to create a .sh file so that when ever i run that file the programs and command runs, i have found commands for some of them and i want commands for beyond-compare and scudcloud – Sparsh Pipley Oct 08 '15 at 09:11
  • Your question is unclear. if you want to run the services when you are running the script, then the script you have written will work. – Bidyut Oct 08 '15 at 09:18
  • after running command bash shell script will run. – Sparsh Pipley Oct 08 '15 at 09:20