openprinting / ghostscript-printer-app Goto Github PK
View Code? Open in Web Editor NEWGhostscript Printer Application
License: Apache License 2.0
Ghostscript Printer Application
License: Apache License 2.0
When using authselect on Fedora, the file /etc/nsswitch is a symbolic link to /etc/authselect/nsswitch.conf. When starting the printer app you get this status
× snap.ghostscript-printer-app.ghostscript-printer-app-server.service - Service for snap application ghostscript-printer-app.ghostscript-printer-app-server
Loaded: loaded (/etc/systemd/system/snap.ghostscript-printer-app.ghostscript-printer-app-server.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/snap.ghostscript-printer-app.ghostscript-printer-app-server.service.d
└─override.conf
Active: failed (Result: exit-code) since Wed 2021-11-17 07:28:07 CET; 21s ago
Process: 1368 ExecStart=/usr/bin/snap run ghostscript-printer-app.ghostscript-printer-app-server (code=exited, status=1/FAILURE)
Main PID: 1368 (code=exited, status=1/FAILURE)
CPU: 117ms
Nov 17 07:28:07 mybox systemd[1]: snap.ghostscript-printer-app.ghostscript-printer-app-server.service: Scheduled restart job, restart counter is at 5.
Nov 17 07:28:07 mybox systemd[1]: Stopped Service for snap application ghostscript-printer-app.ghostscript-printer-app-server.
Nov 17 07:28:07 mybox systemd[1]: snap.ghostscript-printer-app.ghostscript-printer-app-server.service: Start request repeated too quickly.
Nov 17 07:28:07 mybox systemd[1]: snap.ghostscript-printer-app.ghostscript-printer-app-server.service: Failed with result 'exit-code'.
Nov 17 07:28:07 mybox systemd[1]: Failed to start Service for snap application ghostscript-printer-app.ghostscript-printer-app-server.
After removing the symbolic link and copying the file /etc/authselect/nsswitch.conf to /etc/nsswitch.conf, the printer app can start normally.
--
Villy
Architecture: arm64
Computer: Orange Pi Zero 2
OS: Ubuntu 22.04 LTS
App: Ghostscript Printer app installed via Snap Edge
The Snap --edge version of the App keeps deleting printer. I can add a new printer and use it, but after the reboot of computer, this printer is not available. I have to add a printer once again, and again. It showed up after last update from 5th Sept. I switched to Stable version and everything is working fine.
Hi,
I gave this and the gutenprint printer app a try using the distributed snap. I couldn't get either to work; Apparmor kept blocking it.
Here's the log output:
Dec 31 19:20:25 audit[3020]: AVC apparmor="DENIED" operation="open" class="file" profile="firefox" name="/proc/29423/oom_score_adj" pid=3020 comm="firefox" requested_mask="w" denied_mask="w" fsuid=1000 ouid=1000
Dec 31 19:20:25 kernel: audit: type=1400 audit(1704068425.420:1673): apparmor="DENIED" operation="open" class="file" profile="firefox" name="/proc/29423/oom_score_adj" pid=3020 comm="firefox" requested_mask="w" denied_mask="w" fsuid=1000 ouid=1000
What's the best procedure to work around this issue?
Thanks!
Good day
Scenario:
Family business migrated to a new ERP system over the last 12 months. It is now 3 weeks before 1st March 2024 "Go Live", and the ERP Vendor/ consultants only tell us now that Dot Matrix printers are not supported by their ERP software. We run +- 8 dot matrix printers for the warehouse, and bought 3 new ones just 2 months ago. The are not cheap. We also bought boxes full of per-printed (Stationary) banner paper.
The Epson FX890II /N, Dot matrix printers are USB based and connected to Windows 10 LTSC / Windows 11 machines. New ones are also network-capable.
Outcome:
Will this software allow me to print to a 'fake' printer (or file). And then allow it to be converted to a banner style paper for a dot matrix?
Flow
ERP Software >> Windows/linux based computer running VirtualPrinter/File(Ghost) >> Convert >> Dot Matrix
means a option in Makefile such --without-systemd
will be awesome ...
I am able to add the printer but there is no specific driver for this model (QL-700) so I can pick the QL-800 or QL-650. Both options fail anyway when I try to send a printing job to the printer.
The error is seen on the printer itself (blinking red LED) but the logs of ghostscript-printer-app
don't say much.
Trying to use CUPS (no ghostscript-printer-app) to install the printer with the PPD file provided by Brother for the QL-700 works fine. But it fails as soon as I send any printing job. Although I'm getting more info from /var/log/cups/error_log
:
W [29/Dec/2022:21:47:51 +0100] [Job 120] Grayscale/monochrome printing requested for this job but Poppler is not able to convert to grayscale/monochrome PostScript.
W [29/Dec/2022:21:47:51 +0100] [Job 120] Use \"pdftops-renderer\" option (see cups-filters README file) to use Ghostscript or MuPDF for the PDF -> PostScript conversion.
I tried every option below as well:
$ lpadmin -p QL-700 -o pdftops-renderer-default=pdftops
$ lpadmin -p QL-700 -o pdftops-renderer-default=mupdf
$ lpadmin -p QL-700 -o pdftops-renderer-default=hybrid
$ lpadmin -p QL-700 -o pdftops-renderer-default=pdftocairo
$ lpadmin -p QL-700 -o pdftops-renderer-default=acroread
with no success for any of them.
I also followed the development in this thread regarding a possible bug between the Brother driver and cups-filters
, but that didn't help as I am not able to downgrade cups-filters
on my machine.
I am running Ubuntu 22.04, CUPS 2.4.1 and ghostscript-printer-app 1.0.
I should finally mention that this particular printer with the exact same driver used to work just fine before a system upgrade. If only I could downgrade CUPS, I've got the feeling it could solve the problem.
When I print, I always get the printer output set back to "Letter" size. Correct size would be A4. Then the print job stops with an error code, and I need to unlock the printer manually by erasing the print job.
Setup:
Ghostscript Version 10.03.0-3 installed through Snap on a Raspberry Pi4B/4GB, running RaspianOS Bookworm. All updated.
CUPS 2.4.2 installed on the Raspi.
Dell 1355cnw printer as network printer installed
Printer settings in CUPS:
Beschreibung: Dell_MuFu
Ort: HomeOffice
Treiber: Dell 1355 Foomatic/foo2hbpl2 (recommended), driverless, cups-filters 1.28.17 (farbig, 2-seitiges Drucken)
Verbindung: implicitclass://Dell_MuFu/
Standardeinstellungen: job-sheets=none, none media=iso_a4_210x297mm sides=one-sided
Printer settings in Ghostscript:
Medien: A4 ( Plain ) Medien konfigurieren
Orientierung: Portrait Landscape Reverse Landscape Reverse Portrait Auto
Druckmodus: Automatisch Farbe Monochrom
Druckqualität: Draft Normal High
Optimieren für:
Skalierung:
Druckauflösung: 300 dpi
printing-quality:
color-mode:
halftone-algorithm:
icm-color-profile:
n-up-orientation:
n-up-printing:
Printer Tray settings:
MPF Paper Type | Plain
MPF Paper Size | A4 (210 x 297 mm)
MPF Custom Size - Y | 297 millimeters
MPF Custom Size - X | 210 millimeters
Display Popup | On
This are the start settings. Whenever I print (paper size set to A4 in the print dialogue of the app), the printer claims it has "Letter" instead of A4 paper format.
Furthermore the Tray settings of the printer are set back to "Letter". The printer is not touched by anything, beside the print job being send to the printer.
This happens no matter if printing through AirPrint from an iPhone, or by Ethernet from a Mac (both on the current OS versions). But it already happens when I send a test page from the Ghostscript web server site.
In addition the margins of the page are set to zero: It starts printing right on top of the page, and has no left margin.
I have no idea why the settings are changed to US Letter size by itself - I am located in Germany and never use US letter.
Picture of Test page
snap is creating this line in the systemd service file
TimeoutStopSec=30
As pappl applications in some case have a shutdown delay of 60 seconds, systemd will kill the applicates with SIGKILL preventing it from doing a proper shutdown. The status files can then be left in an inconsistent state or temporary files not deleted.
In snapcraft.yaml it is possible to set a stop timeout or even a stop command.
apps.
<app-name>.
stop-command
The path to a command inside the snap to run to stop the service.
Type: string
Requires daemon to be set in app metadata.
apps.
<app-name>.
stop-timeout
The length of time to wait before terminating a service.
Type: string
Time duration units can be 10ns, 10us, 10ms, 10s, 10m. Termination
is via SIGTERM (and SIGKILL if that doesn’t work).
Requires daemon to be set in the app metadata.
If it works, I don't know, it if it works it should be set to somewhat longer that 60 seconds, or perhaps 90 seconds which is the default timeout systemd is using if nothing else is specified.
The application only advertises itself, but no printers (added after working around #1 with --devmode), so CUPS on another system does not see the printer.
+ enp0s31f6 IPv6 Ghostscript Printer Application Web Site local
+ enp0s31f6 IPv4 Ghostscript Printer Application Web Site local
+ wlp61s0 IPv6 Ghostscript Printer Application Web Site local
+ wlp61s0 IPv6 PostScript Printer Application Web Site local
+ wlp61s0 IPv4 Ghostscript Printer Application Web Site local
+ enp0s31f6 IPv6 Ghostscript Printer Application _ipps-system._tcp local
+ enp0s31f6 IPv4 Ghostscript Printer Application _ipps-system._tcp local
+ wlp61s0 IPv6 Ghostscript Printer Application _ipps-system._tcp local
+ wlp61s0 IPv6 PostScript Printer Application _ipps-system._tcp local
+ wlp61s0 IPv4 Ghostscript Printer Application _ipps-system._tcp local
Running on focal, USB devices are not discovered due to AppArmor denial. Works in devmode. Despite being connected to raw-usb?
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:150): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:151): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:152): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:153): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:154): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:155): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:156): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/speed" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:157): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/descriptors" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:158): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/busnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Oct 18 09:48:23 iot-gateway kernel: audit: type=1400 audit(1634550503.119:159): apparmor="ALLOWED" operation="open" profile="snap.ghostscript-printer-app.ghostscript-printer-app-server" name="/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4/devnum" pid=96311 comm="usb" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.