DV-Zeuthen

| Computer Center

FAQ

Frequently Asked Questions (Linux)

Computer Center

Frequently Asked Questions (Linux)

To expand all press plus.

+
Which file formats can Cups process ?
  • PostScript, PDF, International Text, TIFF, GIF, PNG, JPEG, SUN−Raster and other graphic formats
  • CUPS uses the rules in the configuration file /etc/cups/mime.types to determine the MIME type of files to be printed.
    From the MIME type CUPS is deriving the printing format.
Which applications do offer a tight cups integration on a UNIX system ?
  • evince
  • LibreOffice
  • Gimp
  • Firefox/Thunderbird
How can I select the simplex mode on a duplex printer under UNIX ?

use option sides=one-sided

  • using lpr: lpr -Pprinter -o sides=one-sided myfile
  • using lp: lp -d printer -o sides=one-sided myfile
  • if a simplex instance exists: lp -d printer/simplex myfile
How can I change personal printer specific option settings?

Use lpoptions to save personal option settings in ~/.lpoptions.

Example:

lpoptions -o pagesize=A3 -p znecad

How can I print multiple copies of a document using the CLI?
  • lp -n number-of-copies file

Copies are not collated by default. Use the -o Collate=True option to get collated copies:

  • lp -n number-of-copies -o Collate=True file
How can I change the layout of the output pages when using N-Up printing?

In order to change the borders around each page, use the -o page-border=value option. Supported borders are:

  • none: do not draw a border (default)
  • double: draw two hairline borders around each page
  • double-thick: draw two 1pt borders around each page
  • single: draw one hairline border around each page
  • single-thick: draw one 1pt border around each page


Example

lp -o number-up=4 -o page-border=double myfile

In order to change the arrangement of the pages on each output page, use the -o number-up-layout=value option. Possible values are:

  • lrtb: Left to right, top to bottom (default)
  • lrbt: Left to right, bottom to top
  • rlbt: Right to left, bottom to top
  • rltb: Right to left, top to bottom
  • tblr: Top to bottom, left to right
  • tbrl: Top to bottom, right to left
  • btlr: Bottom to top, left to right
  • btrl: Bottom to top, right to left


Explanation: The default layout is lrtb (Left to right, top to bottom). This means: using a number-up of 4, the first page will be printed on the top-left of the outputpage, the second page will be printed on the top-right, the third page will be printed on the bottem-left and the fourth page on the bottom-right of the outputpage.
Example

lp -o number-up=4 -o number-up-layout=btrl myfile

I do get printouts sometimes in letter format, why A4 is not the default?
  • Other applications such as a2ps do not have a default at all but decide the paper format based on the language settings.

For a2ps LANG=en_US will select letter format, while LANG=C, LANG=en_GB or LANG=de_DE will force A4 format.

What is the best way to print man pages ?

To print man pages use:
man -t | lp ...

How can I print utf-8 encoded text?

To print iso8859-1 characters encoded in utf-8, just print the file as usual. Cups will select the correct filter automatically. If you want to print non-iso8859-1 characters (e.g. Cyrillic or Chinese characters):

  • use an utf-8 ready terminal like KDEs konsole or Gnomes gnome-terminal.
    • Xterm does support utf-8 only in conjunction with an ISO10646-1 font, which is not the default!
  • set the $LANG - variable: Example: LANG=de_DE.utf-8
  • see "man locale" for more information and do have a look at the question above
  • print the file using the "-o document-format=text/utf8" option.

Example:

lpr -Pznlo1 -o document-format=text/utf8 utf8.txt

I'm using psutils (pstops, psnup, psbook). Even though I'm using the option ''sides=two-sided-short-edge'' the output was not arranged in the correct order. What can I do?
  • The psutils suite of programs is not compatible with the CUPS postscript processing (filter).
    • It is unmaintained since a long time, therefore improvement of the situation is unlikely.
  • With the following command you can bypass the postscript filter
    • lp -o document-format=application/bindshort -dprinter myfile
I'm using psutils (pstops, psnup, psbook). On the Xerox Color Printer I get wrong output with a different font. What can I do?
  • The psutils tools caused this problem (see above).
  • With the following command you can bypass the postscript filter
    • lp -o document-format=application/bindlong -dprinter myfile
    • or lp -o document-format=application/bindshort -dprinter myfile
Can I change the fontsize when printing ASCII-text?

YES! The size of ASCII-text can be changed by using the cpi (characters per inch) or lpi (lines per inch) options. Unlike Cups-default, the cpi -option will be ignored if both options are present. Default is a value of 80 characters per virtual line in portrait, and 113 characters per virtual line in landscape mode. This means a value of round about 9.7 characters per inch.

I can't print the postscript file. What can I do?
  • Please check if it is an eps file. In this case you have to convert into a ps file with ps2ps or convert.
  • Check the header of the postscript file. Maybe it is for a special printer hardware.
I'm using ps2pdf, but the generated pdf file was incomplete. What can I do?

The tools are buggy, try to use epstopdf.

I'm at DESY Hamburg and working on Zeuthen's systems. Is it possible to print on Hamburg printers?
I'm missing the bannerpage when I print from OpenOffice, Firefox (e.g. Indigo pages) or evince, what can I do?
  • This is a bug in cups or gtk.
  • Choose in the Print menu Job and then choose in 

Add Cover Page Before the Banner setup Standard.