Currently we have a whole daisy-chain of startplasmawayland-> kwin ->
startplasmawaylandsession -> launching the session.
This was needed as we needed environment variables which previously we
only knew after kwin started.
After some kwin refactoring this is no longer the case, and
kwin_wayland_wrapper will sync it's environment variables to the
appropriate startup environments.
This allows us to move starting kwin_wayland to be systemd managed,
brining resource control, alongside it's classic counterpart
plasma-session.
On wayland we don't want to use the env vars as we send the scale via
wl_output scale.
If a user logs into X first we set these in our activation env to a
scaled value. If they then log into wayland afterwards they are still
set. Calling qunsetenv won't work as then we won't remove them from the
activation env.
Arguably it's working round a bug, but we don't have other options.
BUG: 438971
People are using this feature to work around Wayland's terrible
fractional scaling implementation that makes everything super blurry. I
can't in good conscience tell them to use it anyway because it really
does look so bad. :( See https://bugs.kde.org/show_bug.cgi?id=433269.
This reverts commit 65defddee95db6738d5e2c80f6c7b373fde451a1
This reverts commit 40afa58ab9bf0d0808edb891f9cd855316a82411
BUG: 433115
FIXED-IN: 5.21.2
This add fix to avoid session specific environement variable to be
leaked into new session.
Also, it will restore the old systemd session variable upon shutting
down.
We no longer need --exit-with-session as plasma_shutdown explicitly
quits kwin gracefully.
We also don't want to relaunch ksplash if kwin restarts.
We run the whole script as we need to restart ksmserver as xserver will
be restarted.
For other services, if they get restored through crash handlers or this
doesn't really matter. DBus unique-ness will take care of it.
Allowing users to manually change the font DPI independent of font sizes
and the global scale is already of questionable value on X11, but on
Wayland where Qt scaling is always used, it is an anachronism. So let's
only show it on X11. On Wayland, people can use the global scaling
feature in the KScreen KCM.
See also https://phabricator.kde.org/T9500
systemd provides a desktop diagnostic place for user to set environment
variables. Currently we only export to it but didn't import from it.
This would also import from it so we are able to use environment.d to
set environment even systemd unit based plasma is not used.
startplamsa-wayland and startplasma-waylandsession are split so that
anything requiring an X or wayland connection happens in
startplasma-waylandsession anything else can happen in the first binary.
runStartupConfig and setting an env variable can happen before kwin. It
might even fix a bug if kwin used any calls that rely on QLocale.
Summary:
Currently startplasma spawns plasma-session then sits around waiting for
that to finish
plasma-session spawns all the startup then also just sits around doing
nothing
This patch makes plasma-session spawn all the startup and then quit.
It also splits the owner of the org.kde.shutdown interface to be on
demand. plasma-shutdown asks ksmserver to quit and then if applicable
runs the shutdown scripts or not.
Startplasma then knows when to exit by monitoring the DBus service
status directly.
The benefits are that we save some resources by not needing
plasma-session lingering about.
It also means the shutdown interface is re-usable as-is when the pending
systemd startup method is used.
Test Plan:
Logged in and:
- ran killall ksmserver, session ended as before
- logged out and cancelled due to unsaved changes
- logged out and completed logout
- logged out and rebooted
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: apol, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27629
Summary:
Allows specifying the shell through an environment variable.
Allows forwarding command line arguments to kwin_wayland, since the arguments we
use on plasma phone are slightly different.
Test Plan: Builds, still starts
Reviewers: #plasma, bshah, mart, davidedmundson
Reviewed By: #plasma, bshah, mart, davidedmundson
Subscribers: broulik, mart, alexeymin, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D25750
Summary:
At the moment we had several scripts to start the different processes. With this we unify this code into an application that takes care of the whole process.
This allows us to:
- Save on process spawning, we don't need to run a separate process synchronously for every single thing.
- Don't have a redundant configuration file parser but reuse the one we've already optimised in KConfig.
- Issue dbus calls from the process itself instead of spawning qdbus.
- Removes a bunch of duplicated code.
Test Plan: Started different systems on different distros, on wayland and x11.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D21725