1

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!

Jorge Castro
  • 71,754

2 Answers2

4

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

startup

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

0

NEEDS EDITING (LATER)

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]
Name=four-terminals
Comment=A script to open 4 terminal windows.
Exec=/home/yourusername/bin/four-terminals.sh
Terminal=false
Type=Application
Categories=Application;

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 four-terminals.sh in there. Copy the script bellow into that file. Now , open terminal and type sudo chmod +x /home/yourusername/four-terminals.sh

#!/bin/bash
# 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  ]
then
        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
fi
Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497