4

I am used to working with multiple tabs in gnome. Opening a new tab can be done easily with Ctrl+Shift+T as well as switching between tabs (Left Alt+tab number). What are the Xterm equivalents?

4 Answers 4

4

You need to use an external tool called a terminal multiplexer such as GNU screen/tmux. I don't think that xterm itself can open multiple tabs.

1
  • 2
    You should really get used to GNU screen / tmux for whatever purpose. When you learn about the features of the terminal multiplexers you will answer a question for many terminal tabs with: Why? You can not only switch the terminal screens with the multiplexers, but start an interactive remote session, drop it to background and drop the connection. Than login back to the remote any time in the future and reconnect to your left session, as if you never closed the connection. Actually the program that runs in the terminal session did not even see you leave.
    – ikrabbe
    Jun 25, 2015 at 19:07
3

The true xterm is a powerful and versatile tool that adheres to the Unix Philosophy of "Do one thing and do it well."

xterm is by no means a "basic" or "bootstrap" terminal. In fact, "TERM=xterm" is literally the one all others are based on and/or compared to.

But xterm can take some work to get working the way you would like -it is highly configurable- and it does NOT have things like "tabs" because window / session management is not it's job.

It is much more correct in handling terminal escape / command sequences than something like "gnome-terminal".
This can be verified by simply installing & running "vttest". It also supports things like OSC 52 which VTE-based skins like "gnome-terminal" do not, last I checked. xterm uses about 1/4 of the RAM of gnome-terminal on my boxes. xterm can be configured to be just as fast as gnome-terminal - and the speed is virtually identical when running something like tmux. It also has a fraction of the dependencies of gnome-terminal.

Configure tmux or screen to your liking and then you have a portable configuration with splits, tabs, and more that can be used on virtually any system - from a bleeding-edge Linux to HP-UX / Solaris / AIX / *BSD.

With all things "xterm-related", the source of truth is Thomas E. Dickey at XTERM - Terminal Emulator and if anything he posts seems to contradict what I posted here then I stand corrected.

2

Xterm doesn't support tabs. It is a basic, bootstrap terminal window for X11. For tab support, use a terminal designed to support your GUI. gnome-terminal-server is the most common one, used in both Ubuntu and Fedora. It does support tabs, as well as the hot keys you list: Ctrl+Shift+T, Left Alt+Tab#, and Ctrl-PgUp/PgDown for tab control.

4
  • 1
    The only feature that makes me stick to xterm is dabbrev-expand. But I got used to GNU screen features such as windows (actually tabs) management, backticks, possibility to re-order windows without using a mouse, copying/pasting between windows without using a mouse, copying text to X clipboard without using a mouse. So if OP wants he can keep on using xterm but he will soon an additional program such as screen/tmux to make it usable. No absolute need to switch to gnome-terminal but, of course, YMMV. Jun 25, 2015 at 16:39
  • Very true. Anyone who has an admin or devops role will have a lot to gain by having these powerful features, especially over remote connections. The only downsides are lack of same visual aesthetics and additional initial setup.
    – Paul
    Jun 25, 2015 at 19:12
  • Oh, and I forgot about screen sessions management capabilities of course such as deattaching from a session and attaching back to it. Very useful. Jun 25, 2015 at 19:27
  • I think you can use dabbrev-expand with any terminal if Readline is your command line parser. stackoverflow.com/a/5975947/3794873
    – dragon788
    Oct 12, 2020 at 22:01
0

I never use fat clients like gnome-terminal-server only for tabs. Xterm is lightweight, universal and sophisticated. Together with screen it will do more than gnome-terminal-server alone or something else (OK, you can use that also with screen). But there is a little problem not only for Xterm. Terminals are often used to ssh into remote machines. If you start xterm and within it a screen then in this screen you can ssh into your remote machine. On this remote console I like to have also screen running, but here is a screen in a screen and you can't switch the remote screen with ctrl-A. You only switch your first screen.

You can open a second tab (without starting screen) ssh to your remote machine and start screen. With Xterm I simply open a second window for this and I can toggle the windows with Alt-Tab like on tabs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.