VTPRINTCAP(5)
β¨ VTPRINTCAP β¨
ok so bestie, welcome to the vtprintcap manual page π this is the File Formats Manual section, and honestly? it's giving "tiny database, big responsibility" π
πΈ NAME πΈ
vtprintcap β the database of terminal printer control codes π
π SYNOPSIS π
/etc/vtprintcap
π¦ DESCRIPTION π¦
ok so vtprintcap is literally just a simple flat file database, no cap. it's got a list of the names of various terminals, plus the codes those terminals use to start and stop an attached printer (that's media hard copy, bestie π¨οΈ). this database gets used by vtprint(1) and its related programs. it's the whole vibe.
every entry is made of three lines, periodt:
- the first line is a comma-delimited list of names you can use to reference this entry π―
- the second line is the sequence of characters the terminal uses to turn ON an attached hard copy device and redirect output to that device
- the third line is the sequence of characters used to turn the device OFF and restore normal output to the screen
an entry must have all three lines to count as valid. no partial entries, no half-sends, we don't do that here π
β οΈ and currently, no comment lines are permitted to exist between these lines! if you sneak one in there, it gets interpreted as the printer control codes themselves. like, it will literally be read as the codes. do not do this bestie i am begging π
the rules for picking a terminal name are simple: you have to follow the same rules as for /etc/termcap(5) names. terminal names should be entered in /etc/vtprintcap with exactly the same names as they are in /etc/termcap. matching names, matching energy, that's the rule β¨
now, the control code strings in the second and third lines of an entry are governed like this: ANSI C style escapes for character constants (like \n for newline) are permitted β
, constant strings are permitted β
, and quotes may be used as delimiters in the string β
. (this one is a lifesaver if you wanna use a digit immediately following a numeric escape. for example, ESC-5 should be represented as \033"5" to avoid confusion with \335. the quotes are doing so much work there honestly π
). in general, the rules outlined for ANSI constant escaping are enforced.
and additionally β plot twist π¬ β /etc/vtprintcap may contain comment lines, which you indicate by placing a hash mark (#) in the first column of the line. but remember: entries must not be broken up by comment lines! π¨ do not split the trio, the trio is sacred.
π EXAMPLE π
here's a sample entry that's common to DEC vt100 and vt102 terminals, iconic behavior truly π
# Sample vtprintcap entry for vt100 & vt102 terminals
vt100, vt102
\033[5i
\033[4i
this entry would get used whenever the user's TERM environment variable was set to "vt102" or "vt100", using ESC [5i and ESC [4i as the printer control codes to turn a printer on and off, respectively. see how it works? chef's kiss π€
π DISTRIBUTION π
vtprintcap is part of the vtprint package, which you can get by anonymous ftp at ftp.sdsu.edu in the /pub/vtprint directory π°οΈ please read the INDEX and README files before downloading, fr fr. they're there for a reason.
if you do not have ftp availability, then you can request a uuencoded copy of vtprint be sent to you via e-mail from the author π§. the author is also willing to make other arrangements as needed, within certain limitations. very generous, very demure π
π FILES π
/etc/termcap/etc/vtprintcap
π BUGS π
ok so the vtprintcap handling code currently could get confused if a printer control code is exactly the same as the name of a terminal, or if it contained the name of a terminal delimited by commas π΅βπ«
as this is very unlikely to ever occur, it shouldn't be a problem. lowkey chilling, highkey fine π«Ά
β SEE ALSO β
and that's the whole page bestie!! π this was vtprint v2.0.2, dated 25 October 1994 β yeah she's vintage, she's a classic, she predates most of us and she still slays πβ¨ go forth and configure your printers, ily, bye ππ
π¦ where this page comes from
- debian bookworm: vtprint 2.0.2-15 Β· Custom-GarrettDAmore-Expat-like
- debian trixie: vtprint 2.0.2-15 Β· Custom-GarrettDAmore-Expat-like
- ubuntu jammy: vtprint 2.0.2-14
- ubuntu noble: vtprint 2.0.2-15 Β· Custom-GarrettDAmore-Expat-like
- ubuntu questing: vtprint 2.0.2-15
- ubuntu resolute: vtprint 2.0.2-15build1 Β· Custom-GarrettDAmore-Expat-like
- ubuntu stonking: vtprint 2.0.2-15build1 Β· Custom-GarrettDAmore-Expat-like
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms