Systemd passes the condition as `--condition <cond>`, not as a positional argument.
Also switch around return codes, 255 is special-cased to mean that the unit has failed.
Plasma core is moved away from being a template. This makes it easier
for others to mark themselves as being after. A new readme is added to
explain the design.
This means on logout we'll be gracefully closed down.
All of these are closing down properly anyway, but this makes things a
bit more explicit in case you managed to log out at an awkward point.
xdg-desktop.target was the name at the time of first being written, but
it was renamed upstream.. I had both on my system from a previous
compilation.
plasma-workspace.target already "Wants" the correctly named one.
Noticed by Benjamin Berg
Summary:
This brings numerous advantages such as:
- easier admin configuration with drop-ins, overrides and multiple
hooks throughout (and only having to learn one tool)
- session cleanup on exit, avoiding that occasional part where shutdown
hangs
- startup that actually knows when things are up
- race free autostart and DBus activation at once
- logs that rotate are split by service and usable
- resource management through slices and cgroups (the part I want)
Over the past 2 years I've been trying to tidy up and encapsulate the
relevant parts of startup into the binary plasma-session so that we can
just runtime swap out that one part and supporting both paths will be
easy.
Support is toggleable via cmake flag, as it seems like it should be a
distro decision, especially as we will require a specific systemd with
the xdg-generator.
KDED/kwin/other services are attached to the relevant repo.
Task T11914
Differential Revision: https://phabricator.kde.org/D28305
squash
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.
This existed to include the .kde directories in the search paths for
ghostscript, which clearly hasn't been the case for years, but the code
has kept getting ported and migrated.
At some point this has got broken, startplasma-x11 doesn't call this
path and we've not had any bug reports. We may as well clear this
legacy.
This reverts commit edc64d04a1.
This commit unfortunately caused a serious regression. Another approach
will be needed to solve 176650 and 417070.
BUG: 423995
FIXED-IN: 5.19.4
CCMAIL: alexander.lohnau@gmx.de
This reverts commit edc64d04a1.
This commit unfortunately caused a serious regression. Another approach
will be needed to solve 176650 and 417070.
BUG: 423995
FIXED-IN: 5.19.4
CCMAIL: alexander.lohnau@gmx.de
Typically on modern systems this will be started for us earlier in the
startup series and we don't have to worry about it.
For X11 clients look for the bus address on the X11 root window as a way
of sharing.
For reasons at the time we start our own DBus session within our wayland
session. Nesting causes conflicts and problems so this patch only start
a dbus session if one has not been set up already.
BUG: 404335
The initial comment about disabling quitLock is deprecated since we
added a QCoreApplication around the startup.
We can then use Qt's mechanism to delay application exit till the
notification thread finishes.
This presumably has been a bug for a while, but noticable in 5.19 after
even more startup performance improvements.
BUG: 422948
(cherry picked from commit ef4b84869612318ecb3cec44bd6c713ad545114f)
Startplasma monitors ksmserver and tears down the session if it goes
away, to match previous behaviour and as some lockscreen bypass
protection.
When we teardown our new binary plasma-shutdown appears, runs scripts
and makes the final shutdown call. ksmserver could gracefully quit in
the meantime, so startplasma guarded this case and waited till both
names exited. However it contains a really stupid typo.
BUG: 422870
Summary:
For systemd autostart generator will add a ExecCondition=kde-systemd-start-condition rcfile:section:entry:default
As described in T12627. Needs D28421
Test Plan:
Run kde-systemd-start-condition; should return 0 with a missing or incomplete argument, 255 with a false or non-existent and non-default con
fig value.
Reviewers: davidedmundson, broulik, dfaure, ngraham, meven
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28424
Summary:
Sort environment scripts before they are sourced. User scripts should run after system scripts to ensure that user preferences take precendence over system defaults. Scripts in each location (user and system) are then separately sorted in lexical order to ensure deterministic source order.
BUG: 420085
FIXED-IN: 5.19.0
Reviewers: #plasma, davidedmundson, apol
Reviewed By: apol
Subscribers: cfeck, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28941
Summary:
plasma-session goes to great lengths to make sure we have the latest env
vars from kcminit in future spawned jobs.
However one part got broke in some refactor, we capture the system
environment when we make the job, not when we're about to launch.
This means potentially kded5 and ksmserver wouldn't have the envs
kcminit set.
I've not noticed any practical impact from this.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28626
Summary:
It was safeguarded by an environment variable so we don't retroactively
change behaviour of existing setups in a bugfix update.
See https://phabricator.kde.org/D27883
Test Plan: Compiles
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D28300
Summary:
This was a deliberate decision to remove this in
c673a83226
The logic being that kdeinit should auto launch itself if required.
In practice this exposes a presumably pre-existing bug in kdeinit
autostarting where the env is not set correctly.
Test Plan:
qdbus org.kde.klauncher5 /KLauncher org.kde.KLauncher.exec_blind /opt/kde5/bin/kate ""
kate opened
Reviewers: #plasma, broulik
Reviewed By: #plasma, broulik
Subscribers: broulik, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27868
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:
A recent update to startup made it too fast and hit a race with ksplash.
We expose that we could send that kinit and ksmserver were ready before
ksplash registered the service name.
We have an existing mechanism to make DBus server queue up messages if a
service is not registered yet without actually activating it. So we can
re-use that.
Long term we need to rethink ksplash completely.
Test Plan:
Confirmed issue with extra debug
Logged in and the issue was gone
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27702
Summary:
Since ksmserver was split, start-plasma launches plasma-session which in
turn invokes ksmserver.
Test Plan: No code changes, only a method rename
Reviewers: #plasma, broulik, apol
Reviewed By: #plasma, broulik, apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27621
Summary:
If for some reason a service is started before StartServiceJob runs, we
will end up blocking forever.
Test Plan: Logged in
Reviewers: #plasma, apol
Reviewed By: apol
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D27471
Summary:
Applications which set `Qt::AA_EnableHighDpiScaling` use the DPI of the monitor the window is on to calculate an additional scaling factor.
Plasma sets `QT_SCREEN_SCALE_FACTORS` in the environment for manual specification of per-monitor scale, which combined with the automatic scaling may result in double scaling.
To disable the automatic scaling, `QT_AUTO_SCREEN_SCALE_FACTOR=0` has to be set, even on Qt 5.14.
As a side effect, this works around QTBUG-80967 as well.
BUG: 415421
Test Plan: On X11, with a >144dpi monitor and a scaling factor of 2 set manually, scaling was doubled previously. Now it works as expected.
Reviewers: #plasma, apol, davidedmundson, fvogt
Reviewed By: #plasma, davidedmundson, fvogt
Subscribers: acooligan, fvogt, asturmlechner, dfaure, davidedmundson, anthonyfieroni, plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26185
Summary:
For normal distros it doesn't make sense, KDE_INSTALL_FULL_DATAROOTDIR
will be /usr/.
For devs using a prefix startplasma-dev.sh already does this for us only
for the dev setup.
For any other user, it should be their responsibility to adjust it.
It's currently broken anyway, if a user simply installs flatpak that sets this env
earlier in the boot, so this will do nothing. It implies no-oe relies on thisl
It's a relic from 2007 (bd38d59e11548f160efd0918ca5461536ac72349) that doesn't
make sense now.
BUG: 315452
Test Plan: Compiles
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D26537
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