Install Printer Driver on Steam Deck (CUPS)

This script allows you to print from the steam deck to any local printer on your network. After installing, please open your browser with: http://localhost:631/admin there you can “Add Printer”, after that you can now easily print from your steam deck.

Thanks LittleJawa for the script! Edit: I fixed the Parameters (there were to much spaces) and added some files that need to be removed if you need to reinstall cups because of steam deck update.


sudo steamos-readonly disable

# Delete old files if persistent because you had cups prev. installed before
sudo rm /etc/cups/cups-files.conf.default
sudo rm /etc/cups/cupsd.conf.default
sudo rm /etc/cups/snmp.conf.default
sudo rm /etc/xdg/autostart/print-applet.desktop
sudo rm /etc/cupshelpers/preferreddrivers.xml

# initialize and populate pacman PGP keys
sudo pacman-key --init
sudo pacman-key --populate archlinux

# CUPS + KDE printer manager GUI
PACKAGES="cups print-manager system-config-printer"

# Auto-discovery via DNS
# https://wiki.archlinux.org/title/Avahi#Hostname_resolution
PACKAGES="$PACKAGES nss-mdns"

# WARNING: requires to update the /etc/nsswitch.conf file
# use the following:
# sed -i s/mymachines resolve/mymachines mdns_minimal
#[NOTFOUND=return] resolve/ /etc/nsswitch.conf

# Optionals (helpful)
# foomatic pre-built ppd drivers
PACKAGES="$PACKAGES foomatic-db-engine foomatic-db-ppds foomatic-db-nonfree-ppds"

# ghostscript for non-pdf printers
PACKAGES="$PACKAGES ghostscript"

# cups-filters for driverless printers
PACKAGES="$PACKAGES cups-filters"

sudo pacman -Sy $PACKAGES

sudo systemctl enable --now avahi-daemon
sudo systemctl enable --now cups

# re-lock the filesystem
sudo steamos-readonly enable
Source: Steam Forum

Categories:

Tags:

27 responses

  1. Julian Avatar

    This is absolutely big. Thank you a lot for it! I’m a firm believer that Valve should add printer services in future updates, but until then, I’ll use this 🙂

  2. Jeuris C Rodriguez Avatar
    Jeuris C Rodriguez

    Everything installed correctly, I just dont know what to do when it prompts for username and password. Is there a way to disable this ? Thank you in advance

    1. Which prompt? Have you set a password for the user “deck”? If not you can do this by opening a shell and type “passwd”. Or which user/password prompt are you refering to?

  3. Deejay Avatar
    Deejay

    When I select Add Printer local host:631 asks for username/Password.

    1. Nathan Avatar
      Nathan

      You will probably want to use “deck” as the username, and whatever you set for your sudo password

  4. I needed also to remove after the latest update
    /etc/cupshelpers/preferreddrivers.xml
    and added
    sudo rm /etc/cupshelpers/preferreddrivers.xml
    to the script

    1. Thanks I will add it to the script!

  5. JeFe_RoJo Avatar
    JeFe_RoJo

    Thank you very much, everything has been installed correctly.

    However, in my case, I have a canon MP495 connected by wifi to the network and the deck does not detect it.
    I understand that the driver is missing or is “too old to be supported”.

  6. Worked for me. The hard part was getting my Brother HL-L2340D working. USB connection did not work, no driver shown and none of the others I tried work. But WIFI connection did work, and CUPS found a driver for the printer:

    “HL-L2340D series – IPP Everywhere (grayscale, 2-sided printing)”

    It’s slow as sin to get, process, and print, but it works.

  7. anewark Avatar

    I print from my Deck to a CUPS print server I have. After running this script I could add the printer successfully, but when printing the job would not process on, showing the job as “Held for authentication”. To fix this, I had to run the two commands below to get it to work.

    cupsctl –share-printers –remote-any
    lpadmin -p printer -o printer-is-shared=true

    Source -> http://localhost:631/help/sharing.html?TOPIC=Getting+Started&QUERY=

    1. Thanks for sharing!

  8. RatherNotSay Avatar
    RatherNotSay

    Hay seems your providing alot of help on this so I was wondering if you would know why firefox keeps crashing after I go to print the document I want to print. I used the script, logged into the site, added my printer, rather flawlessly might I add, but I am kind of stumped. I’m going to try messing with the printer settings on the website to see if I can’t fix it but still wanna leave this here in-case someone else is having this issue.

  9. Vigsterkr Avatar
    Vigsterkr

    Jobs just show as stopped, I think this does not work for my samsung, how do I uninstall this completely?

    Thank you

  10. Hello
    Im lost on PPD files as I’m looking for one that works with a HP LaserJet M506. Best I can find is an all in one file from HP but when I try to download it asks for a distro. Most of the files come up with a .run file witch I have no idea how to use.
    Will someone help me.

    1. A run file is most likely just a bash script. You can verify this by opening it with Kate.

      Though, you can also install hp lip to cover most HP printers. Add it to the packages list, and you should be good.

      When in doubt, Arch Wiki: https://wiki.archlinux.org/title/CUPS/Printer-specific_problems

  11. If anyone else having issues with error
    “signature from “GitLab CI Package Builder ” is unknown trust”, try adding the following line to the script (where the other pacman init lines are)

    “sudo pacman-key –populate holo”

  12. After updating to Steam OS 3.5.5 most of packages became corrupted, hoping you can update this script for it to work again.

  13. Chromium Avatar

    I tried that script, but it says during installation, that all packages are corrupted and deletes them again.
    Can anybody help here?

    1. mikmikmikmik Avatar
      mikmikmikmik

      I have not had your issue, it just does what it is supposed to do.

    2. Seems this has fallen off a bit. Just got my steam deck, ran this script. Same issue. Seems like this was once a great thing but now back to the drawing board. I am having the same issues you were having back in December.

  14. Hi!

    Very new to all of this, and getting the following error:

    error: qpdf: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/qpdf-11.4.0-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).

    Any help would be much Appreciated!

  15. mikmikmikmik Avatar
    mikmikmikmik

    At the top of the script, I put these words for myself in case I lost my Epson network printer after an OS update:

    #https://steamcommunity.com/app/1675200/discussions/2/3273562123582957766/?l=greek&ctp=6
    #https://deckplosion.de/install-printer-driver-on-steam-deck/
    #https://wiki.debian.org/CUPSDriverlessPrinting

    # After an OS update, this script has to be likely executed again as sudo /home/deck/Desktop/EnablePrinting_HAveToReDoAfterEveryOSupdate.sh
    # If printer not found then
    # Edit /etc/cups/cups-browsed.conf to set the CreateIPPPrinterQueues line to Driverless and restart cups-browsed::::
    # sudo systemctl restart cups-browsed
    # Can use http://localhost:631 after this script for more cups info but does not show current printer.
    # lpstat -p -d should now show the printer. In my case my Epson printer.
    # Could also use the command driverless list to show any printer that is advertising itself as driverless.
    # Could also used the command lpinfo -v to see other advertised services by the printer.

  16. With SteamOS 3.5 I had to add:

    pacman-key –populate holo

    I was getting SSL errors before that.

  17. I can’t connect to the printer HP LaserJet Professional M1214nfh MFP. I can’t find the PPD file.

  18. Same thing happened to me. Lots of corrupted files, apparently.

  19. Same for me.

  20. dnkmmr Avatar

    I got this error
    (deck@steamdeck var)$ /home/deck/Desktop/install-cups
    [sudo] password for deck:
    ==> Appending keys from archlinux.gpg…
    ==> Updating trust database…
    gpg: next trustdb check due at 2024-04-10
    pacman-key: invalid option — ‘–’
    :: Synchronizing package databases…
    jupiter-3.5 is up to date
    holo-3.5 is up to date
    core-3.5 is up to date
    extra-3.5 is up to date
    community-3.5 is up to date
    multilib-3.5 is up to date
    warning: nss-mdns-0.15.1-1 is up to date — reinstalling
    warning: ghostscript-10.01.1-1 is up to date — reinstalling
    resolving dependencies…
    looking for conflicting packages…

    Packages (27) libexif-0.6.24-2 perl-alien-build-2.80-1 perl-alien-libxml2-0.19-1 perl-capture-tiny-0.48-6 perl-clone-0.46-1 perl-dbi-1.643-4
    perl-ffi-checklib-0.31-2 perl-file-chdir-0.1011-4 perl-file-which-1.27-2 perl-path-tiny-0.144-1 perl-xml-libxml-2.0208-1
    perl-xml-namespacesupport-1.12-5 perl-xml-sax-1.02-1 perl-xml-sax-base-1.09-5 python-cairo-1.23.0-6 python-pycups-2.0.1-6
    python-pycurl-7.45.2-3 qpdf-11.4.0-1 cups-1:2.4.5-1 cups-filters-1.28.17-4 foomatic-db-engine-4:20220521-1
    foomatic-db-nonfree-ppds-3:20230402-1 foomatic-db-ppds-3:20230402-1 ghostscript-10.01.1-1 nss-mdns-0.15.1-1 print-manager-23.04.2-1
    system-config-printer-1.5.18-2

    Total Download Size: 79.07 MiB
    Total Installed Size: 171.00 MiB
    Net Upgrade Size: 127.39 MiB

    :: Proceed with installation? [Y/n]
    :: Retrieving packages…
    perl-alien-build-2.80-1-any 374.2 KiB 515 KiB/s 00:01 [#######################################################] 100%
    qpdf-11.4.0-1-x86_64 955.7 KiB 1304 KiB/s 00:01 [#######################################################] 100%
    system-config-printer-1.5.18-2-x86_64 1285.0 KiB 1669 KiB/s 00:01 [#######################################################] 100%
    print-manager-23.04.2-1-x86_64 457.3 KiB 584 KiB/s 00:01 [#######################################################] 100%
    perl-dbi-1.643-4-x86_64 708.0 KiB 850 KiB/s 00:01 [#######################################################] 100%
    libexif-0.6.24-2-x86_64 483.7 KiB 576 KiB/s 00:01 [#######################################################] 100%
    foomatic-db-engine-4:20220521-1-x86_64 209.1 KiB 3.24 MiB/s 00:00 [#######################################################] 100%
    cups-filters-1.28.17-4-x86_64 856.1 KiB 995 KiB/s 00:01 [#######################################################] 100%
    perl-xml-libxml-2.0208-1-x86_64 263.6 KiB 2.03 MiB/s 00:00 [#######################################################] 100%
    python-pycurl-7.45.2-3-x86_64 102.6 KiB 1333 KiB/s 00:00 [#######################################################] 100%
    foomatic-db-nonfree-ppds-3:20230402-1-any 159.8 KiB 1258 KiB/s 00:00 [#######################################################] 100%
    perl-xml-sax-1.02-1-any 41.8 KiB 734 KiB/s 00:00 [#######################################################] 100%
    perl-path-tiny-0.144-1-any 46.2 KiB 660 KiB/s 00:00 [#######################################################] 100%
    python-cairo-1.23.0-6-x86_64 94.5 KiB 675 KiB/s 00:00 [#######################################################] 100%
    perl-xml-sax-base-1.09-5-any 23.5 KiB 500 KiB/s 00:00 [#######################################################] 100%
    python-pycups-2.0.1-6-x86_64 59.6 KiB 390 KiB/s 00:00 [#######################################################] 100%
    perl-capture-tiny-0.48-6-any 17.7 KiB 264 KiB/s 00:00 [#######################################################] 100%
    perl-file-which-1.27-2-any 12.1 KiB 228 KiB/s 00:00 [#######################################################] 100%
    nss-mdns-0.15.1-1-x86_64 11.1 KiB 185 KiB/s 00:00 [#######################################################] 100%
    perl-ffi-checklib-0.31-2-any 15.8 KiB 94.5 KiB/s 00:00 [#######################################################] 100%
    perl-file-chdir-0.1011-4-any 10.6 KiB 186 KiB/s 00:00 [#######################################################] 100%
    perl-alien-libxml2-0.19-1-any 9.3 KiB 93.0 KiB/s 00:00 [#######################################################] 100%
    cups-1:2.4.5-1-x86_64 5.2 MiB 3.85 MiB/s 00:01 [#######################################################] 100%
    perl-xml-namespacesupport-1.12-5-any 11.7 KiB 40.2 KiB/s 00:00 [#######################################################] 100%
    perl-clone-0.46-1-x86_64 10.5 KiB 44.2 KiB/s 00:00 [#######################################################] 100%
    ghostscript-10.01.1-1-x86_64 19.7 MiB 9.94 MiB/s 00:02 [#######################################################] 100%
    foomatic-db-ppds-3:20230402-1-any 48.1 MiB 13.8 MiB/s 00:03 [#######################################################] 100%
    Total (27/27) 79.1 MiB 22.4 MiB/s 00:04 [#######################################################] 100%
    (27/27) checking keys in keyring [#######################################################] 100%
    (27/27) checking package integrity [#######################################################] 100%
    error: qpdf: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/qpdf-11.4.0-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: libexif: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/libexif-0.6.24-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: cups-filters: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/cups-filters-1.28.17-4-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: cups: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/cups-1:2.4.5-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: print-manager: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/print-manager-23.04.2-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: python-pycups: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/python-pycups-2.0.1-6-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: python-pycurl: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/python-pycurl-7.45.2-3-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: python-cairo: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/python-cairo-1.23.0-6-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: system-config-printer: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/system-config-printer-1.5.18-2-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: nss-mdns: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/nss-mdns-0.15.1-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-capture-tiny: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-capture-tiny-0.48-6-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-ffi-checklib: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-ffi-checklib-0.31-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-file-chdir: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-file-chdir-0.1011-4-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-file-which: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-file-which-1.27-2-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-path-tiny: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-path-tiny-0.144-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-alien-build: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-alien-build-2.80-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-alien-libxml2: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-alien-libxml2-0.19-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-xml-sax-base: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-xml-sax-base-1.09-5-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-xml-namespacesupport: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-xml-namespacesupport-1.12-5-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-xml-sax: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-xml-sax-1.02-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-xml-libxml: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-xml-libxml-2.0208-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-clone: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-clone-0.46-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: perl-dbi: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/perl-dbi-1.643-4-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: foomatic-db-engine: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/foomatic-db-engine-4:20220521-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: foomatic-db-ppds: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/foomatic-db-ppds-3:20230402-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: foomatic-db-nonfree-ppds: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/foomatic-db-nonfree-ppds-3:20230402-1-any.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: ghostscript: signature from “GitLab CI Package Builder ” is unknown trust
    :: File /var/cache/pacman/pkg/ghostscript-10.01.1-1-x86_64.pkg.tar.zst is corrupted (invalid or corrupted package (PGP signature)).
    Do you want to delete it? [Y/n]
    error: failed to commit transaction (invalid or corrupted package (PGP signature))
    Errors occurred, no packages were upgraded.
    Failed to enable unit: Unit file cups.service does not exist.

Leave a Reply

Your email address will not be published. Required fields are marked *