increase padding in gnome terminal

31,474

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:

  1. 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).

  2. Kill all instances of gnome-terminal:

    $ killall gnome-terminal
    
  3. 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.

Share:
31,474

Related videos on Youtube

Aaron Yodaiken
Author by

Aaron Yodaiken

Updated on September 18, 2022

Comments

  • Aaron Yodaiken
    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
    jonS90 about 9 years
    The specified gtk.css file did not exist on my system. I had to create it (and then the solution worked).
  • Alp Dener
    Alp Dener over 6 years
    I can confirm that this also works for Ubuntu 17.04.
  • blockloop
    blockloop about 6 years
    Works in 17.10.
  • Robin Hsu
    Robin Hsu about 6 years
    So, do I create gtk.css to only have your 3 lines? Or, how can I create a default one?
  • phrz
    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.
    Alexandre V. almost 6 years
    This is not working on Ubuntu 18.04.
  • Alexandre V.
    Alexandre V. almost 6 years
    This is not working on Ubuntu 18.04.
  • Daniel Hitzel
    Daniel Hitzel over 5 years
    Working on Arch
  • Vishnu M.
    Vishnu M. over 5 years
    This works perfectly in pantheon-terminal (elementary OS Loki) as well.
  • Terry Brown
    Terry Brown over 5 years
    If you have TRouBLe remembering how those numbers relate to edges, it's Top Right Bottom Left.
  • WinEunuuchs2Unix
    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
    makim over 3 years
    for me this is working with ubuntu 20.04
  • MetalGodwin
    MetalGodwin about 2 years
    Skipping 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