Difference between revisions of "Print from Linux"

From ITSwiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
(Ubuntu 12.10)
(Ubuntu 12.10)
Line 39: Line 39:
 
== Ubuntu 12.10 ==
 
== Ubuntu 12.10 ==
  
Ubuntu 12.10 ships with cups 1.6 with have a regression bug that doesn't let it print to older cups print servers. For DTU Compute users this means that if you are using Ubuntu 12.10 you have to print using the commandline.
+
Ubuntu 12.10 ships with cups 1.6 with have a regression bug that doesn't let it print to older cups print servers. For DTU Compute users this means that if you are using Ubuntu 12.10 you have to follow this tutorial before you can print.
  
First test that <code>lpd</code> is installed by clicking on [http://localhost:631 this] link. If you see a page about CUPS, then it is good.
+
First you need to found the printer name and model number of the printer you want to use.
  
The basics
+
As an example the printer name could be '''bp321029a''' and the model number could be '''HP Laser Jet 4250dtn'''.
  
'''To see the available printers'''
+
* Open the Ubuntu Dash menu by clicking on the Ubuntu button in the Unity menu on the left.
lpstat -p -d
+
* Type '''printers''' and hit Enter.
 +
* Click '''Add'''
 +
* Select '''Network printers'''
 +
* Select '''LPD/LPR Host or Printer'''
 +
* As Host type: '''cups.imm.dtu.dk'''
 +
* As Queue type the printer name of the printer you want to use.
 +
* Click '''Forward'''.
  
'''set a default printer'''
 
lpoptions -d printer
 
 
'''print a txt or pdf file'''
 
lpr -P printer_name filename
 
 
'''list jobs on printer_name'''
 
lpq -P printer_name
 
 
'''delete a job on printer_name'''
 
lprm -P printer_name job_number
 
 
There are many other options e.g. how to change paper size. Please see the [http://localhost:631/help/options.html help examples].
 
  
 
[[Category:Print]]
 
[[Category:Print]]

Revision as of 14:17, 20 March 2013

System wide solution (have root access)

You need root privileges in order to configure this and the change will apply for all users of the computer

sudo cp /etc/profile /etc/profile.orig
sudo echo 'CUPS_SERVER=cups.imm.dtu.dk' >> /etc/profile
sudo echo 'export CUPS_SERVER' >> /etc/profile

Reboot the computer. After the computer is rebooted you should now how a list of printers to use. For more information about the printers have look here.

If you get a dialogue box about authorization failed containing fields to enter username and password, DO NOT enter your password as it is not required and it sent unencrypted over the network. Just click "OK" and everything will be fine.

User only solution without root access (commandline)

Here root access is not needed. The change will only take effect for the user logged in.

cp ~/.profile ~/.profile.orig
echo 'CUPS_SERVER=cups.imm.dtu.dk' >> ~/.profile
echo 'export CUPS_SERVER' >> ~/.profile

Log out of the system and log in again. The system can now see all available printers.

If you get a dialogue box about authorization failed containing fields to enter username and password, DO NOT enter your password as it is not required and it sent unencrypted over the network. Just click "OK" and everything will be fine.

User only solution without root access (GUI)

If you want to be able to easy switch between DTU Compute's print server and e.g. a home printer, then follow this guide.

  • Open a terminal and type system-config-printer and hit Enter.
  • On Ubuntu go to the global menu for the just opened program and click Server and then select Connect....
  • As "Cups server" type: cups.imm.dtu.dk and click Connect.

You should new see a long list of printers. Right click on the one that you want to use, and select Set as default.

Adding a home printer

Is done by opening a terminal and type system-config-printer and hit Enter. From here click Add and follow the instructions.

Ubuntu 12.10

Ubuntu 12.10 ships with cups 1.6 with have a regression bug that doesn't let it print to older cups print servers. For DTU Compute users this means that if you are using Ubuntu 12.10 you have to follow this tutorial before you can print.

First you need to found the printer name and model number of the printer you want to use.

As an example the printer name could be bp321029a and the model number could be HP Laser Jet 4250dtn.

  • Open the Ubuntu Dash menu by clicking on the Ubuntu button in the Unity menu on the left.
  • Type printers and hit Enter.
  • Click Add
  • Select Network printers
  • Select LPD/LPR Host or Printer
  • As Host type: cups.imm.dtu.dk
  • As Queue type the printer name of the printer you want to use.
  • Click Forward.