How to Increase Padding in GNOME Terminal

There will be a couple of reasons why you want to increase the padding of the GNOME terminal, which may vary from user to user, but one thing will be the same: you want some kind of convenience for sure.

On my part, as you all know, I’m engaged in writing how-to guides for all of you, where I regularly cut out the piece of terminal output and attach it to the article. While doing this, I sometimes face problems like text getting shredded while snipping or the border of the terminal coming into the picture, which looks weird and unprofessional.

So to avoid this, there is one way, which I will discuss with you in this article, and of course, I’m expecting your reason for increasing the padding of your terminal screen.

Increase Terminal Padding

This method has been fully tested on the gnome-terminal, so I can say with certainty that the method described here will work 100% on the gnome-terminal.

Step 01: Create a gtk.css file in /.config

First, you need to create a file in /.config/gtk-3.0/ where you will add your custom padding information for your terminal.

To create a CSS file, run the following command into your terminal window.

$ nano ~/.config/gtk-3.0/gtk.css

Step 02: Add the following line to increase padding

Once the command line editor is ready to accept input, paste the following code into it, which will give 20px to the top, 20px to the right, 20px to the bottom, and 20px to the left.

VteTerminal,
TerminalScreen,
vte-terminal {
    padding: 20px 20px 20px 20px;
    -VteTerminal-inner-border: 20px 20px 20px 20px;
}

Step 03: Kill all terminals, and open a new terminal

After adding the above lines to /.config/gtk-3.0/gtk.css, you need to run another command which will reflect the changes.

The command below will kill all running Gnome terminals. If something is running in parallel on other terminal windows, it will also get terminated. So, to avoid this, you can wait until the task is completed.

$ killall gnome-terminal

The result after increasing padding

After executing the above command, try to open gnome-terminal to view the changes. If you didn’t get any changes, then try to increase the padding value.

Anyway, I’m able to increase the padding of my terminal screen, and you can clearly see the difference after increasing the padding in the below image.

That’s all to increase the padding on the gnome-terminal.

If you have any queries or questions regarding this topic or want a guide for another terminal, then do let us know in the comment section.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments