0

Some time ago, I read about installing a printer more than once allowing you to use different settings in the driver or even a different driver altogether. This is then a shortcut to paper / quality settings that is most useful in programmes such as darktable which has a printing module that does not expose all the printing options. I have an old Epson inkjet printer and have installed it with the very basic Epson driver for documents, and the gutenprint driver for text and graphics / photographs which it is brilliant at once it's been calibrated.
I can name the print queues almost anything I want when installing the printer and even rename them in the Printers panel by clicking the cogwheel beside the printer selecting Printer Details from the dropdown and altering the Name field.

This leads to the question. If I switch to the Device Colour Profiles panel all the printers are named exactly the same, in my case Epson Stylus Photo R360 Printer. This is not helpful as different papers and printer settings require different icc calibration profiles. I believe the cups / colord system can automatically assign some profiles but I used argyl cms at the command line to create my own profiles so I don't think that will work for me.
So, rather than guesing, how do I change the names to make them unique and useful in my use case?

1 Answers1

0

When you add an older non-ipp printer it may, depending on the method used, prompt the user for a .ppd file which describes the printer options. Having tried lpoptions and lpinfo I took a punt on this being the source of the information and used nautilus file manager to find them on my system.

find / -iname Stylus-Photo-R360.ppd 2>/dev/null
/etc/cups/ppd/Stylus-Photo-R360.ppd
ls /etc/cups/ppd
Name_Docs_R360.ppd Photo_R360.ppd Photo_R360.ppd.O Stylus-Photo-R360.ppd Stylus-Photo-R360-2.ppd

If the user does not create unique names the system appends a number to the name and creates the .ppd file in the /etc/cups/ppd directory. I believe the .O extension denotes a backup file. If the user does provide a unique name when installing such as Name_Docs_R360 this becomes the filename Name_Docs_R360.ppd.
NB. Renaming this file does not change the printer name, it breaks the link to the .ppd file and reduces the options available on the printer.
To try and find where the printer name is stored and the .ppd file named I experimented, altering the printer name in the Printers panel by clicking the cogwheel beside the printer selecting Printer Details from the dropdown and altering the Name field, then monitoring which files were altered with

ls -lat /etc/cups/ppd
total 832
drwxr-xr-x 5 root lp   4096 Jan 19 19:02 ..
drwxr-xr-x 2 root lp   4096 Jan 19 18:41 .
-rw-r----- 1 root lp  33541 Jan 16 19:30 Name_Docs_R360.ppd
-rw-r----- 1 root lp 192435 Jan 15 17:56 Photo_R360.ppd
-rw-r----- 1 root lp 192430 Jan 14 19:26 Photo_R360.ppd.O
ls -lat /etc/cups/
total 120
drwxr-xr-x   5 root lp    4096 Jan 19 19:02 .
-rw-r-----   1 root lp     965 Jan 19 19:02 subscriptions.conf
-rw-r-----   1 root lp     965 Jan 19 18:53 subscriptions.conf.O
-rw-------   1 root lp    2041 Jan 19 18:45 printers.conf
drwxr-xr-x   2 root lp    4096 Jan 19 18:41 ppd
-rw-------   1 root lp    2109 Jan 19 18:39 printers.conf.O
-rw-------   1 root lp     108 Jan 16 19:31 classes.conf
-rw-r-----   1 root lp     108 Jan 16 19:27 classes.conf.O
drwxr-xr-x 148 root root 12288 Jan 16 19:07 ..
-rw-r-----   1 root lp    4745 Jan 15 20:35 cupsd.conf
-rw-r-----   1 root lp    4740 Jan 15 20:35 cupsd.conf.O
-rw-r--r--   1 root root    18 Jan 15 17:49 lpoptions
-rw-r--r--   1 root root   240 Jan 14 16:59 raw.convs
-rw-r--r--   1 root root   211 Jan 14 16:59 raw.types
-rw-r--r--   1 root root 30199 Oct  8 12:41 cups-browsed.conf
drwxr-xr-x   2 root root  4096 Sep 26 12:27 interfaces
-rw-r--r--   1 root root   142 Sep 26 12:27 snmp.conf
drwx------   2 root lp    4096 Sep 17  2023 ssl
-rw-r--r--   1 root root  2860 May 27  2022 cups-files.conf

These files are root protected so

sudo cat /etc/cups/ppd/Name_Docs_R360.ppd
[sudo] password for user:

*PPD-Adobe: "4.3"

% % This PPD file is intended for Epson Inkjet Printer Driver (ESC/P-R). % Epson Inkjet Printer Driver (ESC/P-R) for Linux is presented by Seiko Epson. % Copyright (C) Seiko Epson Corporation 2005-2011. % % LastUpdate: 2011/11/07 % % This program is free software: you can redistribute it and/or modify % it under the terms of the GNU General Public License as published by % the Free Software Foundation, either version 2 of the License or, at % your option, any later version. % % This program is distributed in the hope that it will be useful, % but WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You ought to have received a copy of the GNU General Public License % along with this program. If not, see <http://www.gnu.org/licenses/>. %

FormatVersion: "4.3" FileVersion: "1.1" LanguageVersion: English LanguageEncoding: ISOLatin1 PCFileName: "ESCPR.PPD" Manufacturer: "Epson" Product: "(Inkjet Printer)" cupsVersion: 1.2 cupsManualCopies: True cupsModelNumber: 1 cupsFilter: "application/vnd.cups-raster 0 epson-escpr-wrapper" cupsLanguages: "en ja nl fr de it pt es ko zh_CN zh_TW" ModelName: "Epson Stylus Photo R360" ShortNickName: "Epson Stylus Photo R360" NickName: "Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux" PSVersion: "(3010.000) 550" LanguageLevel: "3" ColorDevice: True DefaultColorSpace: RGB FileSystem: True Throughput: "1" LandscapeOrientation: Plus90 VariablePaperSize: False TTRasterizer: Type42 *1284DeviceID: "MFG:EPSON;MDL:Stylus Photo R360;DES:EPSON Stylus Photo R360;"

(truncated)

sudo cat /etc/cups/printers.conf
# Printer configuration file for CUPS v2.4.1
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 38
<DefaultPrinter Name_Docs_R360>
PrinterId 33
UUID urn:uuid:e16254e4-912e-3dc1-5c73-d23d946ec041
Info  EPSON Stylus Photo R360
Location office
MakeModel Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux
DeviceURI usb://EPSON/Stylus%20Photo%20R360?serial=W39030609191205230&interface=1
State Idle
StateTime 1737055847
ConfigTime 1737055847
Type 4108
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</DefaultPrinter>

(truncated)

Altering the name in gnome-control-center renames the /etc/cups/ppd/Name_Docs_R360.ppd filename and then cups updates the DefaultPrinter or Printer fields in /etc/cups/printers.conf. Location is set here too.

Quick back up

sudo cp /etc/cups/ppd/Docs_R360.ppd ~/Desktop/edited_Docs_R360_ppd.txt

and edit some of the .ppd file lines to try and find where those printer names are used.

sudo nano /etc/cups/ppd/Docs_R360.ppd
*ModelName:             "ModelName - Epson Stylus Photo R360"
*ShortNickName:         "ShortNickName - Epson Stylus Photo R360"
*NickName:              "NickName - Epson Stylus Photo R360 - Epson Inkjet Printer Driver (ESC/P-R) for Linux"

The relevant info can be accessed using:

sudo grep -i 'name
location' /etc/cups/Name_Docs.ppd
*PCFileName:            "ESCPR.PPD"
*ModelName:             "ModelName - Epson Stylus Photo R360"
*ShortNickName:         "ShortNickName - Epson Stylus Photo R360"
*NickName:              "NickName - Epson Stylus Photo R360 - Epson Inkjet Printer Driver (ESC/P-R) for Linux"
sudo grep -i 'name
location' /etc/cups/printers.conf
<DefaultPrinter Name_Docs_R360>
Location Location_office
MakeModel NickName - Epson Stylus Photo R360 - Epson Inkjet Printer Driver (ESC/P-R) for Linux

Now we have a printer named Docs_R360 in the Printers panel and one called ModelName - Epson Stylus Photo R360 in the Device Colour Profiles panel!

printers paneldevice colour profiles panel

Some notes.

  • Nicknames are truncated at commas. for some reason the Stylus-Photo-R360.ppd uses *NickName: "Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux" which gets truncated to Epson Stylus Photo R360 in gnome-control-center. Change it for a hyphen and the full name appears as gutenprint format theirs *NickName: "Epson Stylus Photo R360 - CUPS+Gutenprint v5.3.3"
  • gnome-control-center - Settings - Printers - Additional Printer Settings opens CUPS system-config-printer
  • CUPS system-config-printer - Properties - Settings reads / writes the Description field to / from Info EPSON Stylus Photo R360 and the Location field to Location office in /etc/cups/printers.conf.
  • It reads *NickName: "Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux" from /etc/cups/ppd/Stylus-Photo-R360.ppd for the Make and Model field.
  • Stylus-Photo-R360.ppd contains warnings # Printer configuration file for CUPS v2.4.1 # Written by cupsd # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
  • gnome-control-center - Settings - Device Colour Profiles - uses ModelName - Epson Stylus Photo R360 Printer to name the device
  • CUPS web page localhost:631/printers/
Queue Name Description Location Make and Model Status
Name - Stylus-Photo-R360 Description- EPSON Stylus Photo R360 Location - office Nickname - Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux Idle
printers.conf "Printer Name" printrs.conf "Info" printers.conf "Location" .ppd "NickName" -
  • CUPS web page localhost:631/printers/Stylus-Photo-R360
    Description: Description - EPSON Stylus Photo R360
    Location: Location - office
    Driver: NickName - Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux (color)
  • lpoptions reports
copies=1 device-uri=usb://EPSON/Stylus%20Photo%20R360?serial=W39030609191205230&interface=1 finishings=3 job-cancel-after=10800 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 print-color-mode=color printer-commands=none printer-info='Description - EPSON Stylus Photo R360' printer-is-accepting-jobs=true printer-is-shared=true printer-is-temporary=false printer-location=office printer-make-and-model='NickName - Epson Stylus Photo R360, Epson Inkjet Printer Driver (ESC/P-R) for Linux' printer-state=3 printer-state-change-time=1736876146 printer-state-reasons=none printer-type=135180 printer-uri-supported=ipp://localhost/printers/Docs_R360
  • to restart the CUPS daemon use systemctl restart cups