Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 Printer #68

Open
va7ru opened this issue May 31, 2020 · 8 comments
Open

Ubuntu 20.04 Printer #68

va7ru opened this issue May 31, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@va7ru
Copy link

va7ru commented May 31, 2020

I was able to Duplicate the issue on 2 different systems and 1 VM all running Ubuntu 20.04. I am able to send a fax direct from the App. When I use the printer it fails. There is no system dialog that pops up and asks for Fax number etc.

@felixmartens
Copy link

Same problem here. Ubuntu 20.04, sending from yajhfc app manually works, but using the printer-driver does not open the sending dialog.

/var/log/cups/access_log (Just the part for yajhfc)
localhost - - [04/Jun/2020:12:32:46 +0200] "POST /printers/yajhfc HTTP/1.1" 200 223 Create-Job successful-ok localhost - - [04/Jun/2020:12:32:46 +0200] "POST /printers/yajhfc HTTP/1.1" 200 109626 Send-Document successful-ok
/var/log/cups/error_log
E [04/Jun/2020:12:32:46 +0200] [Job 229] cat error (RC=1): E [04/Jun/2020:12:32:47 +0200] [Job 229] Job held for 300 seconds since it could not be sent. E [04/Jun/2020:12:37:48 +0200] [Job 229] cat error (RC=1): E [04/Jun/2020:12:37:48 +0200] [Job 229] Job held for 300 seconds since it could not be sent.

@jwolz jwolz self-assigned this Jun 8, 2020
@jwolz jwolz added the bug Something isn't working label Jun 8, 2020
@jwolz
Copy link
Owner

jwolz commented Jun 8, 2020

I have now installed Ubuntu 20.04 in a virtual machine and can confirm this problem.

The CUPS backend itself seems to work and the named pipe (/var/spool/yajhfc/printer-$USER) seems to work, too.
(The Linux fax printer works like this: YajHFC opens a named pipe called /var/spool/yajhfc/printer-$USER and the CUPS backend script basically just does a cat of the printed data to that pipe -- this is why you get the message "cat error (RC=1)")

However the backend seems to be unable to write to the named pipe.
I don't know why so far (probably some security related change in Ubuntu/systemd/CUPS). I will have to investigate this further when I have more time

@jwolz
Copy link
Owner

jwolz commented Jun 12, 2020

I finally found the reason for the problem:
It is indeed a new security feature, see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1875225

Could you try if "sudo sysctl fs.protected_fifos=0" and then trying to print does fix this issue for you?

To make it a permanent workaround, you can create a file under /etc/sysctl.d as described in the linked bug report.

I will still have to find a way to make it work without changing this setting.

@felixmartens
Copy link

I confirm that this solves the problem. Great support!

@va7ru
Copy link
Author

va7ru commented Jun 12, 2020

I too can confirm that this resolves the issue. Thanks So Much for your Great support.

@jwolz
Copy link
Owner

jwolz commented Jun 13, 2020

I think I have found a solution so that it works with the default setting of fs.protected_fifos=1 (at least it does in my VM).

Could you try if replacing /usr/lib/cups/backend/yajhfc with the file in the attached archive fixes the issue?

yajhfc-cups-backend.zip

jwolz added a commit to jwolz/yajhfc-extra that referenced this issue Jun 13, 2020
@felixmartens
Copy link

It seems to work if the right permissions for the binary are set. Will test it on another system during the day.
Thanks for your quick support.

@jwolz
Copy link
Owner

jwolz commented Jun 18, 2020

Thanks for the feedback!

You can now also find new packages including the updated script at: https://download.yajhfc.de/betas/deb-repository/stable/deb-all/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants