Bug 404943 - SDDM background image fail if file path contains non-latin characters
Summary: SDDM background image fail if file path contains non-latin characters
Status: RESOLVED DUPLICATE of bug 384294
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_sddm (show other bugs)
Version: 5.15.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-01 14:08 UTC by Guo Yunhe
Modified: 2019-03-01 16:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guo Yunhe 2019-03-01 14:08:15 UTC
SUMMARY

If the file path of chosen image contains Chinese characters, setting background image will fail. (image is not copied, config file is not saved)

STEPS TO REPRODUCE
1. Open SDDM module in System settings.
2. Choose a background image with Chinese characters in file name or folder name. (You can rename a folder to "图片" and put images inside)
3. Click save.
4. Check /usr/share/sddm/themes/breeze/theme.conf.user

OBSERVED RESULT
file is not copied to the theme folder and "background" property is not set correctly.

EXPECTED RESULT
file should be copied to the theme folder and "background" property should be changed to the new file name.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20190226
KDE Plasma Version: 5.15.0
KDE Frameworks Version: 5.55.0
Qt Version: 5.12.0
Kernel Version: 4.20.10-1-default
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-8550U CPU @ 1.80GHz
Memory: 31.2 GiB
Comment 1 Guo Yunhe 2019-03-01 14:51:51 UTC
I added some qDebug() lines and got:

Debug message from helper: SddmAuthHelper received:
Debug message from helper: QMap(("sddm.conf", QVariant(QString, "/etc/sddm.conf"))("sddm.conf/Autologin/Relogin", QVariant(bool, false))("sddm.conf/Autologin/User", QVariant(QString, ""))("sddm.conf/General/HaltCommand", QVariant(QString, ""))("sddm.conf/General/RebootCommand", QVariant(QString, ""))("sddm.conf/Theme/Current", QVariant(QString, "breeze"))("sddm.conf/Theme/CursorTheme", QVariant(QString, "breeze_cursors"))("sddm.conf/Users/MaximumUid", QVariant(QString, "60000"))("sddm.conf/Users/MinimumUid", QVariant(QString, "1000"))("theme.conf.user", QVariant(QString, "/usr/share/sddm/themes/breeze/theme.conf.user"))("theme.conf.user/General/background", QVariant(QString, "/home/guo/Nextcloud/??/??/????.jpg"))("theme.conf.user/General/type", QVariant(QString, "image")))

All non-latin character became "?"

I guess when args were passed from ThemeConfig to SddmAuthHelper, encoding and decoding is incorrect.
Comment 2 David Edmundson 2019-03-01 16:04:47 UTC

*** This bug has been marked as a duplicate of bug 384294 ***