SPLITVT(1)
π NAME π
okay so this is splitvt(1) β it lives in the NONESSENTIAL UTILITIES section of the manual, and it does exactly one iconic thing: run two shells in a split window. two. shells. one screen. we love a multitasking queen π
β¨ SYNOPSIS β¨
splitvt [options] [shell]
π OPTIONS π
-uppercommand β runs command in the upper window π«Ά-lowercommand β runs command in the lower window π«Ά-bottomβ starts with the focus already chilling in the bottom window, no cap-snumlines β sets numlines as the number of lines in the top window. heads up tho: this number will get modified if your screen isn't big enough to handle the full size π-ttitle β sets an xterm title bar to title π-loginβ runs the programs under each window as though they were login shells. this is the move if you wantcshto source its.loginfile,bashto source.profile, etc.-nologinβ overrides anyset login onstatement you've got sitting in the startup file. periodt.-rcfilefile β loads file as the startup file instead of~/.splitvtrc-norcβ suppresses loading your~/.splitvtrc-fβ allows setting the height of either the top or the bottom window to less than 3 lines π¦-vβ prints out the version number ofsplitvt
πΈ DESCRIPTION πΈ
so the whole vibe: this program splits the screen into two windows, one stacked above the other, and runs a shell in each one. the default shell is taken from the SHELL environment variable, or /bin/csh if SHELL isn't in the environment β but bestie, you can absolutely specify another shell on the command line. main character energy.
the top window is the default current window, but you can switch to the other one by pressing ^W. pressing ^V will quote the next character to the current shell. pressing ^O will put splitvt into command mode. π₯
these special characters (command mode, switch window, and quote next character) can all be modified from within the .splitvtrc file. customization is self care π
when you're in command mode, splitvt reads one non-numeric character, performs the requested command, and then reverts to normal operations. numeric characters get interpreted as a parameter for the specified command. the currently supported commands are:
hβ print a help window for the escape commands-β shrink the current window+β expand the current windowcβ select a block of text in the current windowpβ paste the selected text to the current windowkβ kill the current window (hangup signal)xβ lock the screen, after prompting for passwordrβ repaint the screen (clearing screen garbage)qβ quickly quitsplitvt, killing the running shells
more functions may be added in the future. π
if the -s command line option is used, the upper window will be bound to the user defined number of lines even if the screen is resized. otherwise, the screen gets split into two equal parts based on the new size of the screen.
the environment variable SPLITVT is set in the shells forked by splitvt. in the shell running in the upper window, this variable is set to the value "upper", while the shell running in the lower window has this variable set to the value "lower". this is genuinely so useful in shell scripts, because it lets you provide different behavior depending on which window the script is running in. an example of this is shown in the file "menu" in the examples directory in the splitvt distribution. iykyk π§
π the startup file: .splitvtrc π
when splitvt starts up, it looks in your home directory for a file named .splitvtrc. you can set a number of parameters from within this file, including all of the special characters, the default number of lines in the upper window, whether or not to run the commands as login shells, and even default commands to run in each window. obsessed.
here's an example of a .splitvtrc file:
# This is an example .splitvtrc file.
set command_char ^O
set quote_char ^V
set switch_char ^W
set upper_lines 12
run -upper /bin/sh
run -lower top
set login on
# This next line would override the above run statements
#run /bin/tcsh
β random but important stuff β
if programs like vi are doing strange things to the window while in splitvt, you probably need to set the LINES environment variable to a correct value, or set the terminal's window sizing correctly. this should be done automatically, but it may need to be corrected. π
if you're running under an xterm window, the title bar will probably be updated to show the version of splitvt that you're running. under a true xterm window, you can also switch which half of the window you're typing into by clicking the mouse in the half of the window in which you want to type. you can also drag and drop the separator bar by pressing down on the mouse button over the separator bar, holding it down, moving the mouse to where you want the bar to end up, and then releasing the button. drag and drop separator?? iconic behavior π
splitvt will attempt to erase the current utmp entry, and replace it with entries for the two windows. this allows you to use programs such as talk within the splitvt windows. if you do not have write permission to the /var/run/utmp file, you will not be able to modify the utmp entries. π
splitvt can be made set-uid root. splitvt will reset its user id to that of the person running it, just before it exec()'s the shell under the window. the splitvt process remains with root permissions, and will change ownership of the pseudo terminals to that of the person running splitvt, and then reset it to root when the window is closed.
SPLITVT IS NOT GUARANTEED TO BE A SAFE SET-UID PROGRAM! π
i have done all i know to keep splitvt a safely usable set-uid program, but i do not know everything, and am not responsible for any security weaknesses splitvt might posess.
π BUGS π
when used with a certain public domain version of ksh, you have to manually kill -9 on the shell processes after you quit splitvt. this has to do with a bug in that version of ksh (Version 06/03/86a and possibly others). so rude of that ksh.
if splitvt is compiled with xterm support, when run under an xterm, the cut and paste feature is semi-disabled. the title bar may also be reset to the string "xterm" after splitvt quits. see the comments at the top of splitvt.c for how to disable xterm support.
Ansi colors are not repainted on screen refresh. yeah. that one stings.
π¦ CAVEATS π¦
there may be conflicts between splitvt's characters and other programs. you can either change splitvt's default characters with command line options, or you can type Ctrl-V (the quote character) within splitvt, and the next character typed will be sent to the current window, no matter what it is.
splitvt can only be used by terminals using vt100 emulation, due to the use of specific vt100 escape codes. (vt300, xterm, Linux console, etc, emulation also works). so like, know your terminal bestie.
when running in an xterm, if you press the escape key, you will have to type another character in order for the escape to be seen by the running program. one extra keystroke tax π
π AUTHOR π
Sam Lantinga β slouken@cs.ucdavis.edu
and that's the whole page, bestie π«Ά this one came out of the SPLITVT manual, dated 1/5/95 β go split some windows, you've got this β¨
π¦ where this page comes from
- debian bookworm: splitvt 1.6.6-13+b1 Β· GPL-2.0-only
- debian trixie: splitvt 1.6.6-17 Β· GPL-2.0-only
- ubuntu jammy: splitvt 1.6.6-13build2 Β· GPL-2.0-only
- ubuntu noble: splitvt 1.6.6-16 Β· GPL-2.0-only
- ubuntu questing: splitvt 1.6.6-18
- ubuntu resolute: splitvt 1.6.6-19 Β· GPL-2.0-only
- ubuntu stonking: splitvt 1.6.6-20 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms