This allows new startup procedures to use a session manager and also
allows us to slowly replace the session manager without breaking plasma.
Following on from the previous refactor, Startup and Shutdown are moved
from kmserver and the previous calls into KSMserver are replaced with
DBus calls.
Reviewers: #plasma, davidedmundson
Reviewed By: #plasma, davidedmundson
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21995
Summary:
ksmserver's loading of other window manager relies on files in
share/windowmanagers/$name.desktop with the Exec line of the window
manager.
This was something previously installed by plasma-desktop and removed in
2016. All this code path is now redundant as well as the wmChanged DBus
method used by the deleted KCM.
Setting KDEWM manually will still work as before.
Test Plan:
Logged in
Got kwin as before
Reviewers: #plasma, broulik, apol
Reviewed By: #plasma, broulik, apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21758
Summary:
We don't support multi X screen anymore in the rest of plasma. Cleans up
a bit of code.
Having multiple monitors via xrandr will still work as before.
Test Plan: Compiles
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21757
Summary:
This commit splits ksmserver's xsession shutdown logic from performing
the actual shutdown and running shutdown scripts and implement proposed
org.kde.Shutdown interface.
Intended longer term target is to move this to a separate executable.
KSMServer's existing logout dbus method still exists for compatibility
forwarding to the new interface.
There are 2 minor behavioural changes.
The shutdownMode property (which doesn't seem to do anything and is not
exposed in our UI) is not kept.
If you shutdown /whilst/ starting up somehow, previously we delayed
showing the logout prompt, we now delay performing the actual logout.
Test Plan:
Logged out / shut down using the old API
Logged out / shut down using the new DBus API
Reviewers: #plasma, apol, romangg
Reviewed By: #plasma, apol, romangg
Subscribers: romangg, apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16277
Summary:
Everything related to Plasma startup goes in Startup everything relating
to X session management stays in KSMServer. Restoring the window
manager currently stays inside ksmserver as it passes the session ID as
an argument and at various points checks if something the client is the
WM.
Relevant methods move to server.cpp to keep one class per cpp file.
KSMServer gains some signals as it can no longer call the startup methods
directly to continue the process.
This is part of a cleanup series in ksmserver. (The friend class will disappear
in the next commit)
Behaviour should remain identical.
Test Plan: Logged in on X
Reviewers: #plasma, graesslin
Reviewed By: #plasma, graesslin
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16225
Summary:
Removing this is part of preparations for ksmserver to become just an X
session manager. See T9779.
Instead of ksmserver opening the greeter with a tonne of args and then
having a socket to watch for changes, the new mechanism is that we fire
and forget the prompt. Then the logout prompt calls back into ksmserver
with the request. Simplifies code greatly allows for moving.
KSMserver's shutdown DBus method remain on ksmserver for compatibility,
but ultimately spawning the prompt will move to libkworkspace and called
from the session directly.
QML API in the logout greeter remains mostly untouched.
Behavioural changes are minor:
There was a QML property "choose" exposed to the greeter if the default
shutdown option is set to None. Though we don't allow this in the KCM
and our default prompt doesn't use it.
We no longer block a user from saving a session whilst a logout prompt
is active.
Test Plan:
Logged out
Shutdown
Also ran with old ksmserver, still got a prompt
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16066
Summary:
ksmserver autostart had a system where processes, such as plasma, could
block the startup phase from moving on.
It is currently entirely unused.
It's very difficult to use properly, plasmashell has to block startup
before ksmserver moves on to phase 1. Racey at best.
I did hack it to work, and it does make a surprising positive
improvement to bootup. Worth exploring the idea properly, but implemented
better.
We should be able to get the same results by
blocking and waiting for the DBus name in the autostart desktop file to
become registered rather than having a ksmserver-specific solution.
Test Plan: Compiles, can still login
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D16042
Summary:
This reduces a bunch of code, both hidden in the backend as well as the
mostly duplicated front end UI, making it more consistent for users too.
There is a behavioural change that switching user then cancelling will
require your own password.
KSMServer still has the same DBus slot for compatibility which then
proxies over to the screensaver. This could be calling itself, it might
be calling kwin when we're on wayland.
Depends on D15186
Test Plan:
Pressed switch user from the UI
Got a swich user dialog
Reviewers: #plasma, mart
Reviewed By: #plasma, mart
Subscribers: ngraham, mart, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D15187
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