michaelrsweet / lprint

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

Issue #94 is not present using MacOS as a server, still present using Linux as a server. #125

Closed brianbarr closed 5 months ago

brianbarr commented 5 months ago

Firstly, thank you Michael Sweet for this software. It works wonderfully on a MacOS based server platform and the barcode labels are now crisp and legible. I can now use my Mac to print barcode labels to a Zebra EPL2 2844 USB printer remotely attached to my network via an airport express. It works as expected and exactly per the documentation. My server mule is a 2014 mac mini running MacOS 13 Ventura. BTW is there any reason why the minimum MacOS version for a server was bumped to 13? This eliminates all mac hardware older than 2014.

I am still having issues with doing the same thing (and at a much lower cost) with linux. The snap version I installed on a clean Debian 11 machine finds the printer, adds it, but when I go to do a test print, Lprint queues a job and the whole process stalls. The server web page stalls and becomes unresponsive until I delete the test print job and the printer. It seems lprint cannot find the printer to start the printing process.

Also the snap version is a bit confusing as far as the docs vs operation.

/etc/lprint.conf does not seem to do anything for a snap based install.

Similarly "systemctl restart lprint.service" does not work.

I can't seem to find the lprint logs anywhere either, nor set the log level.

Would it be possible to create a .deb installation file for lprint and bypass "snapworld" altogether?

michaelrsweet commented 5 months ago

BTW is there any reason why the minimum MacOS version for a server was bumped to 13? This eliminates all mac hardware older than 2014.

I had to bump the minimum macOS version to 11.0 for the latest LPrint release due to some LibreSSL compatibility issues (new APIs in 11.0 and later but not in 10.14). You can build on 10.14 and earlier but I'd need to package that separately because of the API compatibility issues...

Also the snap version is a bit confusing as far as the docs vs operation.

/etc/lprint.conf does not seem to do anything for a snap based install.

Yeah, snaps aren't allowed to read arbitrary files in /etc - instead you need to locate the SNAP_COMMON directory (usually /var/snap/lprint/common) which is where lprint will look for the lprint.conf file.

You can also use "sudo snap set lprint OPTION=VALUE" to set specific options.

Similarly "systemctl restart lprint.service" does not work.

You need to use "sudo snap stop lprint.lprint-server" and "sudo snap start lprint.lprint-server" to restart the server. See the DOCUMENTATION.md file for details (near the end, or just search for snap commands...)

I can't seem to find the lprint logs anywhere either, nor set the log level.

Logs go to the system log by default for snaps.

Use the following to log to a file with the debug log level:

sudo snap set lprint log-file=/var/snap/lprint/common/lprint.log
sudo snap set lprint log-level=debug
sudo snap stop lprint.lprint-server
sudo snap start lprint.lprint-server

Would it be possible to create a .deb installation file for lprint and bypass "snapworld" altogether?

I'm not going down that path - I spent years trying to support LSB binaries so that code could run on multiple Linux distros, but LSB is dead and Debian/Ubuntu is one of the worst distros for binary compatibility. You can absolutely do your own source builds (I do that all the time on Ubuntu) but any binaries you make are tied to the release you are on...