Page 1 of 1

Launch multiple apps with single click

Posted: Tue Aug 23, 2016 10:21 am
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.

Re: Launch multiple apps with single click

Posted: Tue Aug 23, 2016 10:24 am
by Jerry3904
Never mind, it works. Just a brain fart...

Last entry here: http://mepiscommunity.org/wiki/other/xf ... eful-stuff

Re: Launch multiple apps with single click

Posted: Tue Aug 23, 2016 10:50 am
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.

Re: Launch multiple apps with single click

Posted: Tue Aug 23, 2016 10:51 am
by Jerry3904
Oh good, glad it helps someone here.

Re: Launch multiple apps with single click

Posted: Thu Aug 25, 2016 7:59 am
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

Re: Launch multiple apps with single click

Posted: Thu Aug 25, 2016 7:10 pm
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.

Re: Launch multiple apps with single click

Posted: Fri Aug 26, 2016 6:37 pm
by Paul..

Re: Launch multiple apps with single click

Posted: Sat Aug 27, 2016 5:58 am
by dyfi
Nice tip, thank you, works perfectly.