DTLP(1)
β¨ NAME β¨
okay bestie, this is the dtlp page from the (user cmd) manual β the utility that gathers up lp arguments and prints a file. π
π SYNOPSIS π
dtlp [-b banner_title] [-d lpdest] [-m print_command] [-n copy_count]
[-o other_options] [-u user_filename] [-a] [-e] [-h] [-r] [-s]
[-v] [-w] [print_file]
πΈ DESCRIPTION πΈ
The dtlp command line utility is a front-end to the lp subsystem. It gathers lp print options and prints a specified file. It operates in two modes:
- GUI mode β By default,
dtlpposts a Print dialog that appears with Print, Cancel, and Help pushbuttons. - Silent mode β When invoked with the silent flag,
dtlpdoes not present the GUI input dialog. It collects input arguments from the command line and environment variables.
π¨οΈ The Print Dialog π¨οΈ
When invoked normally, dtlp posts a Print dialog that shows:
- File β The name of the file to print (a read-only text label).
- Printer β The printer device. The default is the value of the
LPDESTenvironment variable. IfLPDESTis unset, then the properly localized stringDefaultappears in the text field. - Copies β The number of copies to print. The default is
1. - Banner Page Title β The title to appear on the printed banner page, and if formatted, in the header of each page.
- Print Page Numbers β A checkbox to indicate whether the file should be printed formatted (run through the
pr -fcommand) or printed unformatted. - Print Command Options β Any options to be passed directly to the
lpcommand. For example, some implementations support the-o2option tolpto enable double-page printing.
When the user presses the Print button, these settings are passed onto the lp subsystem, along with the values of any other environment settings (see the ENVIRONMENT heading in this man page).
π OPTIONS π
The dtlp command accepts a print_file name specification. If a print_file is not specified, standard input is assumed. When used in this fashion, the -u user_filename option can be used to pass a name to dtlp for display in the Print dialog.
π Command Line Options and the ENVIRONMENT Setting π
The dtlp command is sensitive to some ENVIRONMENT settings. In the case in which both a command line option and a complementary environment setting are specified, the command line option takes precedence. periodt. π
π― Command Line Options π―
-b banner_titleβ Set the string used in printing the banner on the title page. If the-roption is also specified, then print this same string on the page headers.-d lpdestβ Set the printer destination for the file.-m print_commandβ Use this value as the path name of thelpprint command. The default islp.-n copy_countβ Print this many copies. Default is1.-o other_optionsβ Pass these options directly through to theprint_command, without any interpretation. This setting is intended for users with advanced printing knowledge.-u user_filenameβ Use this value as the name of file as it should appear in the Print dialog or print output. Default isprint_file. Equivalent to theDTPRINTUSERFILENAMEsetting under the ENVIRONMENT heading in this man page.-aβ Causes the file to be formatted with themancommand. If set, then other formatting specifications (such as-r) are ignored.-eβ Remove the file after printing it. This functionality is intended for temporary files generated by applications that don't need to persist beyond the act of printing. Equivalent to theDTPRINTFILEREMOVE.-hβ Print out a help message.-rβ Format the file before printing it, by running it through thepr -fcommand.-sβ Print the file silently, without posting the Print dialog. Equivalent to theDTPRINTSILENTsetting under the ENVIRONMENT heading in this man page.-vβ Print out verbose messages during the print process.-wβ Causes output to the printer to be sent raw, with no interpretation of tabs, backspaces, formfeeds, and binary characters. Useful for printing PCL and PS files. If set, then other formatting specifications (such as-r) are ignored; however, the-aoption will take precedence over this setting.print_fileβ Print this file. Ifprint_fileis not supplied, standard input is assumed.
π ENVIRONMENT π
Following are the names and meanings of the environment values that affect the operation of dtlp:
LANGβ Use the specified value to determine the locale of the message strings that appear in the Print dialog.LPDESTβ Use the specified value as the printer destination for the file.DTPRINTCWDβ If set to an existing, usable directory, this setting causesdtlpto execute thelpcommand pipeline from that directory. By default, uses the current directory from whichdtlpis invoked.DTPRINTFILEREMOVEβ Equivalent to the-ecommand line setting. Value must beTrueorFalse(case is ignored). Default isFalse.DTPRINTSILENTβ Equivalent to the-scommand line setting. Value must beTrueorFalse(case is ignored). Default isFalse.DTPRINTUSERFILENAMEβ Equivalent to the-ucommand line setting.
π§ Reconciling Options π§
In the case of conflicting formatting options, dtlp uses the following decisions to reconcile them:
- If any raw (as with
-w), or man (as with-a) options are specified, all other page formatting and numbering options are turned off; otherwise, page printing and formatting are allowed. - In a formatted operation: If a banner title is specified (as with
-b), it will be used as the page header. - If a user filename is specified (as with
-uorDTPRINTUSERFILENAME), it will be used as the page header; otherwise, the filename itself will be used as the page header.
π RETURN VALUES π
0β Command completed successfully.-1β The user pressed the Cancel button.2β Usage error.3β There is no specified file to print.4β Unable to find thedtkshinitialization file,/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/lib/dtksh/DtFuncs.dtsh.5β The file is an invalid file (for example, a directory or a device file).6β The user has no read permission on the file.
β¨ EXAMPLES β¨
π₯οΈ Command Line π₯οΈ
The following command line causes dtlp to post a Print dialog for file1 with a name displayed of Your File and with the default printer chosen:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -u "Your File" file1
The following command line causes dtlp to silently print two copies of file2 on printer laser3:
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -n 2 -d laser3 -s file2
πͺ Action Definition πͺ
The following Print action would cause a PCL file to be printed using the dtlp command.
ACTION Print
{
LABEL Print
ARG_TYPE PCL
TYPE COMMAND
WINDOW_TYPE NO_STDIO
EXEC_STRING /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -w %Arg_1%
}
The following Print action would cause a man page file to be printed using the dtlp command.
ACTION Print
{
LABEL Print
ARG_TYPE MAN_PAGE
TYPE COMMAND
WINDOW_TYPE NO_STDIO
EXEC_STRING /nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/bin/dtlp -a %Arg_1%
}
By default, these actions will post the Print dialog.
π LOCALES AND CODESETS π
The strings that appear in the Print dialog are localizable. π
π FILES π
/nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/print.dtβ Defines the default system Print action./nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/appconfig/types/C/dt.dtβ Defines the default Print actions for man pages (typeMAN), ASCII files (typeTEXTFILE), PCL files (typePCL), and PS files (typePOSTSCRIPT)./nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/etc/appconfig/types/C/*.dtβ The datatype files that implement the per-printer Print action; these are created by thedtprintinfo -populatecommand./nix/store/6waxpwr8lzfzc9ka48gl7yh60rqvlkdb-cde-2.5.3/scripts/DtFuncs.shβ Thedtkshinitialization file that defines a number of GUI convenience functions, as for creating a dialog box.
π BUGS π
The dtlp Print dialog cannot accept quote marks (either ' or ") in the Banner Page Title text field. π
π SEE ALSO π
dtsearchpath(1), dtprintinfo(1).
thatβs the whole dtlp(user cmd) footer energy, bestie β source/version/date isnβt actually listed in the original, so Iβm not making one up. πβ¨π
π¦ where this page comes from
- nixos 26.05: cde 2.5.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms