Last active
October 29, 2025 18:17
-
-
Save Solarflame5/e38d25c495bb82e3605029ba37792e45 to your computer and use it in GitHub Desktop.
Revisions
-
Solarflame5 revised this gist
Jun 1, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye ## Set up the Raspberry Pi Note: This probably also works in Raspberry Pi OS Bookworm, but I have only tested this on my Pi 1 B+ that doesn't support Bookworm. It should also probably work on most Debian based distros including Ubuntu. - Flash the Raspbian Bullseye Lite image to the SD card - Configure the user account, network and SSH settings while imaging to make setup easier. ## Install the required packages -
Solarflame5 created this gist
Jan 14, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,48 @@ # How to set up an HP LaserJet 1020 printer server using CUPS on Raspberry Pi OS Bullseye ## Set up the Raspberry Pi Note: This probably also works in Raspberry Pi OS Bookworm, but I have only tested this on my Pi 1 B+ that doesn't support Bookworm - Flash the Raspbian Bullseye Lite image to the SD card - Configure the user account, network and SSH settings while imaging to make setup easier. ## Install the required packages You need to install CUPS, HPLIP, and the foo2zjs printer drivers, use the following commands: ``` sudo apt update sudo apt install cups hplip printer-driver-foo2zjs ``` CUPS will handle managing printers and sharing them to your network, HPLIP is required to upload the printer firmware to the printer, and the foo2zjs drivers are required for printing. ## Set up CUPS Run the following commands to allow configuring CUPS without logging in as root and from other computers in the network: ``` sudo usermod -a -G lpadmin [your username] sudo cupsctl --remote-any sudo systemctl restart cups ``` ## Set up the HP Plugin The HP LaserJet 1020 requires its firmware to be uploaded everytime its connected, HPLIP handles this automatically after setting it up. Plug in your printer, turn it on, and then run the following command: ``` sudo hp-plugin -i ``` Then follow these steps: 1. Choose "Download plug-in from HP (recommended)" 2. Accept the license terms for the plugin 3. Wait for it to install ## Configure your printer in CUPS 1. Open the web interface for CUPS by navigating to `https://[Your pi's IP]:631`(https://192.168.1.17:631 for example) 2. Click "Administration" in the top navigation bar 3. Click the "Add printer" button under Printers 4. Select "HP LaserJet 1020 USB FN2Z0GV HPLIP (HP LaserJet 1020)" under "Local Printers" 5. Check "Share this printer" to use it across the network. 6. Click "Continue" 7. Select "HP LaserJet 1020 Foomatic/f002zjs-z1 (recommended) (en)" under the printer model, make sure that the make is "HP" 8. Click "Add printer" 9. Click "Set default options" Now you need to set the postscript renderer to ghostscript in cups-filters, run the following command in the terminal using your printer's name("HP_LaserJet_1020" for example): ``` lpadmin -p [your printer's name in CUPS] -o pdftops-renderer-default=gs ``` ## Test the printer Go back to the CUPS web interface, and navigate to your printer's page, click the "Maintenance" drop down and click "Print test page", you have successfully set up your printer if it prints without any problems.