Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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"                                       |
|                                                  |
|                                                  |
|                                                  |
====================================================
share|improve this question

5 Answers 5

Back in the old days there used to be X Resources. Creating a .Xdefaults or .Xresources file in your home directory you could change all sorts of settings for graphical applications.

System wide defaults on my box are found in /etc/X11/Xresources and /etc/X11/app-defaults but i don't know if gnome-terminal cares for any of those.

Edit: also, this seems "theme department", so editing theme files or starting gnome-terminal with a custom .gtkrc file could do the trick, something like

$ GTK2_RC_FILES=~/custom-gtkrc gnome-terminal

in the terminal, or editing the gnome-terminal.destktop above to look like

Exec=env GTK2_RC_FILES=/home/you/custom-gtkrc gnome-terminal

could work.

share|improve this answer

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|improve this answer

Alternatively, I've used the workaround where you change the theme's (metacity 2) left_width parameter to 15 or 20 pixels.

This makes the window border thick on the left side and moves the effective left margin inside the window. This works okay for me as the window border color and background color for the terminal are close.

I researched this thoroughly and the only other way to do it is to switch to the xterm terminal as mentioned above. However, configuring xterm is a pain and has to be done through the .Xresources config file, there is no menu with xterm.

share|improve this answer

Just found this which worked for me

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

share|improve this answer

I couldn't find a padding parameter in the gconf or dconf editor. I did a search on "terminal" with the Software Center and found a number of terminal applications. Gnome used to make it easy to specify different terminal applications but things have changed a bit. /usr/share/applications/gnome-terminal.desktop is where the terminal application to execute is specified. Open that file and you'll find:

[New Shortcut Group]
Name=New Terminal
Exec=gnome-terminal
TargetEnvironment=Unity

The Exec=gnome-terminal can be changed to select a different terminal application. Editing this file is a little involved because their mime type isn't recognized by naultilus as editable. You'll need to initiate the edit from the command line as follows:

sudo gedit /usr/share/applications/gnome-terminal.desktop

Having made that change the terminal application can be initiated the same as before but your alternative terminal application will be run.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.