APSFILTERRC(5)

πŸ’– APSFILTERRC β€” the config file for the magic print filter, bestie πŸ’–

okay so real talk, this is the apsfilterrc manual page from the File Formats Manual section, and yes it's section 5, and yes it's literally giving "I hold the secrets to your printer" energy. sit down, grab a lil snack πŸ“, we're doing this.


✨ NAME ✨

apsfilterrc β€” the configuration file for the magic print filter πŸͺ„


🌈 SYNOPSIS 🌈

apsfillterrc

(yes bestie, that's the spelling, we do not fix it, we do not question it, we simply respect it πŸ’…)


πŸ¦‹ DESCRIPTION πŸ¦‹

apsfilterrc is a configuration file for printers that are controlled by the apsfilter(1) magic filter. it's the little notebook where your printer keeps its whole personality.

every single apsfilter printer that lives in printcap(5) gets its own apsfilterrc file. one file, one printer, no sharing, no drama. πŸ‘‘

and then there's one global apsfilterrc file that controls print characteristics for all printers. but here's the tea: the printer-specific apsfilterrc files have preference over the global one. so the specific ones win, always. πŸ†

so why would you even bother with an apsfilterrc file, you ask? two reasons, and they're both iconic:

  • if it turns out you keep having to type the same commandline options over and over and over, like, too often, bestie, it's giving carpal tunnel
  • if an application is unable to parameterize the print command, so you have to hardcode the print characteristic for such dumb applications πŸ™ˆ

and it gets better. an enhancement to this whole concept is user-specific config files, which have preference over both the global AND the printer-specific config file. this lets you configure print characteristics on a per-user basis. main character energy, truly. πŸ’–

okay so important: you should make use of user-specific config files instead of using the deprecated USE_USER_CODE variable, because that one compromises system security and is only an option on a single-user machine. see below. not me warning you twice. 😭

🌸 Capabilities 🌸

  • QUALITY β€” picks the print quality, bestie. your choices are draft, lo|low, med|medium, hi|high, photo.
  • SWEEP β€” prints uni- or bidirectional. options: uni, bi.
  • MEDIA β€” selects the paper type. options: plain, coated, glossy, premium, trans.
  • COLOR β€” selects color mode. options: color|colour, gray|grey, mono.
  • METHOD β€” this one chooses apsfilter's method of data processing. options: auto, ascii, raw. so like, automatic file type recognition plus automatic conversion to Postscript is apsfilter's default processing method. if you want to print mostly files as is, you can set the default to 'raw', and this disables any kind of file type recognition and conversion. and if you want to print mostly everything as ASCII text, then you can set this option to 'ascii'.
  • PAPERSIZE β€” sets the default paper size. options: a3, a4, legal, ledger, tabloid.
  • ASCII_FILTER β€” the text file filter to use when printing ASCII documents. options: a2ps, mpage, enscript, recode.
  • PAPERTRAY β€” paper feed tray number, and it goes tray0...tray9.
  • PRETTY_PRINTING β€” the a2ps highlight level for pretty-printing when you're using a2ps or enscript as the ascii filter. values are 0, 1, 2. see also ASCII_FILTER. ✨
  • ASCII_HEADER β€” whether you want headers in your text prints when using a2ps, mpage or enscript as ascii filter. options: header, noheader.
  • ASCII_BORDER β€” whether you want borders in your text prints when using a2ps, mpage or enscript as ascii filter. options: border, noborder.
  • PS_NUP|ASCII_PPS β€” pages per sheet. options: 1pps, 2pps, 4pps, 8pps.
  • LANDSCAPE|ASCII_LANDSCAPE β€” paper orientation. options: landscape, portrait.
  • PS_BOOK β€” outputs pages in "book" format, and it implies the commandline options "2pps,duplex,shortbind". related options, so you know the whole friend group: PS_NUP, ASCII_PPS, DUPLEX, BINDING.
  • DUPLEX β€” whether to use duplex mode or not. options: duplex, simplex.
  • BINDING β€” paper binding edge. options: shortbind, longbind.
  • COPIES β€” number of copies, written as copies=N.
  • USE_USER_CODE β€” okay bestie, sit DOWN. 🚨 enabling this option is a big potential security hole !!! if you don't understand this, DO NOT USE IT. it makes user manageable apsfilterrc files possible, which will be sourced (included/executed) during runtime of a printjob under the permissions of the calling process (lpd). this option is only valid for typical "single-user" systems, where a user wants direct access to an apsfilterrc without having to become root to make changes. a more conveniant way on a multi-user system, where security is an issue, is that a system administrator creates user-specific apsfilterrc files. additional informations can be found in the apsfilter handbook and in the apsfilterrc file together with some examples.
fr fr, that USE_USER_CODE one is not a vibe. deprecated, dangerous, do not touch unless you are 100% sure you know what you're doing. πŸ’€

πŸŽ€ FILES πŸŽ€

  • /etc/apsfilter/apsfilterrc β€” the apsfilter global config file. settings here are overwriteable by more specific printer config files, see below.
  • /etc/apsfilter/QUEUE/apsfilterrc β€” the apsfilter config file on a per printer queue basis. this file has preference over the global config file. πŸ‘‘
  • /etc/apsfilter/QUEUE/apsfilterrc.USER β€” the apsfilter config file on a per user basis (per print queue). this file has preference over the global and the printer queue specific config file.
  • $HOME/.apsfilter/apsfilterrc.QUEUE β€” a user defineable config file on a per printer queue basis. this file has preference over the global, the printer queue specific and the central per user config file, which is administered by a system administrator. enabling this has a deep impact on your system's security, should NOT be used, especially on multi-user systems, and is therefore disabled by default. see comments to the USE_USER_CODE variable.
literally the whole $HOME/.apsfilter/apsfilterrc.QUEUE thing is off by default for a reason, bestie. leave it alone. πŸ™ˆ

πŸ”₯ SEE ALSO πŸ”₯

apsfilter(1), printcap(5)


πŸ’€ BUGS πŸ’€

see the apsfilter software center β€” http://www.apsfilter.org/ β€” for new versions, bugfixes and known bugs.

please use the new tool apsfilter-bug(1) to release bug- or problem reports. it automatically presents you a form in an editor window which asks you some standard questions. if you save and quit the editor session, then this report is sent automatically via e-mail to the proper apsfilter mailinglist. slay, automated. ✨

if apsfilter fails to print something or prints it in a way you wouldn't expect, and you want to report an apsfilter error, then please save the debugging output of one print session using the new aps2file(1) utility by typing:

aps2file -D -Z options file > /dev/null 2> file.debug

and including the debugging output in the file file.debug into the edit session of the apsfilter-bug utility, so that it is included into the mail to the apsfilter mailinglist.

please note that you need to run /bin/sh (Bourne Shell), bash or a compatible shell, so that the above mentioned output redirection works. under C-shell (/bin/csh) or tcsh it wouldn't work. if you don't know, then simply make sure you use the Bournce shell by typing /bin/sh or bash, then you should have no problems with redirection of stdout and stderr (> /dev/null 2> file.debug). 😭 the redirection is not vibing with csh, periodt.

πŸ“š DOCUMENTATION πŸ“š

see the official apsfilter homepage:


πŸ’¬ USER FORUM πŸ’¬

please send questions to the official apsfilter help channel apsfilter-help@apsfilter.org.

the above section BUGS and the file HOWTO-BUGREPORTS tell you how to report bugs.

if you want to know how to troubleshoot your apsfilter installation, please read the manpage aps2file(1) and apsfilter-bug(1) as well as the Apsfilter Handbook carefully. 🫢


⭐ HISTORY ⭐

apsfilter developement started in 1994. (yes, 1994, it's a legend, an icon, a moment in history πŸ‘‘)

the apsfilterrc file on a "per printer queue" basis appeared in apsfilter 5.4.0.


and that's the whole page, bestie!! this one came from the Debian crew, dated April 08, 2000 β€” vintage but still serving πŸ’… go forth and configure your printer, you absolute icon πŸŒˆβœ¨πŸ¦‹

πŸ“¦ where this page comes from