63

I'd like Terminal to open near the bottom of my screen. Is there a way to set the default size and position?

I'm using Linux Mint 13, Cinnamon.

  • 1
    The answer will vary greatly on what desktop environment (GNOME, KDE etc.) or to be exact, what window manager, you are using. – phunehehe Sep 24 '12 at 11:49

5 Answers5

73

Most terminals can be launched using the geometry switch allowing you to specify terminal's size and position (COLUMNSxROWS+X+Y) e.g.:

gnome-terminal --geometry 73x31+100+300

or

xterm -geometry 93x31+100+350

If you want to make the above permanent, copy the terminal launcher (terminal's .desktop file) from /usr/share/applications/ to ~/.local/share/applications/ and edit the Exec field accordingly.

E.g. for gnome-terminal

Exec=gnome-terminal --geometry 73x31+100+300

Having that custom launcher in your $HOME would preserve your settings after terminal-package upgrades (that would otherwise overwrite the default .desktop file in /usr/share/applications).

don_crissti
  • 82,805
  • 1
    I am using lxterminal from Lubuntu 11.10 and the help says that I can use the option geometry=colsxrows but nothing about the position. Do you know how to fix its position in Lubuntu? – Sigur Sep 24 '12 at 14:09
  • 2
    @Sigur - you could try using devilspie to specify the position. Create a file ~/.devilpie/lxterminal.ds with this content (replace X and Y as per your taste): (if (is (application_name) "lxterminal") (begin (geometry "+200+350") ) ) save, run devilspie then launch lxterminal with desired size: lxterminal --geometry=COLxROW. It should be automatically positioned where you want. It works OK in Gnome 3 at least. – don_crissti Sep 24 '12 at 16:07
13

xterm Options Using Xresources or Xdefaults


This is the general "syntax" for options that go into the ~/.Xresources or ~/.Xdefaults file:

XTerm*geometry: COLUMNSxROWS+X+Y

For example

XTerm*geometry: 90x30+0+540

Note: The first two options (COLUMNSxROWS) depend on your font type/size.

Furthermore, it also depends on the resolution of your Display, as the last two options are for the position of the window; this is calculated in different units than the Window Size of the xterm window.

When X = 0 then the position is all the way on the left
When Y = 0 then the position is all the way at the top

If your resolution is e.g. 1920x1080, then you'd put the Y value as 540 (half-way down from the top edge of your display); as the 30 ROWS value is roughly half the display height on the same-sized display using my own system's fonts, settings.

ILMostro_7
  • 3,309
7

As an update, the top answer didn't work for me in Ubuntu 18.04 as of Aug. 2018. What got the job done is Hardware -> Keyboard -> Add new command (By hitting plus sign). Fill in the "Command" field with command like gnome-terminal --geometry 80x55-500+0. Set the hotkey as Crtl + Alt + T. Done.

Even better, you can add the command to "Startup Applications" to launch the terminal at startup.

0

Regarding the font size, in lxterminal you could set the default font to the size you want, although this would apply to all terminals. If you were using gnome-terminal you could set up a profile with the desired font size and pass it in using the flag --window-with-profile, but I don't see any related options in lxterminal.

If you don't want this to be your default font size, one potential option is to write a script to modify the config file (by default ~/.config/lxterminal/lxterminal.conf) to change the font size, then launch the program, then revert the font size in the config file. I haven't tested this though.

Beright
  • 101
0

for me, at this date (running Mint 21.3 in xfce4 environment), copying the terminal.desktop file at ~/.local/share/applications/ and editing its Exec field, would result nothing. But I found a solution via this french forum by editing the MiscDefaultGeometry field from ~/.config/xfce4/terminal/terminalrc file