Bug 459180 - Autostart on upgrade to show upgrade page
Summary: Autostart on upgrade to show upgrade page
Status: RESOLVED FIXED
Alias: None
Product: Welcome Center
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks: 441367
  Show dependency treegraph
 
Reported: 2022-09-15 19:13 UTC by Nate Graham
Modified: 2023-02-08 18:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Graham 2022-09-15 19:13:37 UTC
Right now it assumes it's being autostarted and has code to remove itself.

We might want to replace this with tighter integration in Plasma: have Plasma itself open it in its startup process code. This would open the door for Plasma to also open it when needed after upgrade, so show a preview of the changes to the user. See Bug 459179.
Comment 1 Nate Graham 2022-09-15 21:59:13 UTC
Yeah we should have Plasma do it. When the `plasma-welcome` binary is installed, Plasma should open it under the following two circumstances:

1. Launch it without any CLI flags on first boot; in this mode, it's an onboarding wizard.
2. Launch it with the `--after-updating-to [plasma major version number]` after an update from one Plasma major version to another (e.g. 5.25 -> 5.26). In this mode, it shows a "what's new in this Plasma release" message.
Comment 2 Nate Graham 2022-09-15 21:59:58 UTC
(Welcome Center is a new onboarding wizard that is currently undergoing KDEreview and targeted at a release in Plasma 5.27. It currently lives at https://invent.kde.org/ngraham/welcome-app/, but should be moved soon)
Comment 3 Nate Graham 2022-09-15 22:52:07 UTC
Correction on the argument name for thing #2: it's "--after-updating-to"
Comment 4 Nate Graham 2022-10-04 17:07:27 UTC
Talked with David E; we can do this ourselves by setting the app up to autostart with appropriate X-KDE-autostart-conditions in its desktop file.

This will probably entail reverting https://invent.kde.org/plasma/plasma-welcome/-/commit/b1c575ce2338dde54e8a55b36904917598773e05 plus adding a few other bits.
Comment 5 Bug Janitor Service 2022-11-12 21:31:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-welcome/-/merge_requests/23
Comment 6 Aleix Pol 2022-12-10 21:41:19 UTC
Git commit aadd3306d50031feccae5239bb7cfa99b2302208 by Aleix Pol Gonzalez, on behalf of Nate Graham.
Committed on 10/12/2022 at 21:34.
Pushed by ngraham into branch 'master'.

Re-add autostart

This is a partial revert of b1c575ce2338dde54e8a55b36904917598773e05
that brings back autostart for the primary usage mode (i.e. as an
onboarding wizard) but in a technically simpler form:
- We now use single config file key that encompass both skipping and
  completing the wizard, which are the same from the perspective of
  whether we want to autostart it next boot or not.
- We now decide whether or not to autostart on the next boot by using
  an X-KDE-autostart-condition key in the .desktop file, rather than
  conditionally deleting the autostart file

We still need to figure out a way to open the app in upgrade mode
following an upgrade to a new major Plasma version.

M  +2    -1    CMakeLists.txt
M  +1    -0    org.kde.plasma-welcome.desktop
M  +2    -0    src/CMakeLists.txt
A  +16   -0    src/config.kcfg
A  +10   -0    src/config.kcfgc
M  +8    -2    src/contents/ui/main.qml
M  +2    -0    src/main.cpp

https://invent.kde.org/plasma/plasma-welcome/commit/aadd3306d50031feccae5239bb7cfa99b2302208
Comment 7 Bug Janitor Service 2022-12-13 02:27:03 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-welcome/-/merge_requests/30
Comment 8 Nate Graham 2023-02-08 18:08:08 UTC
Git commit 25364fbd7a5a11f9ad148d21ddf77c84e7521385 by Nate Graham, on behalf of Oliver Beard.
Committed on 08/02/2023 at 18:07.
Pushed by ngraham into branch 'master'.

Re-implement autostart functionality

Autostart is now controlled by a KDED module which inspects the version number of the last Plasma
release when the app was run (or notices if it's absent) and does the right thing:
- Autostart the app in welcome mode if it's absent
- Autostart the app in update mode if it's present for a prior version
- Do nothing otherwise
FIXED-IN: 6.0

M  +4    -0    .reuse/dep5
M  +1    -2    CMakeLists.txt
M  +1    -1    README.md
M  +0    -2    org.kde.plasma-welcome.desktop
M  +3    -0    src/CMakeLists.txt
M  +6    -2    src/config.kcfg
M  +38   -40   src/contents/ui/main.qml
M  +4    -4    src/contents/ui/pages/PlasmaUpdate.qml
M  +4    -4    src/controller.cpp
M  +21   -4    src/controller.h
A  +16   -0    src/kded/CMakeLists.txt
A  +62   -0    src/kded/daemon.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +25   -0    src/kded/daemon.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +9    -0    src/kded/kded_plasma-welcome.json
M  +4    -6    src/main.cpp
A  +12   -0    src/version.h.cmake

https://invent.kde.org/plasma/plasma-welcome/commit/25364fbd7a5a11f9ad148d21ddf77c84e7521385