CUPS: Unable to get Serial Printer (/dev/ttyS0) to work
This document (7001022) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Printer State: stopped, accepting jobs. (as reported in http:<ipaddress>:631/printers)
Resolution
Two solutions exists:
1) Modify the system configuration
1. Create a file in /etc/udev/rules.d named 99-udev-selfmade-last.rules
2. Add the following line to 99-udev-selfmade-last.rules:
KERNEL=="ttyS0", GROUP="lp", MODE="660"
This will apply a special rule to the device ttyS0, assigning it to the"lp" group and giving it the permissions of 660. This rule is applied after the other rules pertaining to devices defined by udev, and ensures that if the default rules are changed (by an updated RPM, for example), the ttyS0 device will still have the correct attributes to resolve this problem.
OR
2) Create a script that runs each time the machine starts:
1. Create the file /etc/init.d/after.local (this assumes the file doesn't already exist - if it does, simply append to it)
The content must be:
#!/bin/sh
chown root:lp ttyS0
chmod 660 /dev/ttyS0
2. (optional, if needed) Set the printer to Started by adding the lines
sleep 3
/usr/bin/enable <name of printer>
3. Modify the after.local to have execute permissions
chmod +x after.local
For the line "sleep 3" in the after.local script, the "3" represents three seconds. This may be needed to pause the scipt before proceeding, giving time for CUPS to be up and running before enabling the printer. Adjust the number of seconds as needed.
Additional Information
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7001022
- Creation Date: 24-Jul-2008
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Desktop
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com