[GH-ISSUE #1629] okular: printing is broken #1095

Closed
opened 2026-05-05 07:26:32 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @curiosity-seeker on GitHub (Nov 3, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1629

Whenever I try to print a document in Okular, I get the folllowing error:

Could not print the document. Detailed error is "Could not find a suitable binary for printing. Make sure CUPS lpr binary is available". Please report to bugs.kde.org

If I execute firejail --debug okular the output contains:

Checking /usr/local/bin/lpr
Checking /usr/bin/lpr
Checking /bin/lpr
Checking /usr/games/lpr
Checking /usr/local/games/lpr
Checking /usr/local/sbin/lpr
Checking /usr/sbin/lpr
Checking /sbin/lpr
Warning: file lpr not found

Huh? Strange!

Commenting the private-bin line in the profile solves the problem. But why can't lpr be found?

Originally created by @curiosity-seeker on GitHub (Nov 3, 2017). Original GitHub issue: https://github.com/netblue30/firejail/issues/1629 Whenever I try to print a document in Okular, I get the folllowing error: ``` Could not print the document. Detailed error is "Could not find a suitable binary for printing. Make sure CUPS lpr binary is available". Please report to bugs.kde.org ``` If I execute `firejail --debug okular` the output contains: ``` Checking /usr/local/bin/lpr Checking /usr/bin/lpr Checking /bin/lpr Checking /usr/games/lpr Checking /usr/local/games/lpr Checking /usr/local/sbin/lpr Checking /usr/sbin/lpr Checking /sbin/lpr Warning: file lpr not found ``` Huh? Strange! Commenting the `private-bin` line in the profile solves the problem. But why can't lpr be found?
gitea-mirror 2026-05-05 07:26:32 -06:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@smitsohu commented on GitHub (Nov 3, 2017):

Hi @curiosity-seeker, sorry for the trouble and thanks for reporting! The likely reason is that lpr for you is a symlink to /etc/alternatives/print, which is again a symlink to /usr/bin/lpr.cups. So adding 'alternatives' to the private-etc line and 'lpr.cups' to private-bin line should fix it.

<!-- gh-comment-id:341689966 --> @smitsohu commented on GitHub (Nov 3, 2017): Hi @curiosity-seeker, sorry for the trouble and thanks for reporting! The likely reason is that lpr for you is a symlink to /etc/alternatives/print, which is again a symlink to /usr/bin/lpr.cups. So adding 'alternatives' to the `private-etc` line and 'lpr.cups' to `private-bin` line should fix it.
Author
Owner

@curiosity-seeker commented on GitHub (Nov 3, 2017):

Yes, indeed, that fixes the issue! Thank you very much for the quick solution!

EDIT: Adding 'alternatives' to private-etc and keeping 'lpr' in private-bin is sufficient.

<!-- gh-comment-id:341692411 --> @curiosity-seeker commented on GitHub (Nov 3, 2017): Yes, indeed, that fixes the issue! Thank you very much for the quick solution! EDIT: Adding 'alternatives' to `private-etc` and keeping 'lpr' in `private-bin` is sufficient.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1095
No description provided.