Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 recently started using a bash script to setup terminal workspaces for myself, and everything worked fine for the first couple of days. I run the script, and four or five or seven terminals pop up, all in precisely the right places on the screen, all cd'ed into the proper directories, ready for use.

This morning I installed conky, and the next time I tried to run my script, the oddest thing hapened. Now it will only open the first window. When I close that window, the second one opens. When I close that one, the third, and so on until the end of the script.

So now my script is useless except as a pasteboard for me to copy and paste into the terminal from.

Here is my script:


if [ $1 = "deploy" ]; then
    cd ~/
    gnome-terminal --geometry=185x41+0+0 --window-with-profile=Colquhoun

    cd ~/Utilities/Ad\ Tag\ Generators
    gnome-terminal --geometry=85x15+1312+0 --window-with-profile=Generator
    cd ~/Utilities
    gnome-terminal --geometry=85x28+1312+280 --window-with-profile=Deployer
    cd ~/Staging
    gnome-terminal --geometry=85x20+1312+730 --window-with-profile=Monitor

if [ $1 = "servers" ]; then
    cd ~/
    gnome-terminal --geometry=89x20+0+0 --window-with-profile=Colquhoun
    gnome-terminal --geometry=89x20+640+0 --window-with-profile=Colquhoun

    gnome-terminal --geometry=89x65+1280+0 --window-with-profile=Colquhoun

    gnome-terminal --geometry=89x20+0+360 --window-with-profile=Colquhoun
    gnome-terminal --geometry=89x20+640+360 --window-with-profile=Colquhoun

    gnome-terminal --geometry=89x20+0+700 --window-with-profile=Colquhoun
    gnome-terminal --geometry=89x20+640+700 --window-with-profile=Colquhoun

if [ $1 = "logchecks" ]; then
    cd ~/
    gnome-terminal --geometry=89x65+0+0 --window-with-profile=Colquhoun
    gnome-terminal --geometry=89x65+640+0 --window-with-profile=Colquhoun
    gnome-terminal --geometry=89x65+1280+0 --window-with-profile=Colquhoun

Does anyone know why this might be happening? And why it wasn't happening previously but is now?

share|improve this question
If the script works when conky is not running, it probably has something to do with conky interacting with the root desktop: if so, paste your .conkyrc – jasonwryan Oct 10 '13 at 3:33
by default gnome-terminal execute in background? I expected to see & at the end of every gnome-terminal line (may conky change this behavior in some way?) – Alex Oct 10 '13 at 5:56
up vote 1 down vote accepted

Append an & to the end of each gnome-terminal command to make sure each terminal starts in the background. If you haven't killed them sooner, the terminals will exit when conky exits and kills all child processes.

share|improve this answer
Thanks! I have since uninstalled Conky and the behaviour went back to normal. Is this a standard practice, running it in the background like this? And if so, why? – StormShadow Oct 12 '13 at 9:15

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.