Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to click a button that launches my group of applications that I need for graphical design. Then after a few hours be able to close them and open all my social applications (Empathy, Thunderbird,, etc...). And sometimes open the group for learning Cantonese.

My PC is average, so not powerful to load all this well in different workplaces. With Unity I even found it better to reduce the workspaces from 4 to 1.

I believe dedicated working like this without distracting applications would help others to become more productive too. I hope somebody can help. Should we make a facilitating program for this?

share|improve this question

You can make a shell script with something like this :


my_pgrm0 &
my_pgrm1 &
my_pgrm2 &
my_pgrmN &

All your programs (from my_pgrm0 to my_pgrmN) will be launched when you execute the script.

For closing the program, same thing with another script :


MY_PGRM_LIST=my_pgrm0 my_pgrm1 my_pgrm2 ... my_pgrmN

for PGRM in $MY_PGRM_LIST; do
    killall $PGRM
    # Or searching the program with ps aux | grep $PGRM, retrieving the process id and then give this process to kill -9
share|improve this answer
Sorry if I don't understand how this works exactly, but I thought that running "kill" or "killall" would terminate the program immediately, without asking to save unfinished work, and without cleaning up any temporary files or anything like that. Is that a safe way to stop programs? – Questioner Jul 17 '12 at 2:53
Thanks air-dex, good solution, similar to other answer. – Johan Jul 17 '12 at 10:19
@DaveMG: You are correct. All these methods will close the program immediately, and may be dangerous depending on your work habits; it's a good idea to always save work often and after changes in all cases. – Marty Fried Jul 17 '12 at 16:18

This can be done in a number of ways by yourself. The easiest and simplest way is to create simple scripts that are simply a list of programs to run.

If you don't have a directory named "bin" in your home directory, you would want to create one, as this is a default place for such things; from a terminal command, enter from your default home directory: mkdir bin. Then, enter "cd bin" to change to that directory. Run an editor such as gedit in that directory, with a name such as gedit

In the editor enter something like this:

empathy &
thunderbird &
xdg-open &

When done, close the editor, and make the file executable, by entering chmod +x

Run the script by using alt-f2, and entering the full name. Then, you may be able to pin it to the launcher, or create a keyboard shortcut.

To close the apps, you would create another similar script, but call it something like "", and enter commands like this:

pkill empathy &
pkill thunderbird &

For the URL, you'd need to pkill the browser, and I'm not sure how well it will work, especially if you have other browser windows.

There may be more elegant ways to do this, but this should work until you find something better, if you really want it.

share|improve this answer
Thanks a lot, it all works. Just had to do some extra permissions stuff and wasn't able to make launcher or desktop icon yet. – Johan Jul 17 '12 at 10:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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