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

Don't use PID in per-process D-Bus name (fixes #36, #374) #375

Closed
wants to merge 1 commit into from

Conversation

nihil-admirari
Copy link
Contributor

  1. Use UUID instead of PID for per-process D-Bus name, see Flathub's Okular should use non-PID identifier on D-Bus or share a PID namespace for all instances #374 for details.
  2. Per-process D-Bus was renamed to align with D-Bus naming conventions and to allow the use of D-Bus without granting blanket session D-Bus permission.

Probably makes sense to try to upstream the patch. Also, if I'm not mistaken, Qt printing does use XDG portals, which means that CUPS permission is probably unnecessary. May be someone can check whether it prints without --socket=cups?

@flathubbot
Copy link
Contributor

Started test build 154728

@flathubbot
Copy link
Contributor

Build 154728 successful
To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/137816/org.kde.okular.flatpakref

@travier
Copy link
Member

travier commented Oct 16, 2024

While submitting the patch here is fine for testing, we don't carry Flathub specific patches for KDE Apps so you will have to submit the patch for review at https://invent.kde.org/graphics/okular as well and to get it merged there first.

@travier
Copy link
Member

travier commented Oct 16, 2024

Thanks for the patch. Can you split the finish-args changes into another PR? We should be able to merge those sooner. Thanks

@tsdgeos
Copy link
Collaborator

tsdgeos commented Oct 16, 2024

May be someone can check whether it prints without --socket=cups?

How would it print without access to the printing system?

@Erick555
Copy link
Contributor

Erick555 commented Oct 16, 2024

OP is referring to printing portal. You may see that similar app from gnome doesn't have cups permission. I don't know whether it works in okular.

@tsdgeos
Copy link
Collaborator

tsdgeos commented Oct 16, 2024

Okular does not use the printing portal.

@nihil-admirari
Copy link
Contributor Author

we don't carry Flathub specific patches for KDE Apps so you will have to submit the patch for review at https://invent.kde.org/graphics/okular as well and to get it merged there first

https://invent.kde.org/graphics/okular/-/merge_requests/1061

Can you split the finish-args changes into another PR?

#378

Okular does not use the printing portal.

Okular uses standard Qt printing facilities if I'm not mistaken. I've no idea whether Qt supports the printing portal or not. File opening through portals is transparent after all.

@tsdgeos
Copy link
Collaborator

tsdgeos commented Oct 18, 2024

Okular uses standard Qt printing facilities if I'm not mistaken

You are mistaken.

@nihil-admirari
Copy link
Contributor Author

Haven't done an analysis more comprehensive than a simple grep, but it does show the use of QPrintDialog, QPrinter and other Qt classes.

Out of curiosity, if Qt is not used, how does Okular print at all? Especially on Windows, which has no CUPS.

@nihil-admirari
Copy link
Contributor Author

OK, it paints onto QPrinter on Windows and on Linux it calls lpr.

@Erick555
Copy link
Contributor

Erick555 commented Oct 19, 2024

You may propose changing that. This implementation is from 16 years ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants