Closed ferki closed 1 year ago
Hi! Thanks for opening this issue, and great catch! Are you willing to open a PR to fix the issue?
Are you willing to open a PR to fix the issue?
In general, yes, but I have no idea which way of solving this would be ideal or preferred, so I'd need guidance – especially given that I don't use this part of clight at all, so I'm also not sure how to test :)
The few ideas that go through my mind at first glance:
SetTemp
instead of having to call both DayTemp
and NightTemp
?SetTemp
above?Given the exec spec, i'd say this should work:
sh -c "busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma DayTemp "i" 0 && busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma NightTemp "i" 0"
With this patch, desktop-file-validate
does not complain anymore and the desktop file works fine ;)
I will push the change!
Oh, yeah, that might work too, thanks! :)
I can confirm that desktop-file-validate
is not complaining anymore :+1:
I wonder whether sh
gets confused by all the double quotes in there or not, though.
I tested and it worked for me :)
Clight version the issue has been seen with:
4.9
Used distribution:
Gentoo
Describe the bug
Part of the installation process on Gentoo is to run
.desktop
files through QA checks, and it complains about validation errors (as reported via ferki/gentoo-overlay#3; see relevant build.log entries).Running the failing desktop file through
desktop-file-validate
explains the error as:which is also potentially a bug, since the
Exec
key might not be able to run both specified commands as expected.See also:
Exec
key specificationfull validation output
```bash $ desktop-file-validate /usr/share/applications/clightc.desktop /usr/share/applications/clightc.desktop: error: value "busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma DayTemp "i" 0 && busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma NightTemp "i" 0" for key "Exec" in group "Desktop Action ForceGamma" contains a reserved character '&' outside of a quote /usr/share/applications/clightc.desktop: error: value "busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma DayTemp "i" 0 && busctl --expect-reply=false --user set-property org.clight.clight /org/clight/clight/Conf/Gamma org.clight.clight.Conf.Gamma NightTemp "i" 0" for key "Exec" in group "Desktop Action ForceGamma" contains a reserved character '&' outside of a quote ```Expected behavior
Desktop files installed by clight must be valid.
To Reproduce
Run
desktop-file-validate Extra/desktop/clightc.desktop
in a cloned git repo.Not attaching a Clight verbose log, as it seems irrelevant for this bug. Let me know if you still need those details.