Printing is provided in two different ways:
cups.matfys.lth.se
. Machines should connect to it to print. The following print queues are available from the Linux computers:
Printer Name | Duplex | Colour | Paper size | Location | Notes | hostname |
---|---|---|---|---|---|---|
printer | Yes | No | A4 | Matfys printer room | Can only be used from ethernet cable | printer.matfys.lth.se |
copy-n | Yes | Yes | A4/A3 | Matfys copy room | Should only be used by N-fak members | copy.matfys.lth.se |
copy-t | Yes | Yes | A4/A3 | Matfys copy room | Should only be used by LTH members | copy.matfys.lth.se |
The printer printer
is the default printer. It will be used if no printer is specified.
Nowadays most of printing from workstations can be done via graphical tools. The KDE environment provides its own intuitive tools, so these will not be described here.
On clusters and servers this might not be straightforward. Therefore the following command line instructions apply.
lpstat -a
pflorido@myon:~$ lpstat -a copy-n accepting requests since tor 6 feb 2014 15.55.56 copy-t accepting requests since tor 6 feb 2014 16.45.47 cp4525dn accepting requests since tis 4 feb 2014 11.33.28 maria accepting requests since tor 30 maj 2013 19.24.17 oldprinter accepting requests since tor 16 jan 2014 11.22.35 print2 accepting requests since tor 6 feb 2014 16.10.01 printer accepting requests since tor 6 feb 2014 17.17.13
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 newprinter file.ps
To see what is in the print queue
lpq lpq -P copy-t
To remove all your printouts from the queue
lprm - lprm - -P newprinter
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
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?
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.
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 newprinter -o prettyprint -o number-up=2 file.ps
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
The copier can only operate with codes. The codes depend on the faculty you belong. Please use only the one that you're given by Katarina.
If you don't know the code, contact Katarina.
If you're sitting in a workstation or using cluster, you do not need the code.
Simply select the print queue according to this table:
The following copier queues should be used on workstations:
Use this queue… | … if you belong to |
---|---|
copy-n | N-fak |
copy-t | LTH |
If the queue you're using doesn't work, please contact me. You are kindly requested not to use a queue you're not supposed to. |
If you experience problems printing from KDE or command line, follow these instructions:
For some reason KDE incorrectly writes the options for this printer. This is a KDE bug against Canon drivers.
~/.cups/lpoptions
copy-t
or copy-n
, remove that line. Sample correct file is as follows:Default printer
lpotions
again, it should be something like:Dest copy-n UserID=None UserPassword=None Dest copy-t ColourModel=Colour UserID=None UserPassword=None Default printer
To pass the codes to the print queue (should not be needed after you do the KDE thing above, but in any case):
lpr -o UserID=<code> -o UserPassword=<code> -Pcopy-t yourfile
It seems the driver for this printer is different than the previous one and KDE always tries to fallback to some weird default.
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.
Click this link: http://cups.matfys.lth.se:631/
Check if you're connected via cable or wireless. Installation instructions are completely different.
Linux laptops and Apple or Windows machines would need to install all the printers manually.
Get to the Matfys print room and note the printer names. You will need those later.
There are four ways of installing the drivers:
Root privileges: not needed
use your printer system configurator to add the printer. It may vary depending on distributions.
When asked for the printer, choose to add a network printer and type in the URL:
ipp://cups.matfys.lth.se:631/printers/<printername>
e.g.
ipp://cups.matfys.lth.se:631/printers/printer
Repeat the above for each printer you want to add.
This should not require drivers, as they are provided by the CUPS server.
Test with lpstat -a
, you should see the list of configured printers.
Root privileges: needed
The printers can be added directly to the current cups configuration using a configuration file.
Be careful: backup /etc/cups/printers.conf
before you proceed.
Follow these steps:
sudo service cups stop
/etc/cups/printers.conf
file and save.sudo service cups start
lpstat -a
, you should see the list of configured printers.Root privileges: needed
This solution might prevent you to use printers outside Matfys. Use it only if you know where to put your hands.
Follow these steps:
sudo service cups stop
/etc/cups/client.conf
(create it if it doesn't exist): ServerName cups.matfys.lth.se
lpstat -a
, you should see the list of all configured printers.If you use this, remember to comment out the ServerName line in client.conf and restart cups if you travel to a location outside Matfys.
Root privileges: might be needed if you need to install new drivers
Why is this evil? because this bypasses the print server. That means that is more likely to jam the print queue in the printer itself (will need a restart) and jam the printer itself if the driver is misconfigured (hopefully a restart will be enough ). Use at your own risk.
Install the printer drivers yourself, and then install the printer by getting its network address.
This may vary depending on the printer vendor, and Linux may or may not have the drivers.
In short, all you need to do is to provide the hostname of the printer. In most cases it will work if you use
socket://<printer FQDN>:9100
or
http://<printer FQDN>
e.g.
socket://printer.matfys.lth.se:9100 http://printer.matfys.lth.se
I will write them when I have time. For the moment being, the only thing I can suggest is:
http://cups.matfys.lth.se:631/printers/printername
e.g.
http://cups.matfys.lth.se:631/printers/printer
No idea. OSX uses the same CUPS system as linux ,so I guess it's easy. If anybody wants to write this, contact me.
NOTE: it is NOT possible to install printer.matfys.lth.se
via wireless.
The best is to book a time with me if you need to install.
If you really want to do yourself:
Root privileges: might be needed if you need to install new drivers
Install the printer drivers yourself, and then install the printer by using its hostname. When choosing the printer driver, I suggest either PS or PCL. The result may vary depending on the printer.
This may vary depending on the printer vendor, and Linux may or may not have the drivers. A list of tested working drivers is provided here
All you need to do is to provide the hostname of the printer. In most cases it will work if you use
socket://<printer FQDN>:9100
or
http://<printer FQDN>
e.g.
socket://copy.matfys.lth.se:9100 http://copy.matfys.lth.se
Hostnames: printer.matfys.lth.se
NOTE: This printer can ONLY work if connected to the cable network.
Note: you can only print on this printer if you have a code. Read more here
Hostname: copy.matfys.lth.se
One must accept the license to load these drivers.
Hostname: newprinter.matfys.lth.se
Is my Windows 32 or 64 bits?