Launch multiple apps with single click

Here you can exchange scripts that you created or have permission to share with other users.
Post Reply
Message
Author
User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Launch multiple apps with single click

#1 Post by Jerry3904 »

I answered a post on this topic on the Xfce Forum yesterday using an AskUbuntu post, and OP said it worked. So I thought I would add it to the Wiki, and wrote this entry:
Launch multiple programs with a single click

1. Create a new script listing the items that you want to launch, following this example:

Code: Select all

#!/bin/bash

/opt/firefox/firefox &
/usr/bin/Thunar &
/usr/bin/thunderbird &

exit 0
Be sure that the paths and names are correct. Save it somewhere in your Home directory, and give it a name. Let's suppose you name it "LaunchAll.sh" and place it in ~/Home/Scripts. Right-click it > Properties, Permissions tab, and check the box to allow it to run as a program.

2. Right-click the panel > Panel > Add New Items... > Launcher, click Add; then right-click the new icon > Properties and click the Add a new empty item icon. Alternatively, on the desktop > Create Launcher. Either way, you will end up looking at the launcher's dialog box. Give the launcher a name such as LaunchAll, and then click on the little square to the right of the Command line to navigate to your script.

That's it: now when you click that icon, all the programs you listed in your script will launch.
But when I tested it, only Thunderbird launches, and I am not sure where the error is. All 3 lines work individually in a terminal, so I conclude maybe it's the ampersand or something else with the syntax?

Thanks for any help.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#2 Post by Jerry3904 »

Never mind, it works. Just a brain fart...

Last entry here: http://mepiscommunity.org/wiki/other/xf ... eful-stuff
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
v3g4n
Posts: 654
Joined: Sat Jan 16, 2016 8:20 pm

Re: Launch multiple apps with single click

#3 Post by v3g4n »

Thanks for sharing this Jerry. Very handy, especially when you first login and you know that those three items are what you are going to use every time you login. Removes the need to click on separate icons which is a time saver and very convenient.
Last edited by v3g4n on Tue Aug 23, 2016 10:51 am, edited 1 time in total.

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#4 Post by Jerry3904 »

Oh good, glad it helps someone here.
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#5 Post by Jerry3904 »

I wanted to add that with this method, the user will see multiple screens emerge sort of helter-skelter on a single workspace. This would be a great time to use gdevilspie to control geometry, workspace, etc., and save all the clicking that has to be done to restore order.

http://www.mepiscommunity.org/wiki/appl ... gdevilspie
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

antiX-Dave
Developer
Posts: 372
Joined: Mon Apr 16, 2012 4:51 pm

Re: Launch multiple apps with single click

#6 Post by antiX-Dave »

Wmctrl works well at the end of the script. Antix default uses it to try and arrange conky on boot up. I have used it in my startup script to load my email in workspace 1, Firefox in 2, and terminal / file manager in workspace 3. I will try and see if I can find / remember how to do it.

User avatar
Paul..
Posts: 1777
Joined: Sun Mar 18, 2007 6:34 pm

Re: Launch multiple apps with single click

#7 Post by Paul.. »


Asus Prime X570-Pro | AMD Ryzen 7 3700X
16 Gig DDR4 3600 | Radeon RX 5600 XT Graphics
Samsung 860 500GB SSDs (2)

dyfi
Posts: 28
Joined: Sat Jan 01, 2011 10:13 am

Re: Launch multiple apps with single click

#8 Post by dyfi »

Nice tip, thank you, works perfectly.

Post Reply

Return to “Scripts”