22

Is it possible to change the line spacing in Terminal, or is there some other app that allows it? I'm moving from the Mac, and its terminal app has this feature which allows line spacing to be changed independent of the font size.

E.g., here's Monaco on the Mac at 17pt, without any adjustments. My issue with it is that it's a jumble of text - the eye is drawn vertically as much as it is horizontally:

Monaco

And with "1.1" line spacing and slightly tighter character spacing. I do this so that my eye follows lines easier. It's a general rule of thumb in layout that space between lines should be larger than the space between words. This gets a little closer to that ideal:

Monaco with my custom changes

I'm wondering how to achieve this with Ubuntu. For now, my best workaround is to use Source Code Pro, which is designed with these ideas in mind, apparently:

Source Code Pro

3
  • Hi i am off to my PC now . but i am sure either from General or scrolling TAB in that window you can get that .
    – Raja G
    Sep 29, 2012 at 3:52
  • 2
    Not sure what your screenshot is supposed to accomplish or show; looks like a normal terminal screen to me. Seems like you'd need at least two examples to show difference in line spacing, as different fonts have different spacing, depending on the height of the font. But I think we all know what line spacing is, even though the terminal doesn't have that setting. Sep 29, 2012 at 4:21
  • I updated the screenshots to better illustrate my question.
    – Dogweather
    Nov 13, 2012 at 2:11

6 Answers 6

9

There is one terminal emulator that has this feature.

urxvt

from man urxvt:

-lsp number
Compile frills: Lines (pixel height) to insert between each row of the display.      
Useful to work around font rendering problems; resource lineSpace.

urxvt is avalable in thease packages:

rxvt-unicode

rxvt-unicode-256color

rxvt-unicode-lite

1
  • 3
    Also xterm with the scaleHeight resource. Apr 21, 2015 at 13:18
5

This feature is available in GNOME Terminal version 3.28 (VTE terminal emulation library version 0.52).

4

Konsole has this feature. You'll find it under profile settings in the rightmost tab. Konsole is a KDE application, but it has relatively few dependencies and seems to work well without KDE.

The mac terminal supports this for a good reason. Atom (editor) supports it too. To me it's indispensable. I imagine, many people prefer a little more line spacing/ line height.

urxvt seems a little antiquated to me.

1
  • Only to increase line height though which is a shame. Doesn't allow you to tighten. Jul 30, 2019 at 8:48
1

To my knowledge this is not directly achievable. Nor would you want it to be. Having a space between lines would really mess up "text ui" based programs like nano, mail, and that little dialog that pops up when you run apt from the command line.

However, there is good news. You can just change the font. Some fonts have a kind of "padding" that will give you the same effect.

I recommend that you use Source Code Pro it's very readable, though it honestly doesn't give as much padding as you want.

Keep in mind that on Linux the terminal is different concept then it is on OS X. As someone that is migrating myself, I think the best advice I can give is to just use the defaults for a while then make a decision.

5
  • Actually, I've ended up independently using half of your advice. First, I believe that it is desirable: I realize my screenshot may not clearly show it, but that's Monaco being displayed with a slightly larger line spacing. I find that it helps the text on the lines stick together more. But yes, Source Code Pro does space its lines further apart, and that's what I'm using on Linux.
    – Dogweather
    Nov 13, 2012 at 1:51
  • You can also try out the font Ubuntu Mono. Dec 30, 2012 at 16:59
  • 1
    @PaddyLandau Your comment gave me the idea for a different solution: hacking the TTF file to increase line height. I'll post an answer if I can get it to work.
    – Tobia
    Oct 10, 2016 at 13:20
  • @Tobia I look forward to it! Oct 10, 2016 at 13:30
  • 1
    @PaddyLandau Frankly I don't have time to work on it, but I found a forum post that explains how it's done: mobileread.com/forums/showthread.php?t=22374
    – Tobia
    Oct 25, 2016 at 8:44
0

This isn't really a fix but you can add a blank line after every command with:

export PROMPT_COMMAND="echo"
2
  • 3
    This will break a massive number of things. I don't suggest this. Plus this only works at the interpreter level (bash). The example above is command output, to address that you need to have line spacing on the emulator level.
    – coteyr
    Nov 12, 2012 at 15:55
  • 2
    If you want this, it's better to add a newline to PS1, for instance: export PS1='\n$ '.
    – Thomas
    Aug 9, 2016 at 7:40
-1

space between lines should be larger than the space between words

I had the same requirement, and I use mobaxterm.
I do not want to use a new terminal just for such detail. I find that just changing the font to cascadia mono or source code pro makes the screen enjoyable.

mine

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .