This isn't so much a request for help as a curiosity of mine.

I wrote this script to quickly pop up four terminal sessions and fill my screen, since so many of my current systems have things that come in fours, and I'm a bit OC about terminal positioning if I'll be using them all heavily.

#launch 4 terminals setup to fill my screen
gnome-terminal --geometry 116x27+0+600 &    
gnome-terminal --geometry 116x27+0+0 &
gnome-terminal --geometry 116x27+1000+0 &
gnome-terminal --geometry 116x27+1000+600 &

Now, this script works just fine for me. Nothing to write home about etc. The wierd thing is that pre-rebooting my system (solaris 11 x86) I was not putting the commands to the background (no & at the end). It worked perfectly pre reboot. In fact, it worked slightly faster before the reboot, when it was not sending the commands to bg.

post reboot, without back grounding the commands, I get one terminal, and when I exit from that one, I get the next one and so one.

That seems reasonable to me, but I am now very curious if anyone knows what might have been different about how the script was launched that made it work without having to & all the commands. Its as if before it was being launched as a normal shell script, and now the same launcher, executing the same script, is launching it as though I were typing in each command at a prompt.

I've looked around the docs, and tried options to see if anything affects this, unfortunately, my main use for desktops is usually just to have multiple terminal sessions up, so I'm kind of clueless about gui desktops.

One last bit of weirdness. I copied the original script (with no &) to another script name. Then made a brand new launcher, and it worked again. So then I rebooted again. But post reboot, it no longer worked (opening them one at a time and only after the previous one has exited).

Summary, before rebooting, this script didn't need the & to work, and now it does. Fresh made, this script works, but after a reboot it stops working. Why might this be? No changes were made to the system. If someone has intimate knowledge of how launchers get their information at boot time vs how they work when assembled on the fly, that would be very nice to know.


Tip: fire up all your gnome-terminals (all four), set them up just the way you want them, and then run:

gnome-terminal --save-config=$HOME/my4.term

Then modify your script to run:

gnome-terminal --load-config=$HOME/my4.term

And use that to launch the four terminals. It will also save the working directories you were in, windows size, geometry, tabs, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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