Bug 419436 - Picture of the day (potd) background does not work in greeter
Summary: Picture of the day (potd) background does not work in greeter
Status: RESOLVED DUPLICATE of bug 389962
Alias: None
Product: kscreenlocker
Classification: Plasma
Component: greeter (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 22:03 UTC by Yichao Yu
Modified: 2020-03-31 17:08 UTC (History)
2 users (show)

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 Yichao Yu 2020-03-30 22:03:16 UTC
SUMMARY
If POTD is selected as the background for screen locker, a black background is shown instead.
This is due to a failure on `open` in the following call chain with `EPERM`.

#0  createUnnamedFile (file=@0x5635d3cf2638: -1, tfn=..., mode=384,
    error=error@entry=0x7fff3facf9a8) at io/qtemporaryfile.cpp:307
#1  0x00007fb41161153d in QTemporaryFileEngine::open (this=0x7fb3f0007bb0, openMode=...)
    at io/qtemporaryfile.cpp:367
#2  0x00007fb4115f9ced in QFile::open (this=this@entry=0x7fff3facfb00, mode=mode@entry=...)
    at ../../include/QtCore/../../src/corelib/global/qflags.h:120
#3  0x00007fb41161228c in QTemporaryFile::open (this=this@entry=0x7fff3facfb00,
    flags=flags@entry=...) at io/qtemporaryfile.cpp:969
#4  0x00007fb40d8baa5e in QTemporaryFile::open (this=0x7fff3facfb00)
    at /usr/include/qt/QtCore/qflags.h:118
#5  KIO::ConnectionBackend::listenForRemote (this=this@entry=0x5635d3cf2470)
    at /usr/src/debug/kio-5.68.0/src/core/connectionbackend.cpp:143
#6  0x00007fb40d8bce5a in KIO::ConnectionServer::listenForRemote (this=0x5635d3cfc210)
    at /usr/src/debug/kio-5.68.0/src/core/connectionserver.cpp:56

The error code causes the temp file creator to not use the fallback mechanism but at least in this case it probably won't help.

From reading `greeter/seccomp_filter.cpp`, it seems that write capability is intentionally dropped for the greeter which is probably why the creation of the tmp file failed. Judging by the comment at the start of the file about OpenGL it seems that the correct fix would be somehow initialize kio so that one don't need to create the file after seccomp is initialized? I'm not sure how to do that for KIO or I'll probably have submitted a patch instead...

STEPS TO REPRODUCE
1. Set screen lock greeter backgroud to picture of the day (default black picture background). Both Bing and Unsplash shows this problem. Others probably do too.
2. Start the greeter either normally or just by running `/usr/lib/kscreenlock_greeter` (or whatever path it is in, possibly with `--testing`)

OBSERVED RESULT

The background is black. If the command is run from cmdline directly, one should see output like,

```
kf5.kio.core: KIO Connection server not listening, could not connect
kf5.kio.core: KIO Connection server not listening, could not connect
kf5.kio.core: couldn't create slave: "Can not create socket for launching io-slave for protocol 'https'."
```

which is how I tracked down the location of the error. There's also another error

```
UdevQt: unable to create udev monitor connection
```

after that that is probably unrelated to this issue but might have the same cause?

EXPECTED RESULT

POTD background should work.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1

ADDITIONAL INFORMATION

I found this bug from debian with the same issue but I can't find a corresponding kde bug report.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906148
Comment 1 Patrick Silva 2020-03-31 17:08:05 UTC

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