I click in terminal: terminal->132x43 to change terminal size but after each reboot terminal size is set to default setting and I have to change it again. How to set it permanently?
6 Answers
You should go to Edit->Profile Preferences, General page and check Use custom default terminal size, and then set your preferred horizontal and vertical dimensions.
Ubuntu 16.04 and later
In Ubuntu 16.04 open the terminal, select Edit->Profile Preferences -> General tab and change the values for columns and rows after where it says Initial terminal size:.
In Ubuntu 17.10 and later open the terminal, select Edit->Preferences -> Default profile -> Text tab and change the values for columns and rows after where it says Initial terminal size:.
-
3In Ubuntu 18.04, the dialog layout differs slightly. Upon entering the Preferences dialog,
Unnamed
appears in the left-hand column, underProfiles
, and selecting it yields a view similar to that pictured in the screenshot. May 4, 2018 at 1:54
Press Ctrl + Alt + t to open a terminal. Make sure the terminal is maximized (if it isn't already) by clicking on the right-most icon at the top of the window (the square in the circle). At the top of the window you should go to Edit -> Profile Preferences, General page and check Use custom default terminal size, and then set your preferred horizontal and vertical dimensions. If you would like unlimited scrolling, go to the Scrolling tab and put a check in the Unlimited box. Hope this helps!
-
1What is the benefit of ensuring that the terminal window is maximized prior to setting the custom default terminal size? From what I'm able to determine, the terminal's current size has no effect on the
Initial terminal size
values. May 4, 2018 at 1:39
In older versions you can find this setting in the /usr/share/vte/termcap/xterm
file.
Here's a little script to really permanently set a window size, regardless of gnome-terminal profile that you are currently using. This works on all windows belonging to gnome-terminal
To make it work, you need two things: 1) make sure you have wmctrl
installed and 2) run this script as one of the Startup Applications.
Notice that line with wmctrl -i -r $WMCTRL_ID -e 0,0,0,650,650
sets size and position according to gravity,x-position,y-position,width,height format
#!/bin/bash
# Author: Serg Kolo
# date: Sat, Sept 19,2015
# Purpose: a script to permanently set
# terminal window, size
# Written for: http://askubuntu.com/q/64652/295286
APP_CLASS="gnome-terminal.Gnome-terminal"
while [ 1 ]; do
WIN_ID=$(printf %x $(xdotool getactivewindow))
WM_CLASS=$(wmctrl -lx | awk -v search=$WIN_ID '{ if($1~search) print $3 }')
WMCTRL_ID=$( wmctrl -lx | awk -v search2=$WIN_ID '$0~search2 {print $1}' )
if [ $WM_CLASS = $APP_CLASS ]; then
wmctrl -i -r $WMCTRL_ID -e 0,0,0,650,650
fi
sleep 0.25
done
Linux Mint 19.1 (Xfce)
- Open Linux Mint Menu button
- Select
Settings
- Select
Xfce Terminal
- Navigate the new
Terminal preferences
window to theAppearance
Tab. - Set the Default Geometry, to your preference.
- Close and Enjoy.
However, the user config file is located in:
~/.config/xfce4/terminal/terminalrc
and the config item you need (for Xfce) is:
MiscDefaultGeometry
.
But you can edit faster from the command line with:
sed -E 's/MiscDefaultGeometry=.+$/MiscDefaultGeometry=140x40/' -i ~/.config/xfce4/terminal/terminalrc
Where we have set the size to 140x40
as an example.
-
For those down-voting, please provide an explanation out of common courtesy. Feb 11, 2019 at 11:57