Bug 27183 - Default Mageia spectacle integration settings missing in plasma5 systemsettings
Summary: Default Mageia spectacle integration settings missing in plasma5 systemsettings
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: Mageia 8
Assignee: KDE maintainers
QA Contact:
URL:
Whiteboard:
Keywords: 8rc1, IN_ERRATA8, Triaged
Depends on:
Blocks:
 
Reported: 2020-08-23 13:44 CEST by Barry Jackson
Modified: 2021-02-22 18:58 CET (History)
4 users (show)

See Also:
Source RPM: spectacle-20.12.0-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Barry Jackson 2020-08-23 13:44:51 CEST
Description of problem:
As summary.
Since plasma-workspace-5.19.4 update (I think).

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
Comment 1 Aurelien Oudelet 2020-08-23 13:53:37 CEST
Sorry, seems to work for me on Plasma 5.19.4 and latest spectacle 20.08 from recent update.

Go to Systemsetting5 => Shortcuts => Global Shortcuts and see spectacle in right panel. Correct and default key is Print... So worksome?

Also, does your keyboard correctly configured in Systemsettings5 => Input devices => Keyboard ?

CC: (none) => ouaurelien

Comment 2 Barry Jackson 2020-08-23 14:03:48 CEST
OK, so yes it is configurable, but why has the update lost or not set the default configuration that we have always had in Mageia?

We always get to this stage in the release cycle where Cauldron has been stable for months, and then things start to break! ;)

Summary: Since plasma5 update spectacle screen grab no longer triggered by Prt_Sc key => Default Mageia spectacle integration settings missing in plasma5 systemsettings

Comment 3 Aurelien Oudelet 2020-08-23 14:12:20 CEST
@Barry,

But I have Cauldron installed since Mageia 8 Beta 1 and first thing I tried when reading your report is to press "Print" to see if on my side everything runs well.  And it runs well...

Sometimes, an other program claims similar shortcut... Is your system Plasma only or there is Gnome or an other DE?
Comment 4 Barry Jackson 2020-08-23 14:40:10 CEST
@Aurelien
I only have plasma installed as major DE, certainly no Gnome.

It has been working fine with no user configuration in Cauldron, and I have been using Cauldron plasma5 as my main production system for pretty much the whole cycle except the very start.

I use screen grab quite regularly and have never ever in any release since Mga1 ever had to configure this manually. I was not even aware of where this was set.

Something has changed.

I will check in a different user.
Comment 5 Barry Jackson 2020-08-23 14:49:18 CEST
In my clean test user there is no longer any default shortcut set for spectacle.
Comment 6 Aurelien Oudelet 2020-08-23 15:29:18 CEST
Hi, thanks for reporting this bug.
Assigned to the package maintainer.

(Please set the status to 'assigned' if you are working on it)

Assignee: bugsquad => kde
Keywords: (none) => 8beta1, Triaged

Aurelien Oudelet 2020-09-07 22:07:03 CEST

Target Milestone: --- => Mageia 8

Comment 7 Thomas Andrews 2021-01-15 16:59:45 CET
Confirming this bug is still valid as of the RC test isos dated 2021/01/13. On a clean install, the default keyboard shortcuts for Spectacle are shown in systemsettings as disabled. If you click on the box to enable, you see a message like this:

Shortcut Print is already assigned to action 'Start Screenshot Tool' of Custom Shortcuts Service. Do you want to reassign it? 

Answering yes and going through the process still results in the shortcut not working.

CC: (none) => andrewsfarm

Comment 8 Nicolas Lécureuil 2021-01-15 20:20:54 CET
ok i will an "clean RC" to check and see how  to fix this.

CC: (none) => mageia

Comment 9 Thomas Andrews 2021-01-15 22:51:33 CET
This latest "clean" install did retain the /home from the previous install. The history was this:

1) Mageia 7 Plasma install
2) Upgrade install to Cauldron using netinstall, shortly before the first round of RC isos came out. I don't recall using Spectacle with that install.
3) After about two weeks, a "Clean" install from the Round 2 RC CI, retaining /home.
Comment 10 Morgan Leijström 2021-02-05 14:18:25 CET
What is the status of this for latest RC?

What to write in errata?
Live Plasma, and classic Plasma install, do not have screensaver shortcut configured?

CC: (none) => fri

Comment 11 Aurelien Oudelet 2021-02-05 14:38:49 CET
Press "Print Screen" key triggers well Spectacle on a M8 Plasma freshly installed from RC1 Take 5 internal ISO, with not retaining a /home, so purely default settings.

I tend to close this fixed/invalid... as I did not see any fixes upstream since August on it...
Comment 12 Thomas Andrews 2021-02-05 20:19:59 CET
I can confirm that the system described in Comment 7 and Comment 9 is still not working with the retained /home from the initial M7 upgrade. But, when I create a new user on that same system, Print Screen does indeed work.

So, apparently, it is an upgrade issue, or an issue with retaining /home. But which is it? If an issue with retaining /home, it would be nice if there was a way to address it other than creating a completely new /home.
Comment 13 Morgan Leijström 2021-02-05 20:23:36 CET
To be put in Plasma section in release notes.
At least i set that flag for now.

Keywords: (none) => FOR_RELEASENOTES8

Comment 14 Thomas Andrews 2021-02-06 15:35:36 CET
Definitely not an "invalid" bug. 

I have two other affected systems, on two very different sets of hardware. One may have been upgraded originally, but it's been so long that I don't recall now. The other is more recent, and I don't think it was an upgrade install, simply a clean install while retaining /home. I do so many installs that it's sometimes difficult to keep track of what I did where. I really should write these things down somewhere...

I suspect that the friendly folks at KDE have changed one of the config files in some sort of subtle fashion, but we don't during the install if /home is retained.

If that is the case, I would think it would be something that we could fix with an update soon after the release. I don't think it's serious enough to be a release blocker.

I could compare the config file for MR Clunky, my new user, with that of Tom, my long-trusted friend, if only I knew which file I should look at...
Comment 15 Aurelien Oudelet 2021-02-06 16:07:42 CET
This is because Plasma 5 store default AND user's shortcut keys in dfferent files in user's directory. The following files store the keyboard shortcuts of KDE Plasma 5 and of some of its associated applications such as Konsole and KWrite.

~/.config/kdeglobals
~/.config/kglobalshortcutsrc
~/.config/khotkeysrc
~/.config/kwinrc
~/.config/plasma-org.kde.plasma.desktop-appletsrc

Let me add descriptions for the files.

Standard Shortcuts (System Settings > Shortcuts)
~/.config/kdeglobals

Global Shortcuts (System Settings > Shortcuts)
~/.config/kglobalshortcutsrc

"Custom Shortcuts" (System Settings > Shortcuts)
~/.config/khotkeysrc

Among "Global Shortcuts", "Plasma > Activate Application Launcher Widget" is also stored in
~/.config/plasma-org.kde.plasma.desktop-appletsrc
in addition to the common
~/.config/kglobalshortcutsrc

This is because "Activate Application Launcher Widget" can be also set by
Right-click "Application Launcher" > Application Launcher Settings... > Keyboard Shortcuts...........

And, Spectacle's shortcuts are set in ~/.config/kglobalshortcutsrc
where you will find this part:

[org.kde.spectacle.desktop]
ActiveWindowScreenShot=Meta+Print,Meta+Print,Capturer la fenêtre active
CurrentMonitorScreenShot=,none,Capturer le moniteur actuel
FullScreenScreenShot=Shift+Print,Shift+Print,Capturer le bureau entier
RectangularRegionScreenShot=Meta+Shift+Print,Meta+Shift+Print,Capturer une région rectangulaire
_k_friendly_name=Spectacle
_launch=Print,Print,Lancer Spectacle

(Note that action here are "translated" to be visible in the Systemsettings > Shortcuts KCM Panel).

This is why NEWER fresh installation does not trigger the issue.

Retaining /home/username/ folder to new installation can lead to problematic issue.
Plasma's Spectacle application was written/released with Spectacle name in 2015-12-01, it was the KScreenGenie tool name before.


To look forward the issue here, an update to a package can't write to user's directory. This is not our policy, nor the scope of RPM files. Therefore, we could make a statement to ERRATA that after migrating an existing installation, an user must to look in Systemsetting > Shortcuts to correctly bind the "Print Screen" key to Spectacle Application.

So clearly this is a silly BUG for me.

Source RPM: spectacle-20.08.0-1.mga8 => spectacle-20.12.0-1.mga8.src.rpm

Comment 16 Morgan Leijström 2021-02-06 16:12:59 CET
Thanks for the investigation :)

(In reply to Aurelien Oudelet from comment #15)
> could make a statement to ERRATA that after migrating an existing
> installation, an user must to look in Systemsetting > Shortcuts to correctly
> bind the "Print Screen" key to Spectacle Application.

But per comment 7 that does not work?
Comment 17 Aurelien Oudelet 2021-02-06 16:16:21 CET
This is why I look for upstream diff/change between Mageia 7's Spectacle 19.04 shipped version to Spectacle 20.12.0 in Mageia 8...
Comment 18 Aurelien Oudelet 2021-02-06 16:28:07 CET
Yeah, change between Mageia 7 and Mageia 8:
From Spectacle 19.04 to Spectacle 20.12.0, there is this upstream commit that 

"Port to KGlobalAccel

Summary:
Port to KGlobalAccel. This enables us to drop khotkeys and display a configuration
dialog inside the application. The update script correctly sets the defaults and migrates
possibly user changed shortcuts. I didn't know where to place the KActionCollection
and put it in SpectacleConfig for the moment.

FEATURE: 388592
FIXED-IN: 19.08.0

Test Plan: Shortcuts should work as before."

https://github.com/KDE/spectacle/commit/1d568009f73f3b63363511eddded623f16be86bb

Something goes wrong in user directory that settings seems to not be migrated to new shortcuts mechanism.
Ping neoclust on IRC.
Comment 19 Thomas Andrews 2021-02-06 18:05:59 CET
Thanhk you for continuing to investigate this. Maybe we can still do something about it.

BTW, I've had Plasma updates change my settings several times over the years, usually in a much smaller, less disruptive way than this one. Usually, what is done is that my custom settings are changed back to the defaults, and all that needs to be done is to change them back. That doesn't work this time.

While *we* don't change user settings, I fear the friendly folks at KDE may not always adhere to the same policy.
Comment 20 Aurelien Oudelet 2021-02-06 18:10:16 CET
Yeah, that's why I pinpoint the above upstream commit that add a migration tool. Is it implemented by us? I wonder if so.
I did not look at this time our packages. I leave this for our packagers.
Comment 21 Thomas Andrews 2021-02-06 20:36:45 CET
If it is something like that, it would be much better if it were fixed before the release. Moving the priority up a notch.

Priority: Normal => High

Comment 22 Nicolas Lécureuil 2021-02-06 23:24:51 CET
(In reply to Aurelien Oudelet from comment #18)
> Yeah, change between Mageia 7 and Mageia 8:
> From Spectacle 19.04 to Spectacle 20.12.0, there is this upstream commit
> that 
> 
> "Port to KGlobalAccel
> 
> Summary:
> Port to KGlobalAccel. This enables us to drop khotkeys and display a
> configuration
> dialog inside the application. The update script correctly sets the defaults
> and migrates
> possibly user changed shortcuts. I didn't know where to place the
> KActionCollection
> and put it in SpectacleConfig for the moment.
> 
> FEATURE: 388592
> FIXED-IN: 19.08.0
> 
> Test Plan: Shortcuts should work as before."
> 
> https://github.com/KDE/spectacle/commit/
> 1d568009f73f3b63363511eddded623f16be86bb
> 
> Something goes wrong in user directory that settings seems to not be
> migrated to new shortcuts mechanism.
> Ping neoclust on IRC.


we already have this commit in cauldron.
Comment 23 Aurelien Oudelet 2021-02-06 23:34:32 CET
(In reply to Nicolas Lécureuil from comment #22)
> 
> we already have this commit in cauldron.

Yeah, but this doesn't explain why settings are not migrated to new location.
Will test this next days.
Comment 24 Morgan Leijström 2021-02-10 20:31:42 CET
Added a link in errata to here.

Keywords: 8beta1, FOR_RELEASENOTES8 => 8rc1, IN_ERRATA8

Comment 25 Morgan Leijström 2021-02-22 18:58:36 CET
Any news to add to Errata?

Note You need to log in before you can comment on or make changes to this bug.