michaelrsweet / lprint

A Label Printer Application
https://www.msweet.org/lprint
Apache License 2.0
219 stars 29 forks source link

Documentation claims snap should run the service, but it's not #71

Closed SmittyHalibut closed 1 year ago

SmittyHalibut commented 1 year ago

The documentation at https://github.com/michaelrsweet/lprint/blob/master/DOCUMENTATION.md says:

Note: When you install the LPrint snap on Linux or the package on macOS, the server is automatically run as root. When you install from source, a launchd (macOS) or systemd (all others) service file is installed but not activated - they can be used to automatically start LPrint when the system boots.

When I reboot the host, lprint does not run automatically. snap doesn't think it has any services installed:

[12:35:01] mark@pan:~$ sudo snap services
There are no services provided by installed snaps.

I was able to get systemctl to manage it by copying /snap/lprint/current/usr/local/etc/systemd/system/lprint.service to /etc/systemd/system/ and editing the binary name from it's chroot'd /usr/local/bin/lprint path to the externally accessible /snap/bin/lprint. Then I could enable and start it from systemctl without problem.

But the documentation suggests I shouldn't need to do this. So, either the docs should be updated, or the snap service stuff should be fixed. :-)

e-sr commented 1 year ago

I have the same setup, ubuntu 22.04 with lprint installed from snap. Then started the server as you suggest.(even of secondary importance if using systemctl or star from cli) Then i get the same error as you in #64. No clue waht to do and no idea of printig systems but i can read documentations...however i cannot print did you can print? if yes please steps to achieve it. Thanks!

Oberonc commented 1 year ago

I have the same setup, ubuntu 22.04 with lprint installed from snap. Then started the server as you suggest.(even of secondary importance if using systemctl or star from cli) Then i get the same error as you in #64. No clue waht to do and no idea of printig systems but i can read documentations...however i cannot print did you can print? if yes please steps to achieve it. Thanks!

It is because from snap you can only install version 1.1.0 and server support only exists from 1.1.1

tillkamppeter commented 1 year ago

I also found out that the Snap is not auto-starting the server. This once makes it difficult for end users to use this driver as they have to start the server manually. Second, today I have deployed a new look-up service for Printer Applications (currently only Snaps) on the OpenPrinting web site, The service requires that the Printer Application Snaps have auto-starting daemons (to intuitively work for end users). Therefore currently Printer Applications without auto-starting daemon are not included in the answedrs to the queries.

See also https://openprinting.github.io/current/#printer-application-look-up-via-the-openprinting-web-site and an example query:

https://openprinting.org/query.php?papps=true&device-id=MFG:HP;MDL:LaserJet%204050

michaelrsweet commented 1 year ago

OK, this looks like it will be fixed in the next release of the snap. I will test explicitly for it, however...