Connect: Add a Campus Printer (Linux Specific)

Issue/Question
  • How can I print on campus from my Linux system?

 

Overview

This article explains how users running Linux can set up and print from campus printers.  Although Linux support is not officially provided by PaperCut (the print server software vendor), adding printers is still possible using a community-maintained Python utility.

 

Environment

  • Any modern Linux operating system with Python 3 and CUPS installed should work.

  • These steps have been tested on:

    • Pop_OS! 22.04 LTS

    • Python 3.10.12

    • CUPS 2.4.1

 

Resolution

Before you begin:  Make sure you are connected to the GoTrojans wireless network.

 

First, download and extract the software:

  1. Navigate to https://github.com/Rewzilla/pc-mobility-print/releases and download the latest ".tar.gz" release file.

  2. Open the terminal and change to the directory in which you downloaded the ".tar.gz" file.  This is most likely ~/Downloads/.

  3. Extract the archive by running tar xzvf <filename>.

  4. Change to the extracted directory.

 

The print client can be run using either a CLI or GUI interface.

In order to use the CLI interface:

  1. Run python3 cli.py list to retrieve a list of available printers.

  2. For each printer from that list which you wish to add...

    1. Run python3 cli.py add <printername> to attempt to automatically add the printer to CUPS.

    2. Enter your DSU network username and password when prompted.  The printer should automatically be added.

    3. If the printer is not automatically added, you may instead run python3 cli.py get <printername> to retrieve its IPP address, which you may then use to manually add the printer in the CUPS interface at http://localhost:631/.

In order to use the GUI interface:

  1. Install the python-tk package.  For instance, on a Ubuntu-based system run apt install python-tk.

  2. Run python3 gui.py to start the print client.

  3. Enter your DSU network username and password, leave the other fields blank, and press Scan.

  4. Select all of the printers you wish to add on the left, then click Add Printers.

 

You are now ready to print.