User Tools

Site Tools


it_services:pf:printing

This is an old revision of the document!


Printing

:!: this page is WORK IN PROGESS. Sorry for the inconvenience. :!:

Printing is provided via a cups print server at cups.hep.lu.se . For the moment it is possible to connect machines directly to the printer, provided they belong to known networks (the cabled network or eduroam) but in the future this may not be possible. The reasons are due to national rules of accessing public IT services and are described in this security article (https://www.it.lu.se/it-sakerhet/it-sakerhetsartiklar/sakerhetskonfiguration/).

Detailed instructions on how to connect your machine directly to the printer will not be given here but they are available upon request in case the connection between your machine and the print server does not work as it should.

Currently the setup is as follows:

  • For machines connected to the network via cable, there is no need for authentication.
  • For machines connected via wireless, authentication using your particle physics login (also known as “teddi login”) is required.

About the available printers

The following print queues are available from the Linux computers:

Queue Name Duplex Colour Paper size Location Notes hostname
lw1 Yes No A4 Room A404 lw1.hep.lu.se
copy Yes Yes A4 Room A404 copy.hep.lu.se

The printer lw1, is the default printer. It will be used if no printer is specified.

How to print

Workstations and Clusters

Using a graphical interface

Nowadays most of printing from workstations can be done via graphical tools. The KDE and Gnome environments provide their own intuitive tools, so these will not be described here.

Using the command line

On clusters and servers this might not be straightforward. Therefore the following command line instructions apply.

List available printers
lpstat -a
tjatte:~> lpstat -a
clw1 accepterar begäran sedan tor 27 mar 2014 15.56.09
clw1_trans accepterar begäran sedan mån 31 mar 2014 06.33.55
clw2 accepterar begäran sedan mån 31 mar 2014 13.36.56
lw1 accepterar begäran sedan mån 31 mar 2014 11.08.59
lw4 accepterar begäran sedan mån 31 mar 2014 10.03.26
Ricoh accepterar begäran sedan tis 25 feb 2014 20.23.31
Standard usages

To print a document “file.ps” to the default printer, use

lpr file.ps

To print to another printer (newprinter in this example) use

lpr -P lw1 file.ps

To see what is in the print queue

lpq
lpq -P copy

To remove all your printouts from the queue

lprm -
lprm - -P copy
Duplex/simplex

Printers that are able to print duplex, do that by default, and are flipping the page along the long edge. To print in simplex (only on one side of the paper)

lpr -o sides=one-sided file.ps

To print on both sides and flip along the short edge

lpr -o sides=two-sided-short-edge file.ps

To print on both sides and flip along the long edge (default)

lpr -o sides=two-sided-long-edge file.ps
lpr -o page-ranges=4 file.ps
lpr -o page-ranges=1-8 file.ps
lpr -o page-ranges=1,3,6 file.ps
Pretty printing
lpr -p file.ps

or

lpr -o prettyprint file.ps

Specifies that the file should be formatted with a shaded header with the date, time, job name, and page number. This option is only useful when printing text files.

To print two pages on each side of the paper

lpr -o number-up=2 file.ps

And to get in even more on the paper

lpr -o number-up=4 file.ps

You can also use 8 and 16. But can you read it?

Rotate

To rotate the page 90 degrees and print it in landscape orientation

lpr -o landscape file.ps

In most cases it is better to create the file in landscape orientation.

Mirroring
lpr -o mirror file.ps

Might be useful if you want to print something that Leonardo D. has written.

Combining options

You can combine the options, like in the following example

lpr -P lw1 -o prettyprint -o number-up=2 file.ps
Other useful utilities

ps2ps can do a lot of tricks on a postscript-file. It is used in the background of the printing system to handle many of the options above, but can be used directly on a file. ps2ps can sometimes be used to “clean up” ps or eps files originating from other systems. psbook is useful to rearrange the pages in a ps-file in such a way that when printed, you can fold the papers around the middle, and you have got a book. Or at least a booklet. Se man psbook for more information. gv or ghostview, is the number one program to check a ps-file before printing it. It can save many trees

To check the print server status

On the Linux system the printing is handled by a central print-spooler. The spooler queues, format (if necessary) and send the file to the printer. The spooler is in our case called cups. In the normal case the file you want to print should be a postscript-file.

It is possible to print files that are not in postscript. One typical format is “text”, but even a lot of other formats is possible. The spooler takes care of the file, and try to do its best to convert it to postscript before it is sent to the printer. However, in most cases, I recommend that you convert the files to postscript yourself.

The print server status can only be seen when connected via cable or eduroam.

Click this link: https://cups.hep.lu.se:631/ and login with your teddi credentials


Installation

Installation if connected via ethernet cable

Linux laptops and Apple or Windows machines would need to install all the printers manually.

GNU/Linux

Get to the print room where the printer is located and note the printer Model Name and hostnames. You will need those later.

use your printer system configurator to add the printer. It may vary depending on distributions.

1. When asked for the printer, choose to add a network printer and type in the URL:

ipps://cups.hep.lu.se:631/printers/<printername>

e.g.

ipp://cups.hep.lu.se:631/printers/lw1
ipp://cups.hep.lu.se:631/printers/copy

2. Repeat step 1 for each printer you want to add.

lw1 should not require drivers, as they are provided by the standard CUPS server library on every Linux.

For copy you will need to install the drivers. I provide a working version here: TODO

3. Test with lpstat -a, you should see the list of configured printers.

4. Print a test page. If connected via wireless you will be asked for username and password.

Windows

1. Go to Printers and Faxes and add a new printer

2. When asked for a new printer, select network printer (TCP/IP)

3. Add the printer this way:

https://cups.hep.lu.se:631/printers/printername

e.g.

http://cups.hep.lu.se:631/printers/lw1
https://cups.hep.lu.se:631/printers/copy
  1. You will be asked for drivers. If you're lucky, they're on Windows Update, if you're not, find them yourself by looking at the vendor's website. I have some downloaded already and I provide them here: TODO
  2. When the drivers have been installed, you should be able to use the printer.

4. Print a test page. If connected via wireless you will be asked for username and password.

MacOS X

:!::!::!::!: this documentation only works for direct installation. For the cups server is a bit more complicated. Apple does not provide drivers for any of the printers. They need to be downloaded aside. I provided them here: TODO :!::!::!::!:

[thanks to Alice O.]

  1. Go to System Preferences > Printers & Scanners.
  2. Click the + sign to add a printer.
  3. Go to the IP tab.
  4. This should automatically detect the printer drivers.
    1. In the Address field, enter the hostname (e.g. lw1.hep.lu.se).
    2. The rest of the information will be filled in automatically (you can change the Name and Location fields to something more useful).
    3. Click “Add”.
it_services/pf/printing.1684749256.txt.gz · Last modified: 2023/05/22 09:54 by florido

Accessibility Statement