This is a terminal emulator for X11, distributed under a BSD licence.
It has the following features:
- Embedded font.
- No terminal colors.
- Amenable to static linking.
- Scroll buffer.
- Copy and paste keyboard shortcuts.
- Different color scheme for each tab.
I wrote it out of frustration with termit
. Although it's a very nice terminal emulator, it has some
The first one is the lack of keyboard shortcuts to navigate between tabs.
I added some shortcut for it using ctrl-tab, but it's not very productive.
The second one is the inability to change the terminal color settings
quickly. Often, I have multiple tabs open and I get confused about which
tab does what. I thought about making them different colors so that I
can easily see which is the compiler window, which is the debugging window
The third one is a minor issue, but sometimes significant. With VTE
derivatives, in order to paste some text, you need to move the mouse
pointer on the terminal cursor. This is just
inconvenient. With muterm, you can paste no matter where the mouse
Here are some snapshots I took during development:
- 1.0 Basic version with none of the
- 1.1 Scroll buffer.
- 1.2 Selections, copy and paste.
- 1.3 Tabs.
- 1.4 Various bug fixes.
- 1.4 More alternate set characters. Mouse scroll is shortcut for pageup/down in fullscreen mode.
The previous versions can be used to build other software, but the latest
version contains a lot of bug fixes. So, it might be a good idea to look
at the latest version also if you want to use the prior versions for
Run the muterm binary with the name of the program and its arguments.
muterm /bin/bash -l
will work. Not specifying a program in this way will cause muterm to
try running "/bin/bash", "/bin/sh", etc.
Keyboard shortcuts are explained within the program itself. Just
The code is quite modular. X11 graphics, tab handling, main program flow
and the terminal emulation parts are all separate modules. These can be
extracted to build something else or to port it to another platform.
For example, the graphics module interface simply needs a way to show
an image on the screen and the ability to get keyboard/mouse input.
Similarly, the terminal emulation part only needs to print some characters
on a screen and set the cursor position. You could do this in a memory
buffer to automate programs, for instance.
There are some things to do, when I have the inclination:
- There is no way to resize the thing. It's 80x24. I like it this way,
but there might be an occasion to have a bigger terminal etc.
- Colors and font size can be configured only from the source code.
I made choices suitable for my current hardware and preferences,
but it would be better to make it configurable at run time. It's
just too much work to make the necessary dialogs etc. There is
nothing inherent in the program which hinders this.
The program can also be linked statically. I made it work with
the following settings in makefile:
X11LINK=-lXrandr -lXrender -lXext -lX11 -lXau
CFLAGS= $(CCWARN) $(FTCOMPILE) $(DEBUG) $(OPTI)
LFLAGS= -static $(FTLINK) $(X11LINK) $(DEBUG) $(EFENCE) -lpng -lbz2 -lz
The resulting file was about 2 MB.
Here are some links that were useful while developing this: