UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572
Original Poster
Rep:
It continued to work after rebooting. However, if the usb printer cord was disconnected and then reconnected, it subsequently failed to work after unless I restarted cups via the command "sudo systemctl restart cups". I don't know if that was the case before or not. But, it seems to be the case now.
Hmm. Perhaps that solves this thread. I'm going to wait for a bit before I mark it solved though. But thanks for your help ferrari. Much appreciated.
It continued to work after rebooting. However, if the usb printer cord was disconnected and then reconnected, it subsequently failed to work after unless I restarted cups via the command "sudo systemctl restart cups". I don't know if that was the case before or not. But, it seems to be the case now.
This might depend on whether systemd socket activation is in use. We can investigate this further if required.
Quote:
Hmm. Perhaps that solves this thread. I'm going to wait for a bit before I mark it solved though. But thanks for your help ferrari. Much appreciated.
Glad to have been of assistance, even if only to steer you around some of the underlying CUPS configuration directives and useful commands.
BTW, the netstat command needs to be run with sudo to see the root-owned process.
The localhost currently isn't working, perhaps because my printer is turned off. I'd likely have to either reboot my computer with the printer on for it to work or restart cups.
ETA:
After restarting cups and closing and then reopening the browser, cups does work. Here's the result of the command above now:
I don't remember this changeable behaviour previously with the CUPS browser admin function, but perhaps I generally kept both my computer and printer on (I used to run a web server, so the computer was always on anyway). Oh well, regardless, at least now I know how to get the browser CUPS admin tool working again. So, another solved.
Last edited by mark_alfred; 10-05-2016 at 07:06 PM.
Like I said previously, it's likely systemd socket activation at play. If so, it
can be configured to disable that feature and leave cupsd running permanently from boot
if desired. It can be explored further if you like.
Like I said previously, it's likely systemd socket activation at play. If so, it
can be configured to disable that feature and leave cupsd running permanently from boot
if desired. It can be explored further if you like.
While this isn't my thread and I don't want to hijack it, I have definitely noticed a difference in network handling between 14.04 and 16.04, which appears to be due to the increased systemd presence in the newer version, so I hope you do explore the socket activation feature further!
What I've experienced are "network unreachable" and "connection refused" situations, in cases that previously worked flawlessly. At the moment all seems well, but would definitely like to know more about what systemd changed about my networking.
It's interesting to note comment #19 in the bug report where the user reports
Quote:
No. Seems to be the option "-l" which causes systemd to shutdown cupsd and to restart if a print job is available. For applications with pre-checks for available printers or given printer names (for instance with java javax.print.PrintServiceLookup) or with CUPS web Interface on demand this does not work. I changed the option "-l" to "-f" in /lib/systemd/system/cups.service.
For reference, I'm using openSUSE Leap, and cups.service contains
Code:
ExecStart=/usr/sbin/cupsd -f
with the result being that cupsd is started at boot and remains active, and socket activation is not in use (ie cups.socket, cups.path are not present)
I'm concerned, though. I have been running CUPS for years, and certainly never changed this configuration. It seems odd to disable the best-documented way to administer the printers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.