LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-25-2016, 10:23 AM   #1
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Question How to open many programs at once from the terminal?


Hi.

I want to open many programs at once from the terminal. I will then put this into an alias command as I almost always open these same apps on PC startup.

I tried this but for some reason the first program does not open but all the others open fine.

Code:
chromium-browser & firefox & quiterss & telegram & thunderbird & exit
What am I doing wrong?

Thanks.
 
Old 06-25-2016, 10:40 AM   #2
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-current
Posts: 1,023
Blog Entries: 3

Rep: Reputation: 293Reputation: 293Reputation: 293
How to open many programs at once from the terminal?

Does it launches while alone ?
 
Old 06-25-2016, 10:43 AM   #3
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Quote:
Originally Posted by Tonus View Post
Does it launches while alone ?
Hi Tonus.

You mean if I just do this? Yes.

Code:
chromium-browser
 
Old 06-25-2016, 11:06 AM   #4
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Even if I run this, Chromium does open but not if I run the command from the first post.

Code:
chromium-browser & exit
 
Old 06-25-2016, 12:35 PM   #5
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 5,871

Rep: Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169Reputation: 2169
If I were going there, I wouldn't start from here! Why not just add those programs to the list in the "startup applications" utility in your desktop?
 
Old 06-25-2016, 01:41 PM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 18,394
Blog Entries: 12

Rep: Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621
^ good point.

anyhow, you might want to post the exact alias and waht shell you're using.

i just tried this:
Code:
alias all='urxvt & urxvt & urxvt & urxvt & exit'
and it opens 4 terminals, while closing the one i am calling this from.
i'm using bash 4.3.42
 
Old 06-25-2016, 01:44 PM   #7
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Quote:
Originally Posted by ondoho View Post
^ good point.

anyhow, you might want to post the exact alias and waht shell you're using.

i just tried this:
Code:
alias all='urxvt & urxvt & urxvt & urxvt & exit'
and it opens 4 terminals, while closing the one i am calling this from.
i'm using bash 4.3.42
Hi ondoho.

I use bash. The exact alias is:

Code:
alias apps=chromium-browser & firefox & quiterss & telegram & thunderbird & exit # Daily Apps
All programs open except Chromium browser.

Last edited by linustalman; 06-25-2016 at 01:45 PM.
 
Old 06-25-2016, 01:45 PM   #8
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Quote:
Originally Posted by DavidMcCann View Post
If I were going there, I wouldn't start from here! Why not just add those programs to the list in the "startup applications" utility in your desktop?
Hi Dave.

I'd rather not have to make multiple startup entries if I can use 1 alias command.
 
Old 06-25-2016, 01:48 PM   #9
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Lightbulb

As ondoho showed earlier, this seems fine with the single quotes added:

Code:
alias apps='chromium-browser & firefox & quiterss & telegram & thunderbird & exit' # Daily Apps
 
Old 06-27-2016, 07:40 PM   #10
replica9000
Senior Member
 
Registered: Jul 2006
Distribution: Debian Unstable
Posts: 1,065
Blog Entries: 2

Rep: Reputation: 227Reputation: 227Reputation: 227
It could be possible that even though running "chromium-browser & exit" from the terminal works fine, running it from an alias won't, because the dash might be causing the issue. So when it's run from the alias, it's seen as "chromium -browser & exit" Depends on the shell you're using.
 
Old 06-27-2016, 08:03 PM   #11
sgosnell
Senior Member
 
Registered: Jan 2008
Location: Baja Oklahoma
Distribution: Debian Stable and Unstable
Posts: 1,943

Rep: Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538Reputation: 538
The separator you want is a semicolon, not an ampersand.

Last edited by sgosnell; 06-27-2016 at 08:05 PM.
 
Old 06-28-2016, 03:01 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 18,394
Blog Entries: 12

Rep: Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621Reputation: 5621
Quote:
Originally Posted by sgosnell View Post
The separator you want is a semicolon, not an ampersand.
no.
op wants to open all of these apps at once; with a semicolon it would open the next one only after the first one is closed.
 
Old 06-28-2016, 09:41 AM   #13
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Post

Quote:
Originally Posted by replica9000 View Post
It could be possible that even though running "chromium-browser & exit" from the terminal works fine, running it from an alias won't, because the dash might be causing the issue. So when it's run from the alias, it's seen as "chromium -browser & exit" Depends on the shell you're using.
Hi replica9000.

The alias works with the "chromium-browser" dash in it.
 
Old 06-28-2016, 09:41 AM   #14
linustalman
Senior Member
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 11 (Bullseye) x64
Posts: 4,902

Original Poster
Rep: Reputation: 458Reputation: 458Reputation: 458Reputation: 458Reputation: 458
Quote:
Originally Posted by ondoho View Post
no.
op wants to open all of these apps at once; with a semicolon it would open the next one only after the first one is closed.
Hi ondoho.

Exactly.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile error in Terminal when I open Terminal in Ubuntu secman110 Linux - Software 2 10-30-2013 12:00 AM
how to run a terminal command that will open in a new terminal automatically floorripper Linux - General 5 06-18-2013 04:36 AM
[SOLVED] Change terminal for Thunar: 'Open Terminal Here' custom action.... andrew.46 Slackware 2 01-17-2012 06:46 AM
fluxbox user menu open terminal with root programs? darkleaf Linux - Software 2 10-14-2004 06:44 AM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration