vtm Is A Text-Based Desktop Environment That Runs Inside A Terminal

vtm desktop environment in a terminal

vtm is a text-based desktop environment that runs inside a terminal, available for Linux, Microsoft Windows, macOS, and *BSD.

The tool can run TUIs (terminal user interface) applications in floating windows that can be moved, resized and closed (mouse support included) just like windows in a traditional desktop environment. 

vtm is a terminal multiplexer too, like tmux and screen, allowing users to detach and reattach sessions from a terminal, allow multiple computers to connect to the same session at once, etc. Just click the Disconnect button, and the vtm TUI is closed, but the process continues to run in the background, allowing you to re-open it later.

As for supported terminals, vtm should work with most of the popular terminal emulators, including GNOME Terminal, Konsole, Xfce4 Terminal, kitty, Alacritty, xterm, st, iTerm2, Windows Terminal, Windows Command Prompt, and Termux.

This is a very short vtm demo I've recorded to show its window management features:

As you can see in the video, vtm comes with an application launcher that slides from the left. From there you can launch applications, access its settings (right now it only has a frame rate setting), disconnect from vtm or shut it down.

Besides allowing you to run third-party TUI applications in their own windows, vtm also comes with a few built-in applications: 

  • a terminal emulator (required to run external TUIs),
  • tiling window manager,
  • workspace navigation helper,
  • a few demo applications.

You might also like: Zellij Is A New Terminal Multiplexer Written In Rust

Adding third-party TUI applications is quite easy. Start by creating the vtm configuration file using the example available on its GitHub page. Copy the sample configuration and paste it into ~/.config/vtm/settings.xml. This sample configuration includes a commented out entry for mc (Midnight Commander)—uncomment it to give it a try (remove the <!-- and --> surrounding the mc line), and you'll now have this in your configuration file:

<item id=mc         label="mc"         type=SHELL    title="Midnight Commander"    param="mc"               notes=" run Midnight Commander in its own window "/>

In the same way, you can add other TUI applications to vtm. For example, to add htop, you'd use:

<item id=htop         label="htop"         type=SHELL    title="htop"    param="htop"               notes=" run htop in its own window "/>

After making changes to the vtm configuration file, make sure you close vtm using its Shutdown button (and not Disconnect - this leaves it running in the background), then start it again. Once you add a new application, it should be listed in the vtm launcher.

I've been using vtm for a few days, and so far my main issue with it is the way it copies text inside the built-in terminal. You need to RightClick to copy the selection, then paste using RightClick. The clipboard content is rendered around the mouse cursor, which is nice, but can be annoying at times. The local clipboard buffer can be cleared using Left + RightClick anywhere. Also, you can't paste the text outside vtm unless the terminal supports OSC 52, and VTE terminals, like GNOME Terminal, don't support this.

The plan is for vtm to become a GUI application, which means adding a GUI frontend to vtm that only displays a cell matrix. This way, the application will no longer be constrained by the external terminal's capabilities—this will allow integration with the operating system's clipboard, among other things. Until then, you'll have to get used to the current clipboard behavior if you want to use it.

It's also worth noting that while vtm acts like a desktop environment, it needs a graphical terminal emulator to run, so you can't use it as a fully fledged desktop environment. If you want to make it look like a text-based desktop environment, you could run a terminal window in full-screen and set it to launch vtm on startup.


Install vtm



On the vtm releases page you'll find binaries for Linux, macOS, FreeBSD, OpenBSD, NetBSD, and Microsoft Windows. Extrat the downloaded archive, then with a terminal opened in the folder where the extracted vtm binary is located, install it to /usr/local/bin using:

sudo install vtm /usr/local/bin/