IT/Software/Applications/CUPS: Difference between revisions

From msgwiki
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
(Created page with " this is the wonderful and mysteriously dreadful Common Unix Printing System. Usually best to just start over by running three commands. sudo apt-get install --reinstall cu...")
 
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
==Common Unix Printing System==
(Common Uncomfortable Pain Somewhere*)


<nowiki>*</nowiki>Yes we mean "there".


this is the wonderful and mysteriously dreadful Common Unix Printing System.
Over the years I have logged/wasted/learned for countless hours.


===Access:===
Most of Cups are integrated in the printer settings panel in your distro.


Usually best to just start over by running three commands.
More features and reliability can be found from a browser:
sudo apt-get install --reinstall cups cups-browsed cups-client cups-common cups-daemon cups-server-common
 
localhost:631
 
===Basics===
To restart local printer services you need.
 
<code>sudo service cups restart</code>
 
To restart the network broadcast(sharing) and browsing(using others) you need.
 
<code>sudo service cups-browsed restart && sudo service cups restart</code>
 
===Quirks===
 
==== Config Settings ====
On KDE you can install the printer but the config will not stick.
 
System settings runs as the normal user and the config files are owned by root.
 
You can start system settings as root, make changes, and then come back.
sudo systemsettings5
OR do it via the cups web interface (localhost:631) which has access permissions to those files.
 
==== Color Profile ====
LibreOffice and Okular and others default to printing/exporting as RGB.
 
For those applications use the "driverless" option.  It installs itself.  The color profile is "color"
 
When installing prefer the series over the exact number.  MG3600 series is more likely to work than MG3670
 
You can also install two versions of the printer.  i.e. "GreenRoomCanonRGB" and "GreenRoomCanonCMYK"
 
Then you need to know what application uses what profile.
 
===Config Files===
The file for cups-browsed is located in /etc/cups/cups-browsed.conf
 
We want to normally make the following changes.
 
How we look for other printers:
 
<code>BrowseRemoteProtocols  dnssd</code>
 
How others can look for our printers:
 
<code>BrowseLocalProtocols  dnssd</code>
 
<code>BrowseInterval 10</code><br />Normally you have cups as also a browsing option. BUT that will show all ZeroTier Printers as IP addresses.
 
Not nice.
 
==== Only Local Printers ====
Many times network printers get confused and confusing.
 
In the browsed config file you can make the following change.
BrowseRemoteProtocols none
You may also need to disable avahi-daemon network searching.
 
Edit /etc/avahi/avahi-daemon.conf and set deny-interfaces to the right interface.
deny-interfaces=eth0
You may need to run ifconfig to get the right name.
 
Here you can see me denying Zero-Tier as well.  You can add more interfaces with commas separating them.
deny-interfaces=wlx502b73c405e8, ztyouqoel3
Then restart the service
sudo service avahi-daemon restart
 
=== Change a printer name or queue name ===
 
* ''Stop CUPS Service''. For openSUSE using <code>systemd</code> there are three services to stop (<code>cups.path</code>, <code>cups.service</code>, and <code>cups.socket</code>).
* ''Edit'' <code>/etc/cups/printers.conf</code> and replace the old-name text with the new one. (appears only once).
* ''Rename drivers'': In <code>etc/cups/ppd</code> there are "drivers" named like the printer, so if you change the printer name, also rename the driver files.
* ''Start the services''.
 
===Next Level===
Usually best to just start over by running three commands.  
<br />
<code>sudo apt-get install --reinstall cups cups-browsed cups-client cups-common cups-daemon cups-server-common</code>


then:
then:


sudo systemctl daemon-reload
<code>sudo systemctl daemon-reload</code>
 
You can check the statuses with
 
<code>service cups status</code>


You can check the statuses with
<code>service cups-browsed status</code>


service cups status
Moving between major versions. (learned going from 22.04.5 to 24.04.1)
sudo /usr/sbin/cups-genppdupdate
This will make necessary changes to the ppd files.


service cups-browsed status
Restart cups

Latest revision as of 09:35, 25 September 2024

Common Unix Printing System

(Common Uncomfortable Pain Somewhere*)

*Yes we mean "there".

Over the years I have logged/wasted/learned for countless hours.

Access:

Most of Cups are integrated in the printer settings panel in your distro.

More features and reliability can be found from a browser:

localhost:631

Basics

To restart local printer services you need.

sudo service cups restart

To restart the network broadcast(sharing) and browsing(using others) you need.

sudo service cups-browsed restart && sudo service cups restart

Quirks

Config Settings

On KDE you can install the printer but the config will not stick.

System settings runs as the normal user and the config files are owned by root.

You can start system settings as root, make changes, and then come back.

sudo systemsettings5

OR do it via the cups web interface (localhost:631) which has access permissions to those files.

Color Profile

LibreOffice and Okular and others default to printing/exporting as RGB.

For those applications use the "driverless" option. It installs itself. The color profile is "color"

When installing prefer the series over the exact number. MG3600 series is more likely to work than MG3670

You can also install two versions of the printer. i.e. "GreenRoomCanonRGB" and "GreenRoomCanonCMYK"

Then you need to know what application uses what profile.

Config Files

The file for cups-browsed is located in /etc/cups/cups-browsed.conf

We want to normally make the following changes.

How we look for other printers:

BrowseRemoteProtocols  dnssd

How others can look for our printers:

BrowseLocalProtocols  dnssd

BrowseInterval 10
Normally you have cups as also a browsing option. BUT that will show all ZeroTier Printers as IP addresses.

Not nice.

Only Local Printers

Many times network printers get confused and confusing.

In the browsed config file you can make the following change.

BrowseRemoteProtocols none

You may also need to disable avahi-daemon network searching.

Edit /etc/avahi/avahi-daemon.conf and set deny-interfaces to the right interface.

deny-interfaces=eth0

You may need to run ifconfig to get the right name.

Here you can see me denying Zero-Tier as well. You can add more interfaces with commas separating them.

deny-interfaces=wlx502b73c405e8, ztyouqoel3

Then restart the service

sudo service avahi-daemon restart

Change a printer name or queue name

  • Stop CUPS Service. For openSUSE using systemd there are three services to stop (cups.path, cups.service, and cups.socket).
  • Edit /etc/cups/printers.conf and replace the old-name text with the new one. (appears only once).
  • Rename drivers: In etc/cups/ppd there are "drivers" named like the printer, so if you change the printer name, also rename the driver files.
  • Start the services.

Next Level

Usually best to just start over by running three commands.
sudo apt-get install --reinstall cups cups-browsed cups-client cups-common cups-daemon cups-server-common

then:

sudo systemctl daemon-reload

You can check the statuses with

service cups status

service cups-browsed status

Moving between major versions. (learned going from 22.04.5 to 24.04.1)

sudo /usr/sbin/cups-genppdupdate 

This will make necessary changes to the ppd files.

Restart cups