Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How do I get CUPS to start at boot in Fedora 20?
New Posts  All Forums:Forum Nav:

How do I get CUPS to start at boot in Fedora 20?

post #1 of 10
Thread Starter 
According to Fedora's systemd page here: https://fedoraproject.org/wiki/Systemd
it says that you enable a startup service using:
Code:
sudo systemctl enable name.service

So for CUPS, I did:
Code:
sudo systemctl enable cups.service

I get no reply. However, this command says that cups.service is enabled:
Code:
systemctl is-enabled cups.service

Great. But when I look at netstat -na, port 631 is not being listened to, and I can't connect to the web interface in any browser.

So I have to manually do:
Code:
sudo systemctl start cups.service

What is the difference between being enabled and "started?" And how can I get CUPS to start at boot? Thanks in advance.
post #2 of 10
Enabled means it will be started on boot, and start means exactly start. At least that is the behavior I have observed.

Edit: 1000th post! biggrin.gif
post #3 of 10
Thread Starter 
Unfreaking believable... Any clue as to the cause of the stupid behavior?

Congrats on the 1k post.
post #4 of 10
You didn't reboot after running systemctl enable, did you? If not, then the service wouldn't be started until you either run systemctl start or reboot. It works the other way too. You can start a service without enabling it, so it wouldn't start back up after a reboot.
post #5 of 10
Thread Starter 
Quote:
Originally Posted by Ferrari8608 View Post

You didn't reboot after running systemctl enable, did you? If not, then the service wouldn't be started until you either run systemctl start or reboot. It works the other way too. You can start a service without enabling it, so it wouldn't start back up after a reboot.

I absolutely did reboot! The service is not started when I reboot; I have to manually start it every time, despite systemctl saying that it is enabled.

The strange thing is, when I start or enable cups.service, it does not appear in the list of services. However, I can see through netstat -na that port 631 is being listened on after starting it. cups.path and cups.socket are both in the systemctl list, though.
post #6 of 10
Quote:
Originally Posted by Ferrari8608 View Post

You didn't reboot after running systemctl enable, did you? If not, then the service wouldn't be started until you either run systemctl start or reboot. It works the other way too. You can start a service without enabling it, so it wouldn't start back up after a reboot.

from what I've seen, systemctl enable does start the service as well.

systemctl status will tell you if it's running:
Code:
systemctl status cups
post #7 of 10
Quote:
Originally Posted by Plan9 View Post

from what I've seen, systemctl enable does start the service as well.
Quote:
Originally Posted by man systemctl 

enable NAME...

Enable one or more unit files or unit file instances, as specified on the command line. This will create a number of symlinks as encoded in the "[Install]" sections of the unit files. After the symlinks have been created, the systemd configuration is reloaded (in a way that is equivalent to daemon-reload) to ensure the changes are taken into account immediately. Note that this does not have the effect of also starting any of the units being enabled. If this is desired, a separate start command must be invoked for the unit. Also note that in case of instance enablement, symlinks named the same as instances are created in the install location, however they all point to the same template unit file.

As for why it isn't starting on reboot, I'm not sure about that one. It's supposed to if you have enabled it. Have you checked the journal? If CUPS is throwing an error when systemd tries to start it, it should be in the journal.
Code:
man journalctl
post #8 of 10
Thread Starter 
lol this computer is complete garbage... Now the service is running at boot...

I don't know what the issue was/is, but this shuttle has never been anything but trouble. Let it be known: shuttle makes absolute garbage, and you should never buy any of their products. Shuttle and raidmax both: I call them the garbage company and the scam company, respectively.

I guess that's that. Thanks for your help.
post #9 of 10
Quote:
Originally Posted by Ferrari8608 View Post


As for why it isn't starting on reboot, I'm not sure about that one. It's supposed to if you have enabled it. Have you checked the journal? If CUPS is throwing an error when systemd tries to start it, it should be in the journal.
Code:
man journalctl

The status command I posted earlier will show the error on any failed services
post #10 of 10
With cups, it is no longer as simple as systemctl enable cups if you actually want to see a cups process running all the time. If you don't care about that, then maybe the systemd way will work for you.

The quick and dirty to get cups running all the time:
Code:
ln -s /lib/systemd/system/cups.service /etc/systemd/system/multi-user.target.wants/

Lennart Poettering, the great new g-d of linux in his incessant quest to take over the open source community has, in his infinite wisdom, decided that he knows best...always. In the name of saving a scant bit of resources (a pointless waste of time in this case) he has redesigned cups to use the "systemd (i.e. the Lennart) way of doing things" So now the default configuration of cups, specially customized by master Poettering himself is to use socket activation. I.e. cups now doesn't actually start until it has something to do.

You can read about the divine Lennart path as it applies to cups here:
http://0pointer.de/blog/projects/socket-activation2.html

Another article as well for interest:
http://www.itwire.com/opinion-and-analysis/open-sauce/65652-no-interest-in-poetterings-problems-says-torvalds

Systemd developers have long taken the position that they are the center of the universe. Both Lennart Poettering and Kay Sievers do what they want and then expect everyone else to bend to their will even if they produce buggy overly complex software. Lennart in particular has no self awareness whatsoever. I've seen his kind before. He comes off as completely arrogant, uses his intellect to deeply and in intentionally offend others in such subtle ways that he can claim he isn't being personal all the while it's very personal and then turns around and claims everyone else is being a jerk when they react poorly to his provocations. It's very manipulative and he is extraordinarily good at it. It's a personally trait mastered only by the most intelligent and insecure of individuals.
Edited by Exedor - 1/13/15 at 11:21am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › How do I get CUPS to start at boot in Fedora 20?