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

Plugin does not provide configuration file in expected location #23

Open
ryu-ketsueki opened this issue Oct 25, 2021 · 20 comments
Open

Comments

@ryu-ketsueki
Copy link

The title above is an error given whenever I try to open the configuration dialog. It happens with Force Blur only. I was going to use it to blur Firefox as I got a CSS theme that has a transparent background

@chrollorifat
Copy link

@ryu-ketsueki you can try to follow the steps in this video if you want: https://youtu.be/Tn47ubqb6FE
hope it helps.

@ryu-ketsueki
Copy link
Author

ryu-ketsueki commented Oct 27, 2021

That is not my problem at all. This video does not cover this specific problem. There, the configuration dialog appears after doing the symlink but here with me, it gives the error on the title of this issue. It is probably expecting a dedicated configuration file instead of looking up on kwinrc. It could be because Plasma updated the way the scripts work so this means this script needs to be updated to use that new format of having a dedicated configuration file

@chrollorifat
Copy link

chrollorifat commented Oct 27, 2021

Oh...Would you please share your Firefox CSS with me?! I'd love to see if it works for me or not.

@ryu-ketsueki
Copy link
Author

Oh...Would you please share your Firefox CSS with me?! I'd love to see if it works for me or not.

I found out where the configuration for Force Blur is stored and added manually with Kate. It is working. But the problem remains the same. The configuration dialog doesn't work.

@arun54321
Copy link

Did you find a way to fix it?
image

@lucasrafael98
Copy link

Just for visibility, the config for Force Blur is in ~/.config/kwinrc. There should be something like

[Script-forceblur]
blurContent=true
patterns=yakuake\nurxvt\nkeepassxc\n

Assuming you need to add another program, add to the patterns, separating everything with a \n.

@EysseW
Copy link

EysseW commented Feb 11, 2022

I have got the same problem. The piece of text you mentioned doesn't show up in the kwinrc.

@lucasrafael98
Copy link

The script was already working on my machine before an update returned this error. I'd try adding those lines to the kwinrc and running kwin_x11 --replace to check that the script is loaded. The logs should have:

qml: FORCE-BLUR: starting the script
qml: ["yakuake","urxvt","keepassxc"]

Otherwise, not really aware of any fix for this. The last commit in this project was nearly two years ago, so I'm not sure if this will be fixed.

@EysseW
Copy link

EysseW commented Feb 12, 2022

I'll just use a WM :)

@ryu-ketsueki
Copy link
Author

I reported a bug directly to KDE some time ago and I got an answer. It would seem that with Kwin's migration to jsons for metadata, the .desktops got not only deprecated but also unsupported. Force Blur must move from using .desktop for metadata to json.

https://develop.kde.org/docs/extend/plasma/widget/setup/#metadatajson

@esjeon
Copy link
Owner

esjeon commented Feb 13, 2022

Hey, thanks for the heads up. I was kinda puzzled, as I could not reproduce at all, but I now get the same issue after updating KDE last night. This is a critical issue, so I'll look into it.

@esjeon
Copy link
Owner

esjeon commented Feb 13, 2022

It sounds like the source of the error message is here: https://invent.kde.org/plasma/kwin/-/blob/77ec43d5e15a8b8ad8e1824ebf49d7d3cbf015c5/src/scripting/genericscriptedconfig.cpp#L83

So KCM checks for two file: kconfigXTFile (= main.xml) and uiPath (= config.ui). Manually punching in the variables, I could verify that the files indeed exist. It's possible that something in the call stack set those variables wrong. I think I'll have to figure out how to debug KCM...

@esjeon
Copy link
Owner

esjeon commented Feb 13, 2022

Alright, I could run KWin script module independently using kcmshell5 kwinscripts, and got a very interesting warning message:

kf.kcmutils: "krohnkite.desktop" Querying the KCMs associated to a plugin using the X-KDE-ParentComponents is deprecated. Instead define the X-KDE-ConfigModule with the namespace and plugin filen name.

So, yeah, this script has X-KDE-ParentComponents=forceblur in the metadata.desktop, and KWin picked up appropriate config module for the plugin.
Now, this got deprecated by KWin (Related MR), and now plugins (effects, scripts) must designate its config module directly. Yeah, sounds better.

Anyway, I'll upload the fix soon.

esjeon added a commit that referenced this issue Feb 13, 2022
KCM complained when trying to open up the script config panel:

    Plugin does not provide configuration file in expected location

This was due to a behavior change in KWin when loading KCM modules for
plugins. We need to designate the related KCM module manually, using
`X-KDE-ConfigModule` field in metadata

Note that we're using `genericscripted` module, which generates config
dialog using `config.xml` and `config.ui`.
@esjeon esjeon closed this as completed Feb 13, 2022
@ghost
Copy link

ghost commented Feb 13, 2022

0.6 fixed configuration panel, but blur doesn't work.

@esjeon
Copy link
Owner

esjeon commented Feb 13, 2022

Yup you're right... The fix was fine, but an error was introduced while clearing up the metadata.desktop... Releasing again.

@leon-erd
Copy link

Unfortunately I still see "Plugin does not provide configuration file in expected location" even after some reinstalls of the script via the github code or directly via "Kwin Scripts" -> "Get New Scripts".
I also executed the two commands to enable script configuration.
Am I missing something?
My setup is:
Manjaro: Qonos 21.2.3
KDE Plasma: 5.23.5

@EysseW
Copy link

EysseW commented Feb 17, 2022 via email

@leon-erd
Copy link

Any help is appreciated! :)

@esjeon esjeon reopened this Feb 18, 2022
@esjeon
Copy link
Owner

esjeon commented Feb 18, 2022

@leon-erd I uploaded two different versions, because KWin 5.24.0 broke the compatibility (though it seems like they fixed it back in 5.24.1). If you're using 5.23, then please download v0.5. The other one (v0.6.1) is currently broken for KWin<5.24.0.

@leon-erd
Copy link

Thanks a lot! It does work now with the v0.5! :)
I actually tried that version before but then the configuration didn't show up even after executing the two commands from the readme so I thought that this version was broken and didn't test it further.
I figured out now that you have to reboot you PC after executing the two commands in order to get the configuration panel working. Maybe you can add this to the readme :)

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

No branches or pull requests

7 participants