Linux - Set default terminal size and screen position?

On the menu bar choose System -> Preferred Applications. Select the System tab. Choose Custom and type in:

gnome-terminal --geometry=120x80+50+50

or whatever other geometry you like. To tell Ubuntu to remember your session state, so that everything you have running automatically restarts exactly how it was the last time you sere logged in (including window geometry), choose System -> Preferences -> Sessions. Check “Automatically save changes to session”.

alt text


I use a launcher in the top panel to open a gnome-terminal, and the above did not change settings for this.

What did work was right clicking the launcher icon, opening 'Properties' and replacing the Command entry gnome-terminal with the geometry specific version given by DaveParillo.

Command: gnome-terminal --geometry=100x35+10+10


You can do this for ANY using CompizConfig Settings Manager (CCSM), with the Compiz compiz-extra-plugins installed.

Using CCSM is a little nicer because you can also set other things like, opening the terminal window to always on top, and opening the terminal window with some transparency.

Different Compiz plugins accomplish different tasks on your windows:

  1. Place Windows lets you set the location that the window will open up at, and it will allow you to choose which viewport (desktop) it opens in.
  2. Window Rules let you set the size of the window, and/or set it to always on top, or fullscreen, or maximized, when it opens, along with many other options.
  3. Opacity, Brightness and Saturation let you set the opacity of the window when it opens.

You will have to install CCSM along with the extras plugin by typing this in a terminal window:

sudo apt install compizconfig-settings-manager compiz-plugins-extra

Setting the rules for your windows classes is not inuitive in CCSM.

Basically you:

  1. Open up the program you want to set the rules on, and make sure it is always on top or a portion of it is visible so you can "grab" it's window class name in the step 7.
  2. Open CCSM and go to the plugin you want to set the rule in, such as Windows Rules.
  3. Find the action you want to set a rule on, such as the Size Rules tab. This might be under a different tab.
  4. Some actions have a green plus sign on the right, and other's require you click the New button. Size Rules->Fixed Size Windows requires you click the New button first.
  5. Click the green plus sign. This will bring up a window titled Edit Match.
  6. In the Edit Match window, click the grab button.
  7. Your mouse pointer will become a plus sign. Now click the window of the program you want to set the rule on with this mouse-pointer-plus-sign. This will put the window's class name into the Edit Match window. For example, if you click a terminal window, class=Gnome-terminal will be added.
  8. Click the Add button, and this will take you back to the previous window.
  9. Edit the other parameters as you see fit. In this Size Rules example, if you want the window to open up at the size of 800x300, you put 800 for width and 300 for height.
  10. Close the Edit window, and you will see the rule added to the list.
  11. Now the terminal window will always open up at the size of 800x300.
  12. Go set rules for location (Place Windows) using the same process.