x-terminal-emulator is a virtual package for the terminal emulators. A virtual package is just a logical term, which signifies the common features that are being offered by various other packages. Hence, there are several packages which provide the virtual package – x-terminal-emulator. Few of such packages are gnome-terminal, konsole, lxterminal, mate-terminal, pterm, xfce4-terminal, xterm etc. In this article, we would discuss how to change default terminal emulator in Ubuntu distribution.
All these above mentioned packages provide features which are similar in nature. However, these packages may differ in the manner in which few of the common features are offered. Otherwise, underlying functionality remains the same. Terminal emulators can execute variety of tasks including providing us the access to default shell of our Ubuntu distribution. We can access shell interface through both command-line as well as graphical user interface. gnome-terminal, lxterminal, xfce4-terminal etc. are the packages which let us access shell through graphical user interface. Also, we can access command-line shell interface through shortcut key – Ctrl+Alt+F1…F6.
Change default Terminal emulator in Ubuntu
Our default terminal emulator is the one which comes packaged with our Desktop environment. So, if we chose to install LXDE then our default terminal emulator would be lxterminal. However, if we are not comfortable using lxterminal and would want to install some other terminal emulator(lets say gnome-terminal) instead. Then, we need to install the one(i.e. gnome-terminal) first before making any changes to the default entries. The following operations may require superuser privileges. Contact your system administrator if you don’t have one. We can install the terminal emulator of our choice by using apt-get command.
sudo apt install <package-name>
for instance,
sudo apt install gnome-terminal
Once, we have finished installing the terminal emulator of our choice. Run the following command in the terminal –
sudo update-alternatives --config x-terminal-emulator
The term x-terminal-emulator has already been explained in the beginning of the article.
You could see the * mark against selection 4 – /usr/bin/lxterminal. This shows our current default terminal emulator. Also, the output lists all the terminal emulators installed on our operating system. Here, we have nine of those installed.
You need to enter the selection number for updating the default terminal emulator. Otherwise, if you want keep the current configuration then press <enter>.
If you chose to enter a selection number instead, then the output would resemble –
update-alternatives: using /usr/bin/<terminal-emulator> to provide /usr/bin/x-terminal-emulator (x-terminal-emulator) in manual mode
This will successfully change your terminal emulator to the one of your choice. You can verify by using the shortcut key Ctrl+Alt+T. The shortcut key may not work for all the desktop environments in Ubuntu. We can bind the key to execute a particular instruction, which will be discussed in coming articles.
In conclusion, we have discussed virtual packages and how to change the default terminal emulator of our Ubuntu distribution thereafter.