Summary:
The TERM signal handling in ksmserver invokes functions which are not async-signal safe, like Qt functions and C++ destructors. Moreover, the signal handling can occur in other than the main thread, which leads to Qt complaining about functions being invoked from the wrong thread. Such a crash can be seen in a report of [[ bug 384316 |https://bugs.kde.org/show_bug.cgi?id=384316 ]].
To fix both of these issues, this change makes the signal handling use the self-pipe trick, which signals the need for termination to the main thread by writing to a special-purpose file descriptor. The main loop then takes care of the termination. This is mostly inspired by [[ http://doc.qt.io/qt-5/unix-signals.html ]].
Note that `QApplication::quit` already does what we need when destroying the server, particularly deleting `the_server`/calling `cleanUp()`.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: broulik, graesslin, davidedmundson, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D8673
Use the QProcess::start() variant with explicit (empty, in these cases)
arguments, so the program strings are not parsed as shell commands,
thus preserving paths with spaces as such.
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
Normally kWin is launched simply as "kwin" ("kwin_x11", whatever), but
in some cases it's restart command may be "/usr/bin/kwin", most notably
when KWin restarts itself after a crash. Failing to recognize this client
as the WM leads to KWin starting without any session management restoring.
CCBUG: 377756
This follows the same approach as the logout greeter, albeit a bit simplified.
It also creates one window per screen and should fix the problems we had with its positioning in multi-screen setups.
Differential Revision: https://phabricator.kde.org/D3204
Summary:
Currently ksmserver sends DBus calls to klauncher to autostart services.
This patch brings all autostarting into the ksmserver process, putting
all autostart code together, and improving Plasma/Frameworks separation
(change requested by David Faure) with the long term goal of removing
this from klauncher; with a longer term goal of maybe even killing
klauncher.
We don't get two things autostarting as without ksmserver sending the
signals, klauncher does nothing.
Autostart.cpp code is copied verbatim so there's no breakage.
Test Plan: Logged in, got plasma and krunner and so on.
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D2544
According to Git / SVN history research, it was last used by KDE in
KDE 1. It seems like other toolkits also stopped using it 10-20 years
ago. It should have little to no practical relevance anymore.
I've found some documentation of legacy XSM session management from
1992, and the first copyright year of the XSMP spec (what we're
currently using) is 1993.
Also, XSM was removed from GNOME's gnome-session in 2005, rationale
and short discussion here:
https://mail.gnome.org/archives/desktop-devel-list/
2005-July/msg00527.html
with the following objections:
- Firefox doesn't support XSMP (long fixed)
- CDE on Solaris doesn't support XSMP (oh well...)
- Motif applications don't support XSMP
On kde-core-devel and kwin, nobody cared too much.
Consider XSM "accidentally" broken now ;)
https://marc.info/?l=kde-core-devel&m=144857647812257https://marc.info/?l=kde-core-devel&m=144976915400658
There is a utility called xsmproxy which comes from X.org.
It talks legacy XSM to clients and XSMP to an XSMP compliant
session manager and can therefore maybe hopefully make session
management of dinosaur applicatons sort of work.
It seems like that one received its last major modification
in 2003.
There is also some XSM related code in KWin that I will remove next.
Shutdown scripts are done by startkde after ksmserver quits. Which never
happens because we've told systemd to shutdown.
Old systems worked because they used to communicate with the display
manager which then closed us before shutting down, this is no longer the
case.
This moves handling the shutdown scripts into ksmserver (which already
handles startup scripts) and runs them before asking logind to shutdown.
BUG: 356190
REVIEW: 126268
This adds a user switcher borrowing elements from the lock screen and log out dialog.
It will be used instead of KRunner as main UI for switching sessions. The sessions runner
will stay there for the time being.
CHANGLOG: The main user switcher UI has been completely re-designed
REVIEW: 124585
On Wayland ksmserver should not be responsible for the lockscreen,
but the compositor takes care of providing the lock screen. To prevent
conflicts KSMServer gets a new command line option to enable it.
The code is slightly changed to not pass a series of boolean flags to
KSMServer, but a flags type.
The startplasma script for Wayland is adjusted to start ksmserver with
the new command line option.
REVIEW: 126022
This switch is rarely used and screenlocker is important part of the
Plasma system. So it makes no sense to have it build-disabled by ifdef
Reviewed by: Martin Gräßlin
This is the beginning of revision history for this module. If you
want to look at revision history older than this, please refer to the
techbase wiki for how to use Git history grafting. At the time of
writing, this wiki is located here:
http://community.kde.org/Frameworks/GitOldHistory
If you have already performed the grafting and you don't see any
history beyond this commit, try running "git log" with the "--follow"
argument.
Branched from the monolithic repo kde-workspace, frameworks branch, at commit
049113e719dd2fc4446d054fa1a3aada330094f0