Getting started with the Tilix terminal emulator

The EMULATOR

© Lead Image © Luká Gojda, 123rf.com

© Lead Image © Luká Gojda, 123rf.com

Article from Issue 209/2018
Author(s):

A terminal emulator with innovative features makes working from the command line easier and more efficient.

When people talk about the command line these days, more often than not they mean a terminal emulator – a terminal running from a desktop environment. The most common exceptions are system administrators or old Unix hackers who are running without a desktop. Yet, despite the widespread use of terminal emulators, they have evolved little, if any, in the last two decades. As far as average users are concerned, the functional difference between, for example, Gnome Terminal and Konsole is minimal. What is unusual about Tilix (formerly Terminix) [1] is that it offers a wealth of innovative features that make working from a terminal emulator more efficient, from the basic features on the titlebar to the options available by drilling down into the preferences and profile settings.

In order to use Tilix's full set of features, you may need to make some adjustments. The problem is that Tilix uses the Virtual Terminal Emulator (VTE) Gtk+ 3 widget. VTE's configuration includes /etc/profile.d/vte.sh, which overrides the PROMPT_COMMAND in order to set which current directory to use when it is running. However, while this arrangement works in some distributions, such as Fedora, other distributions, such as Arch and Ubuntu, execute scripts in /etc/profile.d only for login shells. Since by default VTE does not run in login shells, the result is that some of Tilix's features, such as notifications, will not work immediately after installation.

What this situation means is that, in order to make use of Tilix's full set of features, you may need to modify the .bashrc or .zshrc file in your home directory to execute vte.sh directly or set each profile on its Command Page to run as a login shell, as described on the Tilix website [2]. Alternatively, you may decide to ignore the issue, since even without the adjustment, Tilix retains its basic functionality and still has plenty of features that are unaffected by VTE's configuration.

Default Features in the Main Window

Tilix's titlebar includes several key features besides the configuration icon on the far left and the usual titlebar buttons for maximizing, minimizing, and closing the window on the far right. Second from the left is a toggle for a sidebar that displays all the open terminal windows in a pane on the left of the window, like the one for showing presentation slides in LibreOffice's Impress.

If you prefer, you can make the sidebar open on the right by clicking the configuration icon and selecting Preferences | Appearance | Place the sidebar on the right. Starting with Tilix 1.7, you also have the option of using tabs instead of the sidebar. However, one advantage of the sidebar is that, if your close-up vision is up to the task, you can see exactly what each terminal contains – and, even if you can't, you may be able to distinguish a terminal by the general appearance of its contents. And changing terminals in the sidebar is certainly more efficient than a separate desktop window for each terminal. You can add terminals by clicking the plus sign third from the left in the titlebar (Figure 1).

Figure 1: Tilix offers the option of displaying open terminals in a sidebar.

However, Tilix does not have to create a new window or tab to give you access to another prompt – although you can create either by using the tilix command from within a running instance, as explained in the man page. Instead, you can use the next two icons from the left to split the current screen vertically or horizontally (Figure 2). The tools on the far right before the standard titlebar icons are designed to make working with split screens easier. You can search for text in the active prompt, name the active prompt to make it easier to find, or even synchronize all the prompts, so that what you type in one is entered automatically in the others. For instance, if each prompt has a different current working directory, you could enter the ls command just once to see the content of each directory and then enter clear to remove the output at each prompt before turning synchronization off (Figure 3). In addition, each prompt can be dragged and dropped to a new position in the Tilix window in order to keep your work organized.

Figure 2: Terminals can be split to display multiple terminals in the same window.
Figure 3: Synchronizing prompts can reduce typing. Here, entering the ls command at one prompt displays the contents of the working directories at all three prompts.

Within each prompt, you also have other options. From the titlebar's context menu (Figure 4), you can set the current prompt to read-only or password-protect. The context menu also gives you access to bookmarks to increase navigation speed and opens your desktop's default file manager. From the Other submenu, the context menu also lets you save output to file, a more efficient alternative to creating a file than copying and pasting to it.

Figure 4: Each terminal has its own menu of options.

Cosmetics and Functionality

The controls in the main window would be enough by themselves to justify Tilix. However, they are just the beginning. To start with, like most terminal emulators, Tilix profiles support a wide variety of customizations. From Preferences | Appearances, you can set general options such as the default theme. These general options can be overwritten by specific profiles (Figure 5). For instance, the General page for each profile has options for setting the default terminal size, the cursor, notifications, and font size, weight, and family. Other tabs set background and foreground colors and scrolling options. All the customizations in a profile override the general options in Preferences | Appearances (Figure 6), which include the default theme.

Figure 5: Each profile has six tabs full of cosmetic and functional customizations.
Figure 6: Tilix's Preferences set default options that can be overridden by a profile.

However, what makes Tilix stand out is not cosmetic features but functionality. If you want to be notified when a running process not currently displayed is finished or to use triggers to run certain commands when defined conditions are met, you will need to configure VTE as defined above. But even without VTE being fully functional, Tilix still has numerous features to help streamline functionality. For example:

  • From Preferences | Appearance, you can choose an image to appear as a watermark in the background.
  • From General | Terminal in any profile, you can change the contents of each prompt's title – a feature that can be useful in helping to locate it when multiple prompts are open.
  • Right-clicking at a prompt allows you to paste. From Preferences | Global, you can choose, among other options, to use the advanced paste dialog, which gives options to convert spaces to tabs, adjust carriage returns, or copy by selecting characters with the mouse.
  • Save and restore the current state of a terminal from Preferences | Global.
  • Click hyperlinks in the terminal to open them in your desktop's default web browser.
  • Set a Quake-style hotkey for quick opening of a terminal that is designed to work in Wayland. Preferences | Quake sets the size and position of the terminal that opens with this feature, as well as the option to have it open on all workspaces, and to add it to the active monitor when multiple ones are used.
  • Customize automatic profile switching in a profile's Advanced page.

The total number of features is actually impossible to list and detail without making this article at least twice as long. Many have the virtue of simplicity, yet if you are anything like me, after using them for a while, you may wonder how such an obvious feature has escaped being standard in other terminal emulators.

Some Drawbacks

Tilix is in rapid development, which can sometimes cause problems. The problems may be minor. For example, Custom Links, which will open in a web browser when clicked, are still listed on Preferences | Advanced, when experimentation shows that links no longer have to be entered for this feature. Nor has the documentation been kept up to date with the features in every case.

More seriously, in my experience, settings may work inconsistently, either requiring a restart of Tilix to apply or else not working at all. Very occasionally, Tilix freezes or crashes.

Still, these drawbacks are not surprising. According to the Debian package pages, the main Tilix package is almost six times larger than the Bash package – 35,000 KB to Bash's 6,000. Tilix is still small enough that it can be used with limited memory, but the difference in size reflects how many more features are packed into Tilix than a standard shell.

What I like about Tilix is that its developers are rethinking a part of Linux that everyone has taken for granted for years. Even if you don't use all of its features, you are still likely to find half a dozen that make working from the command line easier and more efficient. Tilix, I submit, is free software at its best.

The Author

Bruce Byfield is a computer journalist and a freelance writer and editor specializing in free and open source software. In addition to his writing projects, he also teaches live and e-learning courses. In his spare time, Bruce writes about Northwest coast art. You can read more of his work at http://brucebyfield.wordpress.com

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News