I originally developed these instructions as a sidebar for my gigantic tutorial: Play or Encode High-Quality Video and Audio – with FFmpeg and mpv
However, customizing Terminal is broadly useful for many applications, which is why I'm posting this in the general discussion.
Raspbian's default Terminal behavior is lacking in two significant ways:
Terminal's default window size is much too small on higher-resolution displays. This is especially true on a 1080p monitor.
Terminal does not recognize the "standard" keyboard shortcuts for copy and paste: CTRL + C
and CTRL + V
. Instead, it uses the obscure and cumbersome combination of CTRL + SHIFT + C
and CTRL + SHIFT + V
. This is especially frustrating because all the other major programs on the Raspberry recognize the standard shortcuts. For example, in order to copy and paste the nearly 100 command lines in my tutorial, you would have to constantly switch your keyboard shortcut method back and forth for every single line. Or, you would have to constantly right-click in Terminal to access paste. Both of these mistake-prone methods are begging for a slip of the mouse or keyboard.
My attitude toward computers is quite simple: They're not here to train me – I'm here to train them! Sometimes you have no choice but to allow them to "train" you – that's an inevitable part of the learning process. But having to constantly alter your behavior for an extremely common task is pretty insane.
Some of you may be thinking: "Why not simply go to Edit | Preferences in Terminal and change the settings?" Although that will work for the default window size, there's a bug in Terminal that replaces the keyboard shortcut code with gibberish if you change it in the preferences. That method will therefore not work. Here's a screenshot to prove what I'm talking about (I will submit a bug report on this in the next few days):
Fortunately, you can sidestep that bug by directly editing the "lxterminal.conf" file. It's very simple:
Open File Manager; copy and paste the following path directly into the address bar; hit Enter:
Right-click the file named "lxterminal.conf" and click Text Editor.
There are 4 lines that need minor editing – make the simple changes illustrated below in my graphic and you're all set! Save the file when you're done.
The values of 115 and 50 for the column and row sizes are only optimal on a 1080p monitor. If your display has a lower resolution, you'll have to use lower values. To determine the best size for your screen, hover your mouse over the side and bottom edges of your Terminal window. When it turns into a double-arrow, click and hold – then drag the window's border in and out until you find the most desirable size (an overlay will appear that displays the window's current dimensions).
When editing the file, use a capital "C" in <CTRL>C and a capital "V" in <CTRL>V. My testing indicated it's not case-sensitive, but you might as well use Terminal's existing convention for key assignments.
If you make a mistake at any time – or simply wish to restore Terminal's default settings – there's a simple trick: Delete the "lxterminal.conf" file! The next time you open Terminal, the Raspbian operating system will automatically reconstitute the file with its original default settings! Caution: I have verified that Raspbian Stretch behaves in this manner – but if you still have an older operating system, such as Raspbian Jessie, I can't guarantee how it might behave. So play it safe and make a backup copy of the file before you delete it!
Finally, for the benefit of my tutorial users, here's what the optimal layout should look like once you've gotten Terminal properly customized. To view this image at full resolution, right-click and select "open image in new tab":