[sf-lug] calling the lpd printing daemon at boot time

Michael Paoli Michael.Paoli at cal.berkeley.edu
Tue Nov 3 00:30:25 PST 2020


> From: alexkleider <alexkleider at protonmail.com>
> Subject: [sf-lug] calling the lpd printing daemon at boot time
> Date: Tue, 03 Nov 2020 06:48:44 +0000

> On my Debian 10 system when I try to print using the lpr command at  
> a terminal I get the following:
> $ lpr ck_data
> lpr: connect: Connection refused
> Is lpd daemon running?
> jobs queued, but cannot start daemon.
>
> I can make the problem go away by gaining root privileges and running lpd.
> How can I make this happen automatically at boot time?
> I've tried web searching but to no avail.

Anyway, presuming you've already got your lpd installed ...

Let's see ...

# type lpd
-bash: type: lpd: not found
#

$ cat /etc/debian_version
10.6
$ apt-file --regexp search bin/lpd\$
lpr: /usr/sbin/lpd
lprng: /usr/sbin/lpd
$

https://qa.debian.org/popcon.php?package=lpr
https://qa.debian.org/popcon.php?package=lprng

$ apt-file show lpr | egrep '^lpr:.*(init|unit)'
lpr: /etc/init.d/lpd
$

So ... depending what init system one is using, there's service
to be enabled (if one wants it to default to (re)starting upon
(re)boot), and if one wants to start it now, to also be started.

So, if one is using systemd, it's likely something like:
# systemctl enable lpd.service
# systemctl start lpd.service
But one can check for likey name(s), e.g.:
# systemctl list-unit-files | fgrep lp
And look for (probable) matches to the desired.

If one is using sysvinit, it would, on Debian, be:
# update-rc.d lpd enable
# service lpd start

With either systemd or sysvinit, one would typically be
able to check the status of the command, by using the
respective "start" commands above but replacing "start"
with "status".

If one is using some other init system, ... well, check the
documentation. :-) but it likely involves ldp or lpd.service,
and a command or two to enable (for (re)boots) and start
the lpd daemon service.

And of course there's Read The Fine Manual (RTFM)
and Search The Fine Web (STFW).

Much, but not all, of this, would also apply to many other
apt-based distros.

references/excerpts/"hints":
apt-file(1)
Search engine ...
Debian popcon
https://wiki.debian.org/Daemon




More information about the sf-lug mailing list