Bug 420126

Summary: Setting greeter background image discards leading space in filename
Product: [Applications] systemsettings Reporter: outfrost <kotlet.bahn+KDE>
Component: kcm_sddmAssignee: David Edmundson <kde>
Status: REPORTED ---    
Severity: normal CC: nate, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.18.4   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: /usr/share/sddm/themes/breath/Background.qml shipped with Manjaro

Description outfrost 2020-04-15 17:15:57 UTC
Created attachment 127567 [details]
/usr/share/sddm/themes/breath/Background.qml shipped with Manjaro

SUMMARY
When an image file whose name begins with a space (0x20) is selected as login screen background, the space is somehow discarded, and the greeter attempts to load a file without the leading space in the name.

STEPS TO REPRODUCE
1. Open System Settings -> Startup and Shutdown -> Login Screen (SDDM) -> Theme
2. Change the theme background to an image file whose name (stem; not necessarily the whole path) begins with a space
3. Apply settings and log out

OBSERVED RESULT
Greeter displays a solid white background.

Journal contains the following message:
> Apr 15 17:54:47 Anachronos sddm-greeter[11790]: file:///usr/share/sddm/themes/breath/Background.qml:34:5: QML Image: Cannot open: file:///usr/share/sddm/themes/breath/.'Ω'. by Baisishaonian.jpg

EXPECTED RESULT
Greeter displays the chosen background image correctly.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro 19.0.2 Kyria / x86_64 Linux 5.5.16-1-MANJARO
(available in About System)
KDE Plasma Version: 5.18.4
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
The issue does not seem to come from unusual characters in the name (apostrophes and omega), because once I renamed the image file by prepending an additional dash (0x2D), it was loaded correctly by the greeter.

I've attached Manjaro's /usr/share/sddm/themes/breath/Background.qml.
Comment 1 Nate Graham 2020-04-15 18:11:41 UTC
Breath is a 3rd-party theme not supported by KDE. Is the issue reproducible when using the Breeze theme?
Comment 2 outfrost 2020-04-17 04:06:39 UTC
(In reply to Nate Graham from comment #1)
> Breath is a 3rd-party theme not supported by KDE. Is the issue reproducible
> when using the Breeze theme?

Yes, it is, with the exact same message in journal (but now referring to Background.qml under breeze).
Comment 3 Christoph Feck 2020-04-28 06:31:36 UTC
Information was added with comment 2; changing status for inspection.