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

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
ra11.10laptop

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

Post by ra11.10laptop »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29606
Joined: Wed Jul 06, 2011 3:58 am

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

Post by xenopeek »

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

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

Post by ra11.10laptop »

Thank you. This worked:

Code: Select all

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

Return to “Scripts & Bash”