Install Termite Terminal Emulator on Ubuntu 22.04|20.04|18.04|16.04

ComputingPost
4 min readNov 21, 2022

How can I Install Termite on Ubuntu 22.04|20.04|18.04|16.04?. Termite has been my favorite Linux terminal emulator since I switched to Arch Linux as my Primary Linux distribution. I run Arch Linux with i3 Window Manager, all my dotfiles are available on my Github Dotfiles repository.

Having been away from the Debian/Ubuntu family for a while, I decided to give Ubuntu Desktop Edition a try on my new home Desktop. Being Ubuntu, termite is not available on default repositories and you’ll have to build it from source.

Termite is a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support. It supports transparency along with both the 256 color and true color (16 million colors) palettes.

Install Termite on Ubuntu 22.04|20.04|18.04|16.04 by using the steps below:

Step 1: Install Development Tools

Install Development Tools in your Ubuntu Workstation using the commands below:

sudo apt update

sudo apt install build-essential

Step 2: Install Termite Build Dependencies

Next is to download and install Termite build dependencies on your system.

sudo apt-get install -y git g++ libgtk-3-dev gtk-doc-tools gnutls-bin valac intltool libpcre2-dev libglib3.0-cil-dev libgnutls28-dev libgirepository1.0-dev libxml2-utils gperf

Step 3: Install Enhanced vte terminal widget

VTE is a library (libvte) implementing a terminal emulator widget for GTK+, and a minimal sample application (vte) using that.

Install VTE like below:

cd ~/

git clone https://github.com/thestinger/vte-ng.git

echo export LIBRARY_PATH="/usr/include/gtk-3.0:$LIBRARY_PATH"

cd vte-ng

./autogen.sh

make

sudo make install

Step 4: Build and Install termite on Ubuntu 22.04|20.04|18.04|16.04

Once you have VTE library installed, clone termite code and build it.

cd ~/

git clone --recursive https://github.com/thestinger/termite.git

cd termite

make

sudo make install

sudo ldconfig

sudo mkdir -p /lib/terminfo/x

sudo ln -s /usr/local/share/terminfo/x/xterm-termite /lib/terminfo/x/xterm-termite

sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /usr/local/bin/termite 60

The termite binary should be available under /usr/local/bin/termite

$ which termite

/usr/local/bin/termite

Step 5: Configuring Termite Terminal Emulator

Termite looks for configuration files in:

  • $XDG_CONFIG_HOME/termite/config
  • ~/.config/termite/config
  • $XDG_CONFIG_DIRS/termite/config
  • /etc/xdg/termite.cfg

To start customizing termite copy the base example file to your home dir first:

mkdir -p ~/.config/termite

cp /etc/xdg/termite/config ~/.config/termite/config

vim ~/.config/termite/config

Below is my termite configuration file, you can paste its contents to yours:

[options]

scroll_on_output = false

scroll_on_keystroke = true

audible_bell = false

mouse_autohide = true

allow_bold = true

dynamic_title = true

urgent_on_bell = true

clickable_url = true

cursor_blink = on

#font = Hack 10



[colors]

background = #282828

foreground = #ebdbb2

color0 = #282828

color8 = #928374

color1 = #cc241d

color9 = #fb4934

color2 = #98971a

color10 = #b8bb26

color3 = #d79921

color11 = #fabd2f

color4 = #458588

color12 = #83a598

color5 = #b16286

color13 = #d3869b

color6 = #689d6a

color14 = #8ec07c

color7 = #a89984

color15 = #ebdbb2

You can now start termite terminal emulator on Ubuntu 22.04|20.04|18.04|16.04 Desktop from the terminal or Applications launcher.

install-termite-ubuntu-18.04-ubuntu-16.04-02

To test which terminal emulator you’re currently using, use neofetch

sudo apt install -y neofetch

The run neofetch command. You should get termite on the Terminal section.

install-termite-ubuntu-18.04-ubuntu-16.04-03

Common Issues

When Termite is using remote SSH connection sometimes the error occurs: Error opening terminal: xterm-termite. or Open terminal failed: missing or unsuitable terminal: xterm-termite.

To fix the above error, execute this command on the remote system.

export TERM=xterm-color

If your system support 256 color, use:

export TERM=xterm-256color

To make this persistent, put the line in your ~/.bashrc or ~/.zshrc file.

$ vim ~/.bashrc 

# Add line at the end of file

# export TERM="xterm-256color"

export TERM=xterm-color

Save the file and exit, the source it.

$ source ~/.bashrc

#or

$ source ~/.zshrc

Usage Cheat Sheet:

  • Copy selected text in insert mode: Ctrl+Shift+c
  • Paste: Ctrl+Shift+v
  • Start scrolling completion: Ctrl+Tab
  • Scroll the screen up or down: Ctrl+Shift+Up / Ctrl+Shift+Down
  • Enter selection-mode: Ctrl+Shift+Space
  • Opening a new tab: Ctrl+Shift+t

If opening a new tab through Ctrl+Shift+t fails with no directory uri set, source /etc/profile.d/vte.sh

source /etc/profile.d/vte.sh

Since we built our VTE from source, this will be something like:

source /etc/profile.d/vte-2.91.sh

Many Termite commands are borrowed from Vim. Enjoy using termite on your Ubuntu 22.04|20.04|18.04|16.04 system.

https://www.computingpost.com/install-termite-terminal-emulator-on-ubuntu-22-0420-0418-0416-04/?feed_id=20515&_unique_id=637b1c1bd0619

--

--

ComputingPost

ComputingPost — Linux Howtos, Tutorials, Guides, News, Tips and Tricks.