Bug 466282 - Add a live environment mode so Plasma Welcome is useful on live media
Summary: Add a live environment mode so Plasma Welcome is useful on live media
Status: RESOLVED FIXED
Alias: None
Product: Welcome Center
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-23 01:39 UTC by Neal Gompa
Modified: 2023-06-21 21:11 UTC (History)
4 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 Neal Gompa 2023-02-23 01:39:52 UTC
SUMMARY
Plasma Welcome does a great job of introducing people to Plasma, but it also offers prompts and settings that are inappropriate when booted into a live environment. However, Plasma Welcome can be useful for live environments, and it'd be great for it to be configured with the ability to present a welcome to tour Plasma or to launch the OS installer.


STEPS TO REPRODUCE
1. Boot an F38 nightly compose ISO, like this one: https://kojipkgs.fedoraproject.org/compose/branched/Fedora-38-20230222.n.0/compose/Spins/x86_64/iso/Fedora-KDE-Live-x86_64-38-20230222.n.0.iso

OBSERVED RESULT
Plasma Welcome starts up and guides you through configuring Plasma in the live environment as if it's a permanent installed one.

EXPECTED RESULT
When Plasma Welcome detects it's operating in a live environment (if "rd.live.image" is in the kernel command-line, it's a live environment), it starts in a different mode suitable for live environments, where it offers either to give you a tour of Plasma or launch the distribution installer.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora Linux 38 (KDE Plasma)
(available in About System)
KDE Plasma Version: 5.27.0
KDE Frameworks Version: 5.103
Qt Version: 5.15.8

ADDITIONAL INFORMATION
This was discovered by Kamil Paral of Fedora QA: https://lists.fedoraproject.org/archives/list/kde@lists.fedoraproject.org/message/YY7AKUD2737IOCE47QEQDIBLEQUXUJ5V/
Comment 1 Oliver Beard 2023-02-23 17:39:41 UTC
We can adjust the pages that appear on a live environment. I'm wondering how it would be best to detect, in the autostart helper, that the application is inside of a live environment. Perhaps username?
Comment 2 Adam Williamson 2023-02-23 17:50:12 UTC
well, there may not be a good cross-distro way to do it :/ AFAIK, live boot is implemented differently on different distros, so there isn't just one reliable indicator. Fedora's live environment user is called 'liveuser', but I doubt it's the same on other distros.

for GNOME, we do this customization [downstream](https://pagure.io/livesys-scripts/blob/main/f/libexec/livesys/sessions.d/livesys-gnome) - specifically, lines 58-61 disable the upstream GNOME welcome tour, and lines 51-56 enable the custom welcome screen we show on live boots instead.

It may be the case that we need to do something similar for Plasma - upstream just needs to allow some sort of mechanism here (give the welcome tour a "live mode" or whatever), and we do the actual customization to make it kick in downstream.
Comment 3 Oliver Beard 2023-02-23 18:08:27 UTC
(In reply to Adam Williamson from comment #2)
> It may be the case that we need to do something similar for Plasma -
> upstream just needs to allow some sort of mechanism here (give the welcome
> tour a "live mode" or whatever), and we do the actual customization to make
> it kick in downstream.

It's possible for the live user that you could disable the autostart KDED service (added in 6.0 or git master), and launch the welcome app with a custom argument. We could also add a different welcome page for live environments. To show the installer, a distro page could be added in the live environment. Some thought to more customising the order of these pages could help.
Comment 4 Nate Graham 2023-02-23 23:18:14 UTC
If compiling the app differently in the live environment is okay, we could add a CMake flag you can compile it with that will cause the autostart helper to launch the app in live user mode, rather than welcome mode.
Comment 5 Adam Williamson 2023-02-23 23:19:16 UTC
No, that can't work. It has to be something that can be poked by a script during startup, basically - some kind of config file entry, magic file, something like that.
Comment 6 Oliver Beard 2023-02-23 23:20:48 UTC
(In reply to Adam Williamson from comment #5)
> No, that can't work. It has to be something that can be poked by a script
> during startup, basically - some kind of config file entry, magic file,
> something like that.

Config would work! It could be a simple key in plasma-welcomerc, like LiveUser=true that causes the autostart helper to use a different mode.
Comment 7 Bug Janitor Service 2023-02-23 23:49:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-welcome/-/merge_requests/65
Comment 8 Nate Graham 2023-02-23 23:51:29 UTC
Yeah, sounds like we'll need to do that.

Now onto the question of what it should display in live user mode. I guess we should have a custom page with a brief welcome to the distro as well as plasma, with a button to launch the installer, alongside a button to see the normal pages for a tour of Plasma. The app that the button launches would be controlled by a desktop file, which could also be specified in the config file (or that could be a CMake option, and then it would be unused outside of the live environment mode).
Comment 9 Bug Janitor Service 2023-06-21 10:28:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-welcome/-/merge_requests/81
Comment 10 Oliver Beard 2023-06-21 20:58:26 UTC
Git commit 7838d980b688c7f8f457563f801a1de4ad823026 by Oliver Beard.
Committed on 21/06/2023 at 20:54.
Pushed by olib into branch 'master'.

Add a live environment mode for distro installers

This adds a new mode, which shows a different first page for the distro and prevents showing settings pages.

M  +14   -1    README.md
M  +8    -0    src/config.kcfg
M  +13   -6    src/contents/ui/main.qml
A  +61   -0    src/contents/ui/pages/Live.qml     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +16   -0    src/controller.cpp
M  +4    -1    src/controller.h
M  +13   -7    src/kded/daemon.cpp
M  +3    -0    src/main.cpp
M  +1    -0    src/resources.qrc

https://invent.kde.org/plasma/plasma-welcome/-/commit/7838d980b688c7f8f457563f801a1de4ad823026