Page MenuHome GnuPG

qt: Fix icon on wayland
ClosedPublic

Authored by TobiasFella on Jan 10 2024, 11:45 AM.

Details

Summary
  • qt/Makefile.am: Install desktop file.
  • qt/main.cpp: Set desktop file name.
  • qt/org.gnupg.pinentry.desktop: New. ---

T6887: pinentry-qt: Add desktop file for wayland icon

On wayland, window icons require a desktop file. To prevent pinentry from showing up as an application, it's marked with NoDisplay=true

Test Plan
  • Build, install (copy the desktop file to ~/.local/share/applications if required)
  • Run pinentry in some way
  • Check icons in taskmanager and window decoration

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

TobiasFella created this revision.

I was wondering whether "Exec=pinentry" should be "Exec=pinentry-qt" because "pinentry" could be a symlink to another pinentry. On the other hand, we probably want to use the same icon also for pinentry-gtk, etc.

I guess you have tested the Makefile.am changes.

Ship it!

This revision is now accepted and ready to land.Jan 10 2024, 2:19 PM

Use correct Exec; configure the file in order to get the correct prefix

I was wondering whether "Exec=pinentry" should be "Exec=pinentry-qt" because "pinentry" could be a symlink to another pinentry. On the other hand, we probably want to use the same icon also for pinentry-gtk, etc.

I guess you have tested the Makefile.am changes.

Ship it!

I initially assumed the Exec line to not be relevant, since pinentry is never going to be called via the desktop file. After spending the better part of yesterday trying to figure out why capslock checking on wayland doesn't work, i understood that the exec line is highly relevant and needs to be the exact, full path to the executable. (there's also another fix incoming for capslock detection)

pinentry-gtk etc presumably need similar treatment, so I'm not sure how much sense it makes to add org.gnupg.pinentry.desktop for pinentry-qt. Should this be org.gnupg.pinentry-qt.desktop instead? Or have one desktop file for all pinentries, which could be problematic for the Exec matching in KWin

pinentry-gtk etc presumably need similar treatment, so I'm not sure how much sense it makes to add org.gnupg.pinentry.desktop for pinentry-qt. Should this be org.gnupg.pinentry-qt.desktop instead? Or have one desktop file for all pinentries, which could be problematic for the Exec matching in KWin

Right. IMO renaming the desktop file to org.gnupg.pinentry-qt.desktop is easiest, so i've done that