Reimagining the Virtual Desktop
Final Term
ByA new Linux terminal emulator tries to bring the command line into the 21st century and bridge the gap to the graphical user interface.
Terminal emulators have existed as long as the Linux desktop, representing the command line on the desktop. However, although they have been integrated into the desktop with tabs and copy and paste commands, in other ways. they are identical to the command lines of the 1970s. Now Philipp Emanuel Weidmann is hoping to change that with Final Term, a project that provides an enhanced command line that takes full advantage of graphical interfaces.
Weidmann is a graduate of the University of Heidelberg with a major in mathematics and a minor in philosophy. Although he describes himself as “a Java EE developer,” he also has experience in web and application development and database design. Final Term is his first open source project, written in Vala and using the Gtk+ toolkit.
Weidmann’s thoughts about the command line begin with him noting that “one of the classic tenets of the Unix philosophy, usually attributed to Doug McIlroy, is, “Write programs to handle text streams, because that is a universal interface.” However, he adds that, in reality, an unstructured text stream is “everything but a universal interface” and that a command line written today from scratch would probably use some form of structured data.
However, such a rewrite, he acknowledges, is unlikely to happen – over several decades, the command line “has amassed a fundamentally flawed but highly reliable and efficient ecosystem that is likely to rule Unix administration for more decades to come.”
Final Term is an effort to bridge this gap between what Weidmann thinks a command line needs to be and what it is likely to remain: “an xterm-compatible terminal emulator that uses some sophisticated trickery to add a semantic layer on top of the unstructured shell output so that the shell user can move to the 21st century while waiting for his shell to do the same.” Final Term was inspired by Steven Wittens’ TermKit, but Weidmann considers TermKit “too far ahead of its time” to be an option for most users.
Weidmann began Final Term in 2012 as a project in his spare time. In April 2013, he put the project on GitHub. After a month of seeing it be ignored, he tried to create some social media buzz. His effort was so successful that Final Term now has “more than a dozen” contributors. “Some of the most important architectural changes that Final Term has seen since its release, such as porting the build to CMake and making the strings localizable, were done by other people,” he says. “Which is great because I lack experience with the underlying technologies.”
Exploring Final Term
Final Term is currently in pre-alpha release. The general release, according to Weidmann, will add tabs and copy and paste functionality, but in other ways it is advanced and stable, considering its present state, with many of its unique features already implemented and stable.
Source code is available on GitHub, but the easiest way to install Final Term is with the Ubuntu packages on Launchpad. The interface appears designed for Unity, so configuration options are available by right-clicking on the application in the title bar.
Right away, you will notice that you can use the mouse as well as the keyboard to navigate Final Term. However, the best way to begin exploring other features is to watch the video on the project’s front page, then scroll down the page’s list of features. After you type at the command line, the first feature you are likely to notice is that the output at each prompt is collapsed so that only the initial command displays (Figure 1). You can use the arrows on the side of the window to expand or collapse each section of output. It is a simple feature, but one that vastly speeds scanning the previous display.
The next thing you might notice is the smart command completion (Figure 2). Many shells boast this feature, of course; however, what makes Final Term’s implementation powerful is that suggested completions are in a drop-down list that includes all possible completions listed in your history, sorted by probability.
Similarly, Final Term recognizes common features of output, such a file names, URLs, and IP addresses. Right-click on an item in the output, and you are offered a list of possible commands (Figure 3). For example, for a URL, the options include Copy URL to clipboard and Open URL in browser, whereas options for a file include displaying attributes, copying or moving, and opening in an editor.
Final Term includes other features, such as the ability to drop down from the top of the desktop and to reflow – that is, to rewrap lines when the window size changes. Other features include choices for key binding and color coding (Figure 4); the selection of colors and themes offer more choices than in other terminals, but otherwise they are fundamentally the same.
However, what stands out is the collapsible prompts and the drop-down lists of command completions and command options. Like the Bluefish text editor, these tools remove the drudgery of entering standard or repetitive commands manually while leaving users always able to see what is happening and to control things. This can be a difficult place for an application to position itself, but it often makes for the most efficient tools, and Final Term is no exception. In doing so, it makes itself feel more like a desktop tool than any other terminal emulator I have seen – all without simplifying or hiding input or output from the user.
Ongoing Challenges
“The biggest challenge left in Final Term’s development,” Weidmann says, “is the most basic feature of any terminal emulator: interpreting the xterm control sequences.” He explains that most Gtk terminals are built on top of VTE, which simplifies their development. However, because Final Term includes (or plans to include) some unique features, “it must indeed reinvent the wheel in many ways.”
To some extent, working with free software helps the project. In fact, according to Weidmann, “without access to the source code of other terminal emulators, writing a new one would be downright unthinkable.”
Even so, code borrowing is rarely an option. “It doesn’t help that most terminals that have been in development for a while have grown into unmaintainable monstrosities,” Weidmann says. “Even simple terminals commonly have 10 times as many lines of code as Final Term has right now.”
Weidmann blames this bloat on the C programming language that many terminals use, “which makes it hard to build a proper model of anything.” He hopes to do better with Vala, which, while “far from perfect, allows for much cleaner separation of concerns and a solid foundation that will enable easy maintenance and extensibility in the future.”
As with many projects, Final Term’s roadmap is vague. Weidmann hopes for at least a beta release some time in 2013 and to be ready for distributions in 2014. An OS X port is also being done, while queries from early adopters suggest that a Qt port might be more or less inevitable.
Asked about Final Term’s intended audience, Weidmann’s first response is “Definitely everyone!?” He continues: “Final Term can act as a nice learning environment for command-line neophytes, but even greater is the impact it can have on a power user’s productivity and speed. Autocompletion in particular accelerates finding the desired command enormously and usually reduces it to typing one or two letters, the down arrow, and enter.” Indeed, Final Term’s eventual (though not exactly humble) goal is to make obsolete all other terminal emulators in use today and become the default terminal in the majority of Linux distributions (at least those based on Gtk+).
Judging from some of the grumblings, Final Term may face a hard sell appealing to some long-time Linux users. “Too much reliance on graphical elements and the mouse,” one commented. “Curses and keyboard only or it doesn’t happen.”
For new users or those less confirmed in their habits, though, Final Term just might be the application that proves the continued relevance of the command line. Its development and degree of acceptance should be interesting to track in the next year or so.
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.
-
New Slimbook EVO with Raw AMD Ryzen Power
If you're looking for serious power in a 14" ultrabook that is powered by Linux, Slimbook has just the thing for you.
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.