[Solved] A launcher to launch two applications at a time

Forum rules
Before you post please read how to get help
ra11.10laptop
Level 1
Level 1
Posts: 27
Joined: Mon Dec 05, 2011 10:26 pm

[Solved] A launcher to launch two applications at a time

Postby ra11.10laptop » Thu Jul 19, 2012 4:11 pm

I would like one launcher (in the application menu of cinnamon for linuxmint 13) to launch both eclipse and an android emulator that comes in the tools of the android-sdk

I'd like to launch the emulator with the parameters

Code: Select all

emulator -avd Froyo-AVD -scale .5


Making a menu item with the command

Code: Select all

eclipse & /home/correct/path/to/emulator -avd Froyo-AVD scale .5


launches eclipse but not the emulator even though a menu item with only

Code: Select all

/home/correct/path/to/emulator -avd Froyo-AVD scale .5


actually does launch the emulator

I can't get the emulator to launch at all from a bash shell script, but I can easily be doing it wrong since I'm relatively new to Linux

Can anyone help?
Last edited by ra11.10laptop on Sat Jul 21, 2012 2:58 am, edited 1 time in total.

User avatar
xenopeek
Level 23
Level 23
Posts: 19016
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: A launcher that can launch two applications at a time

Postby xenopeek » Thu Jul 19, 2012 4:58 pm

Moved here by moderator

Try instead:

Code: Select all

(eclipse &); /home/correct/path/to/emulator -avd Froyo-AVD scale .5

The parenthesis lauch eclipse in a subshell, and the ampersand makes it launch in the background. The emulator can then also be launched immediately.

If it doesn't work, you may have to explicity start it with bash, as in:

Code: Select all

bash -c "(eclipse &); /home/correct/path/to/emulator -avd Froyo-AVD scale .5"
Image

ra11.10laptop
Level 1
Level 1
Posts: 27
Joined: Mon Dec 05, 2011 10:26 pm

Re: [Solved] A launcher to launch two applications at a time

Postby ra11.10laptop » Sat Jul 21, 2012 2:59 am

Thank you. This worked:

Code: Select all

bash -c "(eclipse &); /home/me/android-sdks/tools/emulator -avd Froyo-AVD -scale .5"


Return to “Scripts & Bash”

Who is online

Users browsing this forum: No registered users and 1 guest