How To Install CUPS Print Server on Manjaro
In this tutorial, we will show you how to install CUPS Print Server on Manjaro. Setting up a reliable print server is essential for managing printing tasks efficiently in Linux environments. CUPS (Common Unix Printing System) offers a robust solution for Manjaro users who need to configure local or network printers. This comprehensive guide walks you through the complete process of installing, configuring, and troubleshooting CUPS on Manjaro Linux, ensuring you can handle all your printing needs with ease.
Introduction
CUPS has become the standard printing system for Linux distributions, including Manjaro, due to its reliability and extensive feature set. Originally developed as the Common Unix Printing System, CUPS provides a modular printing solution that processes various data formats and delivers them to your printer in its native format.
The beauty of CUPS lies in its flexibility-it works seamlessly with local USB printers and network printers alike. Its web-based administration interface makes printer management accessible even for Linux beginners. Whether you’re setting up a single printer at home or managing multiple printers in an office environment, CUPS offers the tools you need.
Manjaro Linux, being an Arch-based distribution, integrates perfectly with CUPS, providing a straightforward installation process and reliable printing capabilities. By following this guide, you’ll establish a fully functional print server that can handle various printer models and configurations with minimal hassle.
Prerequisites
Before diving into the CUPS installation process on Manjaro, ensure you have the following prerequisites in place:
- A working Manjaro Linux installation with internet connectivity
- Administrative (sudo) privileges on your system
- Your printer connected to your computer via USB or available on your network
- Basic familiarity with terminal commands and package management
- Printer documentation (helpful but not essential)
For those using HP printers, special consideration is needed as some models require proprietary plugins that aren’t included in the standard distribution due to licensing restrictions. We’ll cover how to handle these situations later in this guide.
It’s highly recommended to connect and power on your printer before beginning the installation process. This allows CUPS to detect your printer during setup, which can significantly simplify configuration. Also, ensure your system is up to date by running sudo pacman -Syu
before proceeding with the installation.
Installing CUPS on Manjaro
Installing CUPS on Manjaro is straightforward thanks to the distribution’s excellent package management system. You have multiple methods to get CUPS up and running on your system.
Method 1: Using Pacman
Open a terminal window by pressing Ctrl+Alt+T
and run the following command to install the manjaro-printer package:
sudo pacman -S manjaro-printer
This comprehensive package includes CUPS and other essential printing utilities needed for basic printing functionality. It’s the recommended approach for most users as it provides a complete printing solution specifically tailored for Manjaro.
Method 2: Using Pamac (Graphical Method)
If you prefer using a graphical interface:
- Open Pamac (Add/Remove Software) from your application menu
- Search for “manjaro-printer”
- Click “Install”
- Enter your password when prompted
Additional Packages for HP Printers
HP printer users should install the HPLIP (HP Linux Imaging and Printing) package for enhanced support:
sudo pacman -S hplip
This package provides specialized drivers and utilities specifically designed for HP printers, ensuring optimal functionality.
Some HP printers require additional proprietary plugins that cannot be distributed with the main package due to licensing restrictions. If you have such a printer, you’ll need to install these plugins separately:
pamac build hplip-plugin
This installs the necessary proprietary components to enable full functionality with your HP printer.
User Group Configuration
After installing the necessary packages, add your user to the ‘sys’ group to ensure proper access to printing services. Replace “username” with your actual username:
sudo gpasswd -a username sys
This group membership allows your user account to manage printers and print jobs without requiring elevated privileges for every operation.
Enabling the CUPS Service
After installing the necessary packages, you need to enable and start the CUPS service to make it operational. CUPS uses systemd services in Manjaro for management.
To start and enable the CUPS service immediately, run the following commands in your terminal:
sudo systemctl enable --now cups.service
sudo systemctl enable --now cups.socket
sudo systemctl enable --now cups.path
These commands ensure that CUPS starts automatically every time you boot your system, while the “–now” flag starts the services immediately without requiring a reboot.
To verify that CUPS is running correctly, check its status with:
sudo systemctl status cups.service
You should see output indicating that the service is active and running.
Enhancing Network Printer Discovery
For better network printer discovery, especially for printers shared across a network, install and enable the Avahi daemon:
pamac install avahi
sudo systemctl enable --now avahi-daemon.service
Avahi provides zero-configuration networking (Zeroconf) capabilities, making it easier to detect network printers automatically. This is particularly useful in office environments where multiple printers might be available on the network.
With these services running, your CUPS installation is operational and ready for printer configuration. You can now proceed to add and configure printers using either the web interface or desktop utilities.
Understanding the CUPS Web Interface
CUPS provides a comprehensive web-based administration interface that allows you to manage all aspects of your printing system through any web browser. This interface is one of the most powerful features of CUPS, offering complete control over printer settings, jobs, and server configuration.
Accessing the Web Interface
To access the CUPS web interface, open your web browser and navigate to:
http://localhost:631/
This URL connects to the CUPS server running on your local machine, presenting a well-organized interface for printer management.
Navigating the Interface
The CUPS homepage provides an overview of available functions, including:
- Administration: Add printers, manage classes, set server settings
- Classes: View and manage printer groups
- Jobs: Monitor and control print jobs
- Printers: Configure individual printer settings
- Help: Access comprehensive documentation
For administrative tasks like adding printers or changing server settings, you’ll need to authenticate with your system credentials. CUPS will prompt for your username and password when attempting to perform administrative actions.
The web interface also provides extensive documentation through the “Help” section, offering guidance on various CUPS features and troubleshooting common issues. This makes it an invaluable resource for both beginners and advanced users who need detailed information about specific CUPS functionalities.
This web interface serves as the central management point for your CUPS print server, allowing you to perform virtually any printing-related configuration task without needing to edit configuration files manually.
Automatic Printer Configuration
One of CUPS’ strengths is its ability to automatically detect and configure printers, making setup effortless in many cases. When you connect a supported printer to your Manjaro system, CUPS should detect it automatically and configure it with appropriate default settings.
The Automatic Detection Process
The automatic detection process typically follows these steps:
- Connect your printer to your computer via USB or ensure it’s available on your network
- Ensure the printer is powered on
- Wait approximately one minute for CUPS to detect and configure the printer
- CUPS will search its database for matching drivers and apply the most appropriate one
Verifying Automatic Configuration
To verify if your printer was automatically detected and configured:
- Access the CUPS web interface at
http://localhost:631/
- Click on the “Printers” tab
- Your printer should be listed there if automatic configuration was successful
HP Device Manager
For HP printers, the HP Device Manager (HPLIP) provides an additional method for automatic configuration:
- Open the application launcher and search for “HP Device Manager”
- Launch the application
- The software will guide you through the printer setup process
- Follow the on-screen instructions to complete the configuration
This tool offers specialized detection and configuration for HP devices, often providing more complete functionality than generic CUPS configuration.
Troubleshooting Automatic Detection
If automatic detection fails, check the following:
- Ensure the printer is properly connected and powered on
- Verify that all CUPS services are running
- Check if the printer requires proprietary drivers
- For network printers, confirm they’re on the same network and discoverable
Even if automatic configuration succeeds, you may want to review the settings to ensure optimal performance. The next sections will cover manual configuration methods for cases where automatic detection fails or when you need more control over printer settings.
Manual Printer Setup Using CUPS Web Interface
If automatic printer detection fails or you need more control over your printer configuration, you can manually set up your printer using the CUPS web interface. This method provides detailed control over all printer settings.
Step-by-Step Manual Configuration
- Access the CUPS web interface at
http://localhost:631/
in your web browser - Click on the “Administration” tab at the top of the page
- Click on “Add Printer” under the Printers section
- You’ll be prompted to authenticate with your system username and password
- On the “Add Printer” page, you’ll see a list of discovered printers and connection methods
- Select your printer if it appears in the list, or choose the appropriate connection method (USB, LPD/LPR, IPP, etc.)
- Click “Continue” to proceed
- On the next page, provide a name, description, and location for your printer
- Check “Share This Printer” if you want to make it available to other computers on your network
- Click “Continue” again
- Select the manufacturer of your printer from the list and click “Continue”
- Choose the specific model and appropriate driver for your printer
- Click “Add Printer” to complete the basic configuration
- On the final page, set default printing options specific to your printer model
- Click “Set Default Options” to save these settings
Testing Your Configuration
After configuration, test the printer by clicking “Print Test Page” from the printer’s administration page to verify proper setup. This will send a simple page to your printer, confirming that the connection and driver configuration are working correctly.
The web interface provides access to all available drivers in the CUPS database, making it possible to find appropriate drivers for most printer models. If your specific model isn’t listed, try selecting a similar model from the same manufacturer, as they often share compatible drivers.
Manual Printer Setup Using Desktop Interface
For users who prefer a graphical desktop interface over the web interface, Manjaro provides desktop-specific printer configuration tools. These tools offer a familiar wizard-style interface that simplifies the printer setup process.
Installing the Desktop Configuration Tool
First, you’ll need to install the appropriate printer configuration package for your desktop environment:
For GNOME:
pamac install system-config-printer
For KDE:
pamac install print-manager
Once installed, you can access the printer configuration tool from your application menu by searching for “Print Settings” or “Printers”.
Adding a Printer Using the Desktop Interface
To add a printer using the desktop interface:
- Open the printer configuration tool from your application menu
- Click the “+” or “Add” button to begin adding a new printer
- The system will search for available printers
- Select your printer from the list of discovered devices
- If your printer isn’t automatically detected, click “Find Network Printer” or select the appropriate connection type
- Click “Forward” to continue
- The system will search for appropriate drivers
- If multiple drivers are available, select the recommended one
- Enter a name, description, and location for your printer
- Click “Apply” or “Add” to complete the setup
- Once the printer is added, you can print a test page by right-clicking on the printer and selecting “Print Test Page”
The desktop interface provides a more integrated experience with your desktop environment and might be more intuitive for users accustomed to graphical configuration tools. However, it offers slightly fewer advanced options compared to the CUPS web interface.
Both methods achieve the same result, so choose whichever approach you find more comfortable and convenient for your workflow.
Managing Print Jobs and Queues
Effective print job management is essential for a smooth printing experience. CUPS provides comprehensive tools for monitoring and controlling the printing process.
Using the CUPS Web Interface
To manage print jobs through the CUPS web interface:
- Navigate to
http://localhost:631/jobs/
- Here you’ll see all current and completed print jobs
- For active jobs, options include:
- Cancel Job: Stops the print job completely
- Hold Job: Pauses the job temporarily
- Release Job: Resumes a held job
- Move Job: Transfers the job to another printer
Using Desktop Utilities
You can also manage print jobs through your desktop environment’s printer utility, which typically shows a print queue when you click on a printer icon. These utilities offer user-friendly interfaces for common queue management tasks.
Command-Line Management
For users who prefer the terminal, CUPS provides powerful command-line utilities:
lpstat -o
to view all active jobscancel [job-id]
to cancel a specific joblprm [job-id]
to remove a job from the queuelp -i [job-id] -H hold
to hold a joblp -i [job-id] -H resume
to release a held job
Effective queue management ensures smooth printing operations and helps resolve issues when print jobs get stuck or fail. Regular monitoring of print queues is recommended, especially in environments with heavy printing loads.
Configuring Network Printing
CUPS makes it easy to share printers across your network or connect to remote print servers, extending the functionality of your printing system beyond a single machine.
Sharing Printers on Your Network
To share a printer from your Manjaro system:
- Access the CUPS web interface at
http://localhost:631/
- Click on the “Administration” tab
- Under “Server Settings,” select “Share printers connected to this system”
- Save changes when prompted
- Make sure your firewall allows connections to port 631
This configuration allows other computers on your network to discover and use printers connected to your Manjaro system.
Connecting to a Remote CUPS Server
To connect to a remote CUPS server instead of using a local printer, you can create a client configuration:
- Create or edit the file
/etc/cups/client.conf
- Add the following line:
ServerName server_address
- Replace
server_address
with the hostname or IP address of your CUPS server - If the server uses a non-standard port, append it with a colon (e.g.,
server_address:631
) - Save the file
User-specific configurations can be created in ~/.cups/client.conf
, which will take precedence over the system-wide configuration. This allows different users to connect to different print servers based on their needs.
Remember that this configuration will redirect all print jobs to the specified server. If that server becomes unavailable, printing will be disabled until the server is back online or the configuration is changed.
Advanced CUPS Configuration
For users who need more control over their printing environment, CUPS offers various advanced configuration options through configuration files and specialized settings.
Printer Classes
Printer classes group multiple printers together so jobs are sent to the first available printer, improving efficiency and providing backup options:
- Access the CUPS web interface at
http://localhost:631/
- Click on the “Classes” tab
- Click “Add Class” to create a new printer group
- Follow the prompts to name the class and add printers to it
Access Control
Restrict printer access to specific users or IP addresses by modifying /etc/cups/cupsd.conf
:
<Location /printers/printername>
Order allow,deny
Allow @LOCAL
Deny from All
</Location>
This example allows only local users to access the specified printer. After making changes, restart CUPS with sudo systemctl restart cups.service
.
Custom PPD Files
For printers requiring specialized drivers, you can install custom PPD (PostScript Printer Description) files:
- Obtain the PPD file from the manufacturer’s website
- Place it in
/etc/cups/ppd/
- Restart CUPS:
sudo systemctl restart cups.service
- Configure the printer using the CUPS web interface, selecting the custom PPD during setup
SSL/TLS Encryption
Secure remote printing by configuring CUPS to use encryption:
- Edit
/etc/cups/cupsd.conf
- Add or modify the following lines:
ServerCertificate /etc/cups/ssl/server.crt ServerKey /etc/cups/ssl/server.key
- Generate the necessary certificates
- Restart CUPS:
sudo systemctl restart cups.service
These advanced configurations require careful editing of CUPS configuration files. Always make backups before modifying configuration files, and restart the CUPS service after changes to apply them.
Troubleshooting Common CUPS Issues
Even with proper setup, printing issues can occur. Here are solutions to common CUPS problems on Manjaro:
Printer Not Detected
- Ensure the printer is powered on and properly connected
- Check if the printer needs proprietary drivers
- Run
sudo systemctl restart cups.service
to restart CUPS - For network printers, verify network connectivity
- Try connecting the printer to a different USB port
Permission Issues
- Verify your user is in the ‘sys’ group:
groups username
- Check file permissions on
/var/spool/cups
and/etc/cups
- Look for permission errors in CUPS logs:
sudo journalctl -u cups.service
- Run
sudo chown -R root:sys /var/spool/cups
to correct ownership
Print Jobs Stuck in Queue
- Clear the print queue:
sudo cancel -a
- Restart CUPS:
sudo systemctl restart cups.service
- Check printer status in the web interface
- Verify the printer is online and not reporting errors
- Check if the printer needs maintenance (paper jam, low ink, etc.)
Driver Problems
- For HP printers, ensure hplip-plugin is installed for full functionality
- Try alternative drivers through the CUPS interface
- Check manufacturer websites for Linux drivers
- Search the Arch User Repository (AUR) for specific printer drivers
Print Quality Issues
- Adjust printer settings through the CUPS web interface
- Update to the latest driver version
- Clean print heads through your printer’s maintenance menu
- Check ink or toner levels
- Try printing at different quality settings
Checking CUPS Logs
When troubleshooting, check logs for specific error messages:
- View CUPS error log:
cat /var/log/cups/error_log
- Check system logs:
sudo journalctl -u cups.service
These logs often provide specific error messages that can guide you to the solution, making troubleshooting much more efficient.
Congratulations! You have successfully installed CUPS. Thanks for using this tutorial for installing CUPS (previously an acronym for Common Unix Printing System) on Ubuntu 24.04 LTS systems. For additional help or useful information, we recommend you check the official CUPS website.