https://bugs.kde.org/show_bug.cgi?id=524386

            Bug ID: 524386
           Summary: kglobalshortcutsrc gets 2-line churn at every
                    login/logout for Spectacle actions lacking
                    X-KDE-Shortcuts
    Classification: Applications
           Product: Spectacle
      Version First 6.7.4
       Reported In:
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: General
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
  Target Milestone: ---

DESCRIPTION
The [services][org.kde.spectacle.desktop] section of
~/.config/kglobalshortcutsrc is rewritten twice per session, and the two writes
disagree: two entries are present after login but dropped by the next rewrite,
so they disappear and reappear at every login/logout.

STEPS TO REPRODUCE
1. Log into Plasma, check the [services][org.kde.spectacle.desktop] section of
~/.config/kglobalshortcutsrc.
2. Reboot.
3. Check again.

OBSERVED RESULT
After login the section contains 10 entries:

[services][org.kde.spectacle.desktop]
ActiveWindowScreenShot=none
CurrentMonitorScreenShot=none
FullScreenScreenShot=none
OpenWithoutScreenshot=none
RecordRegion=none
RecordScreen=none
RecordWindow=none
RectangularRegionScreenShot=none
WindowUnderCursorScreenShot=none
_launch=Print

After reboot the same section contains only 8 entries - exactly these two are
gone:

  CurrentMonitorScreenShot=none
  OpenWithoutScreenshot=none

and they come back at the next login, forever.

EXPECTED RESULT
The file should converge to a stable state.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 6.7.4
KDE Frameworks Version: 6.28.0
Qt Version: 6.11.1

ADDITIONAL INFORMATION
/usr/share/applications/org.kde.spectacle.desktop declares 9 desktop actions;
exactly these two have no X-KDE-Shortcuts= line, the other 7 all do (and their
entries are stable):

  [Desktop Action CurrentMonitorScreenShot]
  Exec=/usr/bin/spectacle -m

  [Desktop Action OpenWithoutScreenshot]
  Exec=/usr/bin/spectacle -l

So the two kglobalshortcutsrc write paths appear to disagree on whether actions
without an X-KDE-Shortcuts declaration belong in the [services] section:

- At session start, all 9 actions are registered. DBus confirms:

  gdbus call --session --dest org.kde.kglobalaccel --object-path /kglobalaccel
\
    --method org.kde.KGlobalAccel.allActionsForComponent
"['org.kde.spectacle.desktop','']"

  returns 10 actions including CurrentMonitorScreenShot and
OpenWithoutScreenshot, and the two entries get written to the file.

- At logout/cleanup, only actions with an X-KDE-Shortcuts declaration survive
the rewrite, so the two entries are removed from the file.

The bug is cosmetic (both entries are "none"), but it causes permanent config
churn for anyone tracking ~/.config in a git repo.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to