Difference between revisions of "Print from Linux"

From ITSwiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==System wide solution (have root access)==
+
<div style="background-color: #FFFF00; border-style: dotted;"> This guide is for users at '''DTU Compute''' only</div>
  
You need root privileges in order to configure this and the change will apply for all users of the computer
 
  
Make a safe copy of the file "/etc/profile" e.g.:
+
Printing from department servers (e.g. linuxterm, thinlinc, hms1, ...) does not require any setup. Printers have already been installed.
  
cp /etc/profile /etc/profile.orig
+
==System wide solution (have root access)==
 +
* Open a terminal and type <code>sudo system-config-printer</code> and hit Enter.
 +
* Add a new printer and use the URI '''ipp://cups.compute.dtu.dk/printers/cm321018a''' (replace '''cm321018a''' with the printer you want, see [[Printers at DTU Compute|list of printers]])
  
Fire up your favourite editor and edit "/etc/profile" and add the following two lines:
 
  
  CUPS_SERVER=cups.imm.dtu.dk
+
==System wide solution - stationary PC (have root access)==
  export CUPS_SERVER
+
'''Note:''' If you are printing to other printers that DTU Compute department printers, you should not use this method.
 +
 
 +
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=cups1.compute.dtu.dk/version=1.1' >> /etc/profile
 +
  sudo echo 'export CUPS_SERVER' >> /etc/profile
  
It is important that there are no white spaces before or after the '=' in the first line.
 
  
 
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 [[Printers_at_DTU_Compute | here]].
 
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 [[Printers_at_DTU_Compute | here]].
Line 18: Line 23:
 
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.
 
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 (no root access)==
+
==User only solution without root access (commandline)==
  
 
Here root access is not needed. The change will only take effect for the user logged in.
 
Here root access is not needed. The change will only take effect for the user logged in.
 
Make a safe copy of the file ~/.profile :
 
  
 
  cp ~/.profile ~/.profile.orig
 
  cp ~/.profile ~/.profile.orig
 
+
  echo 'CUPS_SERVER=cups1.compute.dtu.dk/version=1.1' >> ~/.profile
Open the file ~/.profile in your favourite editor and add the following two lines at the end of the file:
+
  echo 'export CUPS_SERVER' >> ~/.profile
 
+
  CUPS_SERVER=cups.imm.dtu.dk
+
  export CUPS_SERVER
+
  
 
Log out of the system and log in again. The system can now see all available printers.
 
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.
 
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.
 +
 +
'''Note:''' This might not work for some graphical applications not started from the command line.
 +
 +
==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 <code>system-config-printer</code> and hit Enter.
 +
* On Ubuntu go to the global menu for the just opened program and click <code>Server</code> and then select <code>Connect...</code>.
 +
* As "Cups server" type: <code>cups.compute.dtu.dk</code> and click Connect.
 +
 +
You should new see a long list of printers. Right click on the one that you want to use, and select <code>Set as default</code>.
 +
 +
=== Adding a home printer ===
 +
 +
Is done by opening a terminal and type <code>system-config-printer</code> and hit Enter. From here click <code>Add</code> and follow the instructions.
 +
  
 
[[Category:Print]]
 
[[Category:Print]]

Latest revision as of 17:47, 18 May 2022

This guide is for users at DTU Compute only


Printing from department servers (e.g. linuxterm, thinlinc, hms1, ...) does not require any setup. Printers have already been installed.

System wide solution (have root access)

  • Open a terminal and type sudo system-config-printer and hit Enter.
  • Add a new printer and use the URI ipp://cups.compute.dtu.dk/printers/cm321018a (replace cm321018a with the printer you want, see list of printers)


System wide solution - stationary PC (have root access)

Note: If you are printing to other printers that DTU Compute department printers, you should not use this method.

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=cups1.compute.dtu.dk/version=1.1' >> /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=cups1.compute.dtu.dk/version=1.1' >> ~/.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.

Note: This might not work for some graphical applications not started from the command line.

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.compute.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.