Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I want to open four terminal windows into the first pane (upper left-hand side) when ubuntu boots. I have two terminal profiles: default and Mail. I want two of the windows Mail windows, and the other two to use the default profile. It would also be nice if I could get the terminals to ssh to where I manually send them every time I boot up.

Is there a way to do this? If so, what is it in English? I am not a computer programmer or an expert user and i can't even tell whether I'm using unity, so please gear your answer accordingly. Thank you!

share|improve this question

2 Answers 2

You could add this to your startup applications. Press the Ubuntu button(top-left), type and click Startup Applications, there, click on Add and type whatever you want in the title and put this is in the command section:

gnome-terminal --window-with-profile=default && gnome-terminal --window-with-profile=default && gnome-terminal --window-with-profile=Mail && gnome-terminal --window-with-profile=Mail


As for your automatic SSH logging in needs please take a look at this question here - Can I create a SSH script and How can I setup password-less SSH

share|improve this answer


Is there a way to do this? If so, what is it in English? I am not a computer programmer or an expert user and i can't even tell whether I'm using unity, so please gear your answer accordingly

The best way to make program start at login, regardless of desktop environment (unity,gnome,whatever), is to place a file like program-name.desktop into a folder .config/autostart/ (this folder is in your home folder, hidden because of the initial dot.) . Whatever is in that file, will run when you login.

Bellow is the version of a script I wrote for another question, but adapted for this specific one. You would need to open text editor ( named gedit ), and copy the following:

[Desktop Entry]
Comment=A script to open 4 terminal windows.

Notice the line Exec=, where yourusername should be substituted with your actual user name. This is the path to the file that will actually do the work. You you will need to make a new folder in your home folder called bin and then create a file called in there. Copy the script bellow into that file. Now , open terminal and type sudo chmod +x /home/yourusername/

# Author: Serg Kolo
# Date: 2/18/2015
# Description: A simple script to create two windows on right side
# of the screen with specific size. 

sleep 1
# This part opens 4 windows with specific profiles and titles 
gnome-terminal --window-with-profile=Mail -t MAIL-ONE 
gnome-terminal --window-with-profile=Mail -t MAIL-TWO
gnome-terminal -t DEFAULT-ONE
gnome-terminal -t DEFAULT-TWO
if [  $? == 0  ]
        wmctrl -r MAIL-ONE -e 0,1300,300,250,250
        sleep 0.5
        wmctrl -r MAIL-TWO -e 0,1300,0,250,250
        sleep 0.5
        wmctrl -r DEFAULT-ONE -e 0,1000,300,250,250
        sleep 0.5
        wmctrl -r DEFAULT-TWO -e 0,1000,0,250,250
share|improve this answer
Perhaps it's simply not clear yet: if command; then ... is the same as command; if [ $? = 0 ]; then .... – muru Apr 8 at 16:53
I know , but I just find it less confusing for me. Just a personal quirk – Serg Apr 8 at 17:38
Are you sure? You wouldn't have made that mistake with sleep in the previous script. Also, your answers should help others as well, so please stick to simpler code if you can. – muru Apr 8 at 17:39
Ok , I will try. Thank you for always helping users improve , muru ! You're awesome ! – Serg Apr 8 at 17:53

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.