Script do start 2 programs

Forum rules
Before you post please read this

Script do start 2 programs

Postby FidbecK on Tue Nov 20, 2012 4:55 pm

I want to start two programs Apache and MySQL.
Can I create a script to start those two programs instead of going to the Terminal and start one and than the other.
Last edited by xenopeek on Thu Nov 22, 2012 3:40 pm, edited 1 time in total.
Reason: Same subject, so merged this topic here.
FidbecK
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 01, 2012 1:14 pm

Linux Mint is funded by ads and donations.
 

Script to start two programs at once

Postby FidbecK on Wed Nov 21, 2012 11:59 am

Hi there

I want to create a script in Nadia to start 2 programs at once.
How do I do that?
Thanks
FidbecK
Level 1
Level 1
 
Posts: 6
Joined: Thu Nov 01, 2012 1:14 pm

Re: Script to start two programs at once

Postby xenopeek on Wed Nov 21, 2012 1:16 pm

Split from viewtopic.php?f=90&t=91155 and moved here. See the forum rules; new questions deserve new topics and don't reply to support requests older than six months. Thanks :)

Depends on what you mean. Assuming you want to start a program Foo and a program Bar from one script, find how you would start the programs from the command line and then write a script such as:
Code: Select all
#!/bin/bash

(foo </dev/null &>/dev/null &)
(bar </dev/null &>/dev/null &)

You can find how you would start the programs from the command line by looking at the entry in your menu (at least on Cinnamon and MATE you can edit menu entries to look at what command is run for starting the applications).
User avatar
xenopeek
Level 21
Level 21
 
Posts: 14544
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Script do start 2 programs

Postby norm.h on Thu Nov 22, 2012 3:22 pm

Have a look here: viewtopic.php?f=42&t=86813
Item 1b.
Is this what you're looking for?
norm.h
Level 4
Level 4
 
Posts: 205
Joined: Tue Mar 23, 2010 11:45 am
Location: Oxfordshire, UK


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest