Gangmax Blog

Set the Default Size of Terminator

Terminator is an alternative of gnome-terminal. It has the multiple windows terminals capability. Be default, the window size is small, so it’s useful to set its default size larger.

Open the file “~/.config/terminator/config” with your favorite editor. You should have a section titled [layouts]. You only need to add a line within the sub-section named [[[window0]]] belonging to the [[default]] section. My configuration file, for instance, looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[global_config]
enabled_plugins = CustomCommandsMenu, InactivityWatch, ActivityWatch, TerminalShot, LaunchpadCodeURLHandler, LaunchpadBugURLHandler
[keybindings]
[profiles]
[[default]]
scrollbar_position = hidden
visible_bell = True
scrollback_lines = 1000000
foreground_color = "#ffffff"
copy_on_selection = True
background_color = "#300a24"
[layouts]
[[default]]
[[[child1]]]
type = Terminal
parent = window0
profile = default
[[[window0]]]
type = Window
parent = ""
profile = None
size = 900, 600
[plugins]

This line “size = 900, 600” is where you set the default window size.

Refer here.

Added@20120904:

The method above is sort of complicated, I found a simpler way to do the same thing and more: a method can not only set the size of the terminator window, but also the initial position in the monitor, inspired by here. This article provides a way to set the size of the terminator window by changing the python code directly, which is also complicated. However, it shows me that we can pass parameter(s) to do such thing, it’s much easier.

First, I run “terminator –help” to get all the supported parameters. Obviously the “–geometry” parameter does what I want. Then I follow the instruction to run “man X” to get the details of “–geometry” parameter:

Although the layout of windows on a display is controlled by the window manager that the user is running (described below), most X programs accept a command line argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH, HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and location for this application’s main window.

So the solution is very simple:

  1. Run “alacarte“ to open the main menu editor;

  2. Go to “System Tools -> Terminator” item and open it;

  3. Modify the command by adding the “–geometry” parameter with your prefered values. In my case(Monitor resolution rate 1680x1050) it’s:

1
2
terminator --geometry 1200x800+240+125
#XOFF = (1650-1200)/2, YOFF = (1050-800)/2

Now open your terminator from main menu, that should work.

Comments