Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

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
Forum Veteran
Forum Veteran
Posts: 21630
Joined: Wed Jul 19, 2006 6:13 am

Launch multiple apps with single click

#1 Post by Jerry3904 » Tue Aug 23, 2016 10:21 am

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: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 21630
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#2 Post by Jerry3904 » Tue Aug 23, 2016 10:24 am

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

Last entry here: http://mepiscommunity.org/wiki/other/xf ... eful-stuff
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
v3g4n
Forum Guide
Forum Guide
Posts: 1783
Joined: Sat Jan 16, 2016 8:20 pm

Re: Launch multiple apps with single click

#3 Post by v3g4n » Tue Aug 23, 2016 10:50 am

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
Forum Veteran
Forum Veteran
Posts: 21630
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#4 Post by Jerry3904 » Tue Aug 23, 2016 10:51 am

Oh good, glad it helps someone here.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 21630
Joined: Wed Jul 19, 2006 6:13 am

Re: Launch multiple apps with single click

#5 Post by Jerry3904 » Thu Aug 25, 2016 7:59 am

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: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

antiX-Dave
Forum Regular
Forum Regular
Posts: 365
Joined: Mon Apr 16, 2012 4:51 pm

Re: Launch multiple apps with single click

#6 Post by antiX-Dave » Thu Aug 25, 2016 7:10 pm

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..
Forum Guide
Forum Guide
Posts: 2277
Joined: Sun Mar 18, 2007 6:34 pm

Re: Launch multiple apps with single click

#7 Post by Paul.. » Fri Aug 26, 2016 6:37 pm


Daily: MSI 890FXA-GD70 | AMD Phenom II X6 1055T | GeForce GTX 750 Ti | 8G
Test: Thinkpad T431s | Intel i5-3437U | Intel 3rd gen Graphics | 4G

dyfi
Forum Regular
Forum Regular
Posts: 157
Joined: Sat Jan 01, 2011 10:13 am

Re: Launch multiple apps with single click

#8 Post by dyfi » Sat Aug 27, 2016 5:58 am

Nice tip, thank you, works perfectly.

Post Reply

Return to “Scripts”