Need help patching cinnamon-setting to use YaST settings (issue with xdg-su)

Hello,

I was trying to update Cinnamon package for openSUSE Tumbleweed.
https://build.opensuse.org/package/show/home:andythe_great:branches:X11:Cinnamon:Factory/cinnamon

Cinnamon have cinnamon-settings which you can change basic settings like Bluetooth, printer, etc.
But we will instead redirect cinnamon settings to YaST settings instead.

For example, printer settings, we have YaST printer which I have to patch the file,
https://github.com/linuxmint/cinnamon/blob/master/files/usr/share/cinnamon/cinnamon-settings/cinnamon-settings.py

[_("Printers"),                      "system-config-printer",                "cs-printer",            "hardware",       _("printers, laser,  inkjet")],

which becomes as such.

    [_("Printers"),                      "xdg-su -c '/sbin/yast2  printer'",          "cs-printer",            "hardware",        _("printers, laser, inkjet")],

with the patch cinnamon-settings-native.patch.
However, when clicking on printer setting in cinnamon-settings, the error occurred.

kev@linux:~> cinnamon-settings
Using pam module (python3-pampy)
xdg-su: unexpected argument 'printer''
Try 'xdg-su --help' for more information.

This suggest that the single quote was ignored somehow which become something like

xdg-su -c /sbin/yast2 printer

which xdg-su does not understand.

I also report an issue to Mint here.
https://github.com/linuxmint/cinnamon/issues/9590

I not sure what is going on with xdg-su or how cinnamon setting see single quote.

Thank you.

Thsese Technical Help Forums are mostly frequented by Users…

If you have a Development question, it’s best asked in the Development forums…
If you can locate the specific OBS project for the package you’re working on, I’d suggest trying to get in touch with other maintainers of that package and/or posting in the OBS Forum, otherwise the "“Programming/Scripting” Forum is more or less a catch-all for whatever doesn’t fit the other forums.

https://forums.opensuse.org/forumdisplay.php/797-Development

You can ask for someone to move this thread to one of those forums if it’s not moved by an Admin already.

TSU

Hi
Rather than single quotes, try double ones?


"xdg-su -c \"/sbin/yast2  printer\""