0

I recently learned here how to open a program from the command line.

my question is, how can i make a set of programs open simultaneously with one command entered?

  • Let's have a specific example, please. What programs do you want to start? – roaima Apr 10 '15 at 17:26
  • Kontact and rekonq – Wolfgang Steele Apr 10 '15 at 17:29
0

You can run a program simply by typing its name (and Enter, of course).

To run a program "in the background", giving you control of your terminal again, you can append &.

So:

gvim /etc/hosts    # Runs gvim and waits until it's finished

But:

gvim /etc/hosts &  # Runs gvim and returns control to the terminal

Therefore, this can be used to start three programs, one after the other:

kontact &
rekonq &
something_else &

If you can type fast enough they'll appear to start simultaneously. Or you can put all three commands on the same line, like this, so that the commands are executed only once you hit Enter:

kontact & rekonq & something_else &
  • this all worked well for me except appending "&" which did not reserve active window status in the konsole program, what might be my issue? @ roaima – Wolfgang Steele Apr 10 '15 at 17:35
  • @WolfgangSteele I don't understand what you mean by "reserve active window status"? – roaima Apr 10 '15 at 18:17
  • appending & doesnt leave me in control of the previous terminal, but rather moves focus and control to the created window – Wolfgang Steele Apr 10 '15 at 18:22
  • @WolfgangSteele That's a function of your window manager. – roaima Apr 10 '15 at 18:25
  • so im assuming i need to edit that from the window manager settings? or should i get a better one? not sure which one mine is, what is the name of yours where it works? – Wolfgang Steele Apr 10 '15 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.