iCIS Intra Wiki
categories: Info - Support - Software - Hardware | AllPages - uncategorized
Difference between revisions of "Install Printer In Linux or Macos"
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [[Category:Support]] [[Category:AllPages]] | + | [[Category:Public]] [[Category:Support]] [[Category:AllPages]] |
+ | |||
+ | '''only for department printers''' | ||
===== QUICKSTART Linux printing (SMB) ===== | ===== QUICKSTART Linux printing (SMB) ===== | ||
Line 29: | Line 31: | ||
**removing a job from the printing queue can be done with the command : <code>lprm -P<printername> <jobid> </code><br> Note: lprm only works on C&CZ linux machines (lilo1,lilo2) | **removing a job from the printing queue can be done with the command : <code>lprm -P<printername> <jobid> </code><br> Note: lprm only works on C&CZ linux machines (lilo1,lilo2) | ||
**URL: <code>smb://printsmb/<printername></code> <br>IMPORTANT: don't use <code>smb://printsmb.science.ru.nl/<printername></code> because that can sometimes not work. | **URL: <code>smb://printsmb/<printername></code> <br>IMPORTANT: don't use <code>smb://printsmb.science.ru.nl/<printername></code> because that can sometimes not work. | ||
+ | |||
*[[#Linux_JetDirect_printing|jetdirect printing]] (alternative for pc's within same local network as printer, not for laptops!) | *[[#Linux_JetDirect_printing|jetdirect printing]] (alternative for pc's within same local network as printer, not for laptops!) | ||
**only department printers : mbsd-prt, tibn, laserop | **only department printers : mbsd-prt, tibn, laserop | ||
Line 35: | Line 38: | ||
**only works for local network. <br>Means : laptops on wireless network cannot print to printer, because the wireless network is a separate network! | **only works for local network. <br>Means : laptops on wireless network cannot print to printer, because the wireless network is a separate network! | ||
**URL: <code>socket://<printername>.science.ru.nl:9100</code> | **URL: <code>socket://<printername>.science.ru.nl:9100</code> | ||
+ | *[[#Linux_JetDirect_printing|ipp printing]] (alternative for pc's within same local network as printer, not for laptops!) | ||
+ | **only department printers : mbsd-prt, tibn, laserop | ||
+ | **sends printing jobs directly to printer, so there is no central server with a printing queue | ||
+ | **no user authentication needed | ||
+ | **only works for local network. <br>Means : laptops on wireless network cannot print to printer, because the wireless network is a separate network! | ||
+ | **URL: <code>ipp://<printername>.science.ru.nl</code> | ||
+ | |||
SMB printing is preferred because it gives the best support. | SMB printing is preferred because it gives the best support. | ||
− | However setting up jetdirect printing to unauthorized printers for pc's on the same local network is much easier. | + | However setting up jetdirect or ipp printing to unauthorized printers for pc's on the same local network is much easier. |
+ | Ipp printing is better then jetdirect printing. (eg. ipp can poll the printer for more information) | ||
For printing instructions from C&CZ see [https://wiki.science.ru.nl/cncz/Printers_en_printen?setlang=en#.5BAfdrukken_op_andere_Linux_machines.5D.5BPrinting_using_other_Linux_machines.5D here] | For printing instructions from C&CZ see [https://wiki.science.ru.nl/cncz/Printers_en_printen?setlang=en#.5BAfdrukken_op_andere_Linux_machines.5D.5BPrinting_using_other_Linux_machines.5D here] |
Latest revision as of 15:18, 11 December 2019
only for department printers
QUICKSTART Linux printing (SMB)
Use smb printing protocol to print from linux:
- from a terminal window execute as normal user the command:
system-config-printer
On Fedora linux you will automatically be asked for the root password.
On Ubuntu linux you are allowed to continu if you are an admin user, otherwise you have to supply in a popup window the credentials for a valid admin user. - in the started gui choose add new printer.
- in the upcoming dialog window choose:
- Device: Network Printer - Windows printer via Samba
- SMB Printer: smb://printsmb/<printername>
IMPORTANT: don't usesmb://printsmb.science.ru.nl/<printername>
because that can sometimes not work. - Authenthication: you have choice from two options :
- user + password
- 'Prompt user if authentication required' : user must supply password when printing (can be stored in keychain for next prints)
- TIP: in case of problems with authentication look at the terminal from which you started
system-config-printer --debug
if there are any errors printed. Sometimes this can give an indication why the communication fails. E.g. on fedora I got once the error "'pysmb' is not defined", after googling I found out that I needed to install the package 'python-smbc' which was needed for the communication with the printer. Problem solved! ( sudo apt-get install python3-smbc python-smbc )
- use as driver "generic postscript"
Note: you can limit the access of a printer. Eg. you can install a printer which uses credentials from user X and only lets user X use it.
Linux/Macos printing
There are several ways to install a printer in linux/maccos
Described below are the two most common used ones :
- smb printing (preferred method)
- uses central printer server to send jobs to printer
- user needs to authenticate to central printer server
- user needs to be registered to be allowed to print on the printer
- works also for laptops on wireless networks
- the printing queue can be seen with the command :
lpq -P<printername> [-Sprintsmb]
Note: -S argument not needed on C&CZ linux machines (lilo1,lilo2) - removing a job from the printing queue can be done with the command :
lprm -P<printername> <jobid>
Note: lprm only works on C&CZ linux machines (lilo1,lilo2) - URL:
smb://printsmb/<printername>
IMPORTANT: don't usesmb://printsmb.science.ru.nl/<printername>
because that can sometimes not work.
- jetdirect printing (alternative for pc's within same local network as printer, not for laptops!)
- only department printers : mbsd-prt, tibn, laserop
- sends printing jobs directly to printer, so there is no central server with a printing queue
- no user authentication needed
- only works for local network.
Means : laptops on wireless network cannot print to printer, because the wireless network is a separate network! - URL:
socket://<printername>.science.ru.nl:9100
- ipp printing (alternative for pc's within same local network as printer, not for laptops!)
- only department printers : mbsd-prt, tibn, laserop
- sends printing jobs directly to printer, so there is no central server with a printing queue
- no user authentication needed
- only works for local network.
Means : laptops on wireless network cannot print to printer, because the wireless network is a separate network! - URL:
ipp://<printername>.science.ru.nl
SMB printing is preferred because it gives the best support.
However setting up jetdirect or ipp printing to unauthorized printers for pc's on the same local network is much easier.
Ipp printing is better then jetdirect printing. (eg. ipp can poll the printer for more information)
For printing instructions from C&CZ see here
Below installations are tested for Ubuntu and Fedora.
Linux SMB printing
- If you use the wireless network eduroam, add the line "131.174.30.59 printsmb" to your /etc/hosts file.
- make sure you install
- system-config-printer : graphical setup tool for printers
- python-smb python3-smb smbclient : needed for system-config-printer to let it connect to samba printers; when not installed the samba printer option is not available in system-config-printer
- gnome-keyring : needed for storing password
- seahorse : optional needed for editing credentials stored in gnome-keyring
- Install all with command: sudo apt-get install system-config-printer python-smb python3-smb smbclient gnome-keyring seahorse
- Note: we assume credentials are stored in gnome-keyring and not in KDE's kwallet. At least in my experience this holds for the firefox browser.
- from a terminal window execute as normal user the command:
sudo system-config-printer
On Fedora linux you will automatically be asked for the root password.
On Ubuntu linux you are allowed to continu if you are an admin user, otherwise you have to supply in a popup window the credentials for a valid admin user. - in the started gui choose add new printer.
- in the upcoming dialog window choose:
- Device: Network Printer - Windows printer via Samba
- SMB Printer: smb://printsmb/<printername>
IMPORTANT: don't usesmb://printsmb.science.ru.nl/<printername>
because that can sometimes not work. - Authenthication: you have choice from two options, where latter is preferred :
- user + password => password saved plain-text in /etc/cups/printers.conf
- 'Prompt user if authentication required' : user must supply password when printing. When asked for credentials you can choose the "save" option which causes the credentials to be stored in the gnome-keyring. Credentials in the gnome-keyring can always be edited/deleted using the seahorse program.
- TIP: in case of problems with authentication look at the terminal from which you started
system-config-printer
if there are any errors printed. Sometimes this can give an indication why the communication fails. E.g. on fedora I got once the error "'pysmb' is not defined", after googling I found out that I needed to install the package 'python-smbc' which was needed for the communication with the printer. Problem solved!
- use as driver the specific ppd file for the printer.
A set of good preconfigured ppd files, which specify correctly the installed devices on the printers, for the konica minolta printers can be found at : Printers#Cncz_printers or at cncz printers page
However sometimes "generic postscript" also works, but not for the konica minolta printers.
Note: you can limit the access of a printer. Eg. you can install a printer which uses credentials from user X and only lets user X use it.
Important: for the konica minolta color printers you can set them to grayscale in the configuration by
right-click printer -> in popup menu select "properties" then select "Printer Options" form in which you set Select Color: grayscale
Linux JetDirect printing
- execute as normal user the command:
system-config-printer
On Fedora linux you will automatically be asked for the root password.
On Ubuntu linux you are allowed to continu if you are an admin user, otherwise you have to supply in a popup window the credentials for a valid admin user. - in the started gui choose add new printer.
- in the upcoming dialog window choose:
- Device: Network Printer - AppSocket/HP JetDirect
- Host: <printername>.science.ru.nl
- Port Number: 9100
- then it automatically recognizes the printer and lets you configure it
Macos JetDirect printing
- goto: System preferences => Printers & Scanners
- click on '+' on left bottom corner
- a new windows opens, and in that window open the "IP" tab
- fill in form:
- Address: <printername>.science.ru.nl
- Protocol: HP Jetdirect - Socket
- Queue: <leave empty>
- Name: <choose something>
- Use: Generic Postscript Printer
- click "Add" button
- in popup window check the checkbox "Duplex Printing Unit"
- click "Ok" button
Linux IPP printing
- execute as normal user the command:
system-config-printer
On Fedora linux you will automatically be asked for the root password.
On Ubuntu linux you are allowed to continu if you are an admin user, otherwise you have to supply in a popup window the credentials for a valid admin user. - in the started gui choose add new printer.
- in the upcoming dialog window choose:
- Device: Network Printer - Internet Printing Protocol (ipp)
- Enter Device URI: ipp://<printername>.science.ru.nl (note: right port will be automatically found)
- then it automatically recognizes the printer and lets you configure it
Macos IPP printing
- goto: System preferences => Printers & Scanners
- click on '+' on left bottom corner
- a new windows opens, and in that window open the "IP" tab
- fill in form:
- Address: <printername>.science.ru.nl
- Protocol: Internet Printing Protocol - IPP
- Queue: <leave empty>
- Name: <choose something>
- Use: Generic Postscript Printer
- click "Add" button
- in popup window check the checkbox "Duplex Printing Unit"
- click "Ok" button