Printing - issinoho/veetee GitHub Wiki
Printing
veetee has the printer port a DEC terminal has, from 1.5.0. What the host prints on the terminal's printer, and what you print from the screen, go to a PDF or to a real printer.
Where it goes
Chosen in the window menu:
- Print to Folder… — each print job becomes a PDF in the folder you choose. Until you choose, it is your Documents folder. A message says where each one went, with a button to open it.
- Print to Printer… — the system print dialog, once: pick the printer, and a test page prints. From then on every job goes straight to that printer with no dialog, as to a printer on the terminal's port, even after veetee is restarted. On Linux the job goes through CUPS; on Windows, through GTK's own printing.
While something stands in for a printer, veetee tells the host a printer is ready (CSI ? 15 n
answers CSI ? 10 n) and the indicator status line says Printer: Ready.
Each job is drawn in a monospaced font at six lines to the inch, on your locale's paper (A4 or US Letter), turned to landscape for lines longer than 80 columns. DEC line drawing prints as the lines it shows.
Printing the screen
F2, or Print Screen in the window menu, prints the whole page on a VT420 and the scrolling region on a VT500 model, their factory Print Extent; Printer Set-Up, or the host with DECPEX, changes it. Print Terminator in Printer Set-Up, or DECPFF, adds a form feed after it.
Ctrl+F2 (or Ctrl+Print) turns auto print on and off, as on the VT420, and Printer Set-Up's Print Mode shows and sets normal, auto print or printer controller mode; leaving auto print or controller mode prints what it had gathered.
What the host can print
The DEC printing functions, sent as escape sequences:
| Sequence | VT52 | Does |
|---|---|---|
ESC [ 5 i … ESC [ 4 i |
ESC W … ESC X |
Printer controller: everything between goes to the printer and none of it to the screen |
ESC [ i, ESC [ 0 i |
ESC ] |
Print the screen |
ESC [ ? 1 i |
ESC V |
Print the line the cursor is on |
ESC [ ? 5 i / ESC [ ? 4 i |
ESC ^ / ESC _ |
Auto print on / off: each line printed as the cursor leaves it |
What comes in printer controller mode is often meant for a particular printer, escape sequences for bold or a pitch among it. veetee prints it as a plain printer would: line feeds, form feeds, tabs, and a carriage return that overprints, with the escape sequences left out.
From OpenVMS
OpenVMS knows the terminal has a printer port — SHOW TERMINAL lists Printer port. From DCL,
this prints a file on the printer at your desk, the usual way of printing locally:
$! LPRINT.COM - print a file on the terminal's own printer
$ esc[0,8]=27
$ set terminal/nowrap/nobroadcast
$ write sys$output esc+"[5i"
$ type/nopage 'p1'
$ write sys$output esc+"[4i"
$ set terminal/wrap/broadcast
@LPRINT REPORT.TXT then prints it; confirmed on OpenVMS IA64, September 2026. /NOWRAP keeps
the terminal driver from breaking long lines at the screen width, and /NOBROADCAST keeps a
broadcast message out of the middle of the job.
An OpenVMS print queue is a different thing: its symbiont sends jobs to a printer on the network or a terminal server, not through a terminal session, so it cannot print through veetee. To print from a queue to the printer on your desk, point an LPD queue at CUPS on the machine veetee runs on, as below.
A print queue to a printer on Linux
The route is OpenVMS's LPD client, to cups-lpd on the Linux machine, to a CUPS queue, to the
printer. It needs no part of veetee, and it was confirmed with TCP/IP Services V6.0 on
OpenVMS IA64 printing to a driverless (IPP Everywhere) inkjet, September 2026.
On Linux, make a CUPS queue for the printer, with A4 plain paper as its default. Put your own
printer's IPP address in place of the one shown, and use Letter for US paper:
sudo lpadmin -p canon -E -v 'ipp://PRINTER.local:631/ipp/print' \
-m 'driverless:ipp://PRINTER.local:631/ipp/print' \
-o PageSize=A4 -o MediaType=Stationery
Then have systemd run cups-lpd on the LPD port, only for the OpenVMS host. Create
/etc/systemd/system/cups-lpd.socket, with your OpenVMS host's address:
[Unit]
Description=CUPS LPD server socket
[Socket]
ListenStream=515
Accept=true
IPAddressAllow=192.0.2.10 127.0.0.1
IPAddressDeny=any
[Install]
WantedBy=sockets.target
and /etc/systemd/system/[email protected]:
[Unit]
Description=CUPS LPD server
[Service]
ExecStart=-/usr/lib/cups/daemon/cups-lpd -o job-sheets=none -o media=A4 -o media-type=stationery
StandardInput=socket
User=lp
then sudo systemctl daemon-reload and sudo systemctl enable --now cups-lpd.socket. Open port
515 in the firewall to the OpenVMS host, if there is one.
On OpenVMS, enable the LPD service in TCPIP$CONFIG if it is not already, then run
TCPIP$LPRSETUP and add a remote printer: rm is the Linux machine's address, rp the
CUPS queue's name. Then add :sh: to its entry in TCPIP$PRINTCAP.DAT (in
SYS$SPECIFIC:[TCPIP$LPD]), before the last line — every line but the last ends in a backslash:
CANON|canon:\
:lf=/TCPIP$LPD_ROOT/000000/CANON.LOG:\
:lp=CANON:\
:rm=192.0.2.20:\
:rp=canon:\
:sd=/TCPIP$LPD_ROOT/CANON:\
:sh:\
:rt#515:
and restart the queue, STOP/QUEUE/RESET CANON and START/QUEUE CANON. PRINT/QUEUE=CANON LOGIN.COM then prints on the printer by your desk.
Two things each gave a blank sheet on the way, and are why the settings above are there:
- A banner page. The OpenVMS LPD client asks for a banner, and CUPS makes one of its own,
which came out blank, the job stalling after it.
:sh:in the printcap and-o job-sheets=noneoncups-lpdturn it off. - The printer's own paper. A job by LPD carries no paper size or type, and a driverless
printer then uses its own default, which on many inkjets is photo paper; with plain A4 in the
tray it reports a paper error and feeds a blank sheet. The queue's default is not enough:
-o media=A4 -o media-type=stationeryoncups-lpdputs them on every job.
lpstat -W completed -o canon shows the jobs CUPS has finished; one that sits in processing
with Waiting for job to complete is usually the printer reporting a paper error.
If it goes wrong
See Troubleshooting. The plan, and what printing on real paper found, is in docs/printing.md.