increase padding in gnome terminal
Solution 1
Edited Jun 02 2018: As of Ubuntu 18.04, you need to add one more element selector for this to work.
Paul was mostly right. This expanded solution works as of Ubuntu 14.04.1 with GNOME Terminal 3.6.2.
For all versions:
-
Add the following code to
~/.config/gtk-3.0/gtk.css
:
VteTerminal, TerminalScreen, vte-terminal { padding: 10px 10px 10px 10px; -VteTerminal-inner-border: 10px 10px 10px 10px; }
Edit: You will need to create the file if it does not already exist (thanks jonS90).
-
Kill all instances of gnome-terminal:
$ killall gnome-terminal
Restart gnome-terminal.
Solution 2
I tried all answers here on Ubuntu 16.10 with gnome-terminal 3.20.2 and they didn't work. I found the up-to-date solution in this launchpad thread. In the file ~/.config/gtk-3.0/gtk.css
(which you may need to create), add this:
vte-terminal {
padding: 10px;
}
Solution 3
To move the terminal output away from the window borders create the stylesheet ~/.config/gtk-3.0/gtk.css with the following setting:
TerminalScreen {
-VteTerminal-inner-border: 10px 10px 10px 10px;
}
https://bbs.archlinux.org/viewtopic.php?id=163964
Solution 4
Please go through this issue - Unity Terminal 16.04
The Comment on the Wishlist describes is very proper solutions for Ubuntu 16.04 Terminals, where we need to change file ~/.config/gtk-3.0/gtk.css
:
VteTerminal,
TerminalScreen {
padding: 10px 10px 10px 10px;
-VteTerminal-inner-border: 10px 10px 10px 10px;
}
TO
VteTerminal {
padding: 10px;
}
padding
works the same as normal CSS padding
.
Solution 5
You can do it with some terminals, for example old xterm
xterm -b 10 -title "-b 10" -e nano &
xterm -title "no border spec" -e nano &
In the manual
man xterm
you find how to set fonts, foreground and background colours. Maybe a little tricky to configure, but very flexible.
Related videos on Youtube
Aaron Yodaiken
Updated on September 18, 2022Comments
-
Aaron Yodaiken over 1 year
I'd like to increase the padding in the gnome terminal, because the default has no padding and hurts my eyes.
(Padding as in: I want space between the window border and where the text input/output is displayed.)
For example:
=[X][-][ ]=============My Terminal================== | | | $> echo "Padding occurs on both sides for long | | input" | | | | | | | ====================================================
-
jonS90 about 9 yearsThe specified gtk.css file did not exist on my system. I had to create it (and then the solution worked).
-
Alp Dener over 6 yearsI can confirm that this also works for Ubuntu 17.04.
-
blockloop about 6 yearsWorks in 17.10.
-
Robin Hsu about 6 yearsSo, do I create gtk.css to only have your 3 lines? Or, how can I create a default one?
-
phrz about 6 years@RobinHsu if the file exists, add this to the end. If it doesn't, create it, and only add this.
-
Alexandre V. almost 6 yearsThis is not working on Ubuntu 18.04.
-
Alexandre V. almost 6 yearsThis is not working on Ubuntu 18.04.
-
Daniel Hitzel over 5 yearsWorking on Arch
-
Vishnu M. over 5 yearsThis works perfectly in pantheon-terminal (elementary OS Loki) as well.
-
Terry Brown over 5 yearsIf you have TRouBLe remembering how those numbers relate to edges, it's Top Right Bottom Left.
-
WinEunuuchs2Unix over 5 years@TerryBrown TRouBLe is a nice way. Another is think of hands progressing on an analog clock: 12-3-6-9 (Top, Right, Bottom, Left).
-
makim over 3 yearsfor me this is working with ubuntu 20.04
-
MetalGodwin about 2 yearsSkipping ahead to 2022, still works great with both gnome-terminal and terminator on Debian 11. Thanks a bunch, I really enjoyed the inner gap feature of Alacritty, perfect to see it's doable for a tiled terminal such as Terminator! Cheers