Summary: | install-sessions.sh should set up dbus/polkit/kauth stuff for your built-from-source Plasma desktop | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | Nate Graham <nate> |
Component: | general | Assignee: | David Edmundson <kde> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | aleixpol, alex765, butirsky, claudius.ellsel, codestruct, kde, kyle.devir, plasma-bugs, tumaix |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: |
https://bugs.kde.org/show_bug.cgi?id=425268 https://bugs.kde.org/show_bug.cgi?id=423953 |
||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/02459d3e1c20fc0b9c503e84d182f1504bd26a74 | Version Fixed In: | |
Sentry Crash Report: |
Description
Nate Graham
2020-08-12 20:05:23 UTC
CCing a few people: - David who apparently knows how to make this stuff work - Tomaz who recently wrestled with this and maybe came up with a solution that worked? - Aleix who wrote install-sessions.sh >install-sessions should also do whatever is needed to get DBus, PolKit, and Kauth stuff working too. Then that stuff is transformed from a pain point into an effortless non-issue, just like it did for making your built-from-source Plasma desktop to appear in SDDM.
DBus has two parts; user and system. IMHO the user setup isn't too hard - except for this new potential issue with /home. Personally I would solve that by installing into /opt/kde5 rather than /home especially as it's useful to test multiple users with your self-build setup.
One challenge to note is that if you set up DBus and Polkit correctly to use your dev ones you have to apply something systemwide, which means any distro session also will use any dev polkit things.
You can't make that change at runtime and you can't skip some root involvement.
-----
For the sake of brainstorming, here's some other ideas:
- We have a script/cron job to symlink some parts from your install into /etc/. Effectively what I do for my polkit and system bus . It'll break setups for people who install alongside distro KDE.
- We could use a pam hook to set up the session instead of the .desktop file. At the time we run pam auth modules we know what session we will be loading. This would allow us to manipulate XDG_DATA_DIRS before the user dbus-daemon is started, which saves the session bus problem.
- Some unionfs to mount a directory read-only on top of /usr at boot? Then all system stuff would just work. Would require it to be done very early in the boot before polkit. Probably a horrific idea.
- We use something like checkinstall in kdesrc-build and then we can install into /usr as packages. Would work for the neon case and I'm sure there's some equivalent.
For polkit system actions the important folders are: polkit-1/actions dbus-1/system.d (sometimes clients also use /etc/dbus-1/system.d ) dbus-1/system-services I use a bash function that does the following now: function install-dbus-stuff { echo "Let's install stuff!" sudo ls > /dev/null echo "Installing actions from ~/kde/usr/share/polkit-1/actions/ to /usr/share/polkit-1/actions/" sudo cp -r ~/kde/usr/share/polkit-1/actions/* /usr/share/polkit-1/actions/ echo "Installing everything from ~/kde/usr/share/dbus-1/ to /usr/share/dbus-1/" sudo cp -r ~/kde/usr/share/dbus-1/ /usr/share/ } Seems to work fine in the absence of an automated solution to this problem. Do you plan to include it in the install script? No, because it's kind of a hack. It could overwrite system files and mess up your dist-provided session. Alright, then. I wasn't aware about PolKit as it doesn't mentioned in the Wiki, only DBus does: https://community.kde.org/Get_Involved/development#Plasma Maybe that's the reason I don't have Spectacle working in Wayland session. As a least measure, shall we update the Wiki to mention all the required parts? This is relevant https://github.com/sddm/sddm/pull/1370 effectively the option 2 in my list above. It would solve session bus issues. It would not solve polkit, but it's still in the right direction *** Bug 436776 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/884 Git commit 02459d3e1c20fc0b9c503e84d182f1504bd26a74 by Nate Graham. Committed on 26/05/2021 at 01:58. Pushed by ngraham into branch 'master'. Set up DBus stuff properly in install-sessions.sh script This is an extremely fiddly procedure well-suited for being automated rather than documented. The approach taken here should work for all distros, even those that freak out if system DBus files are modified or symlinked into a home directory. M +20 -0 login-sessions/install-sessions.sh.cmake https://invent.kde.org/plasma/plasma-workspace/commit/02459d3e1c20fc0b9c503e84d182f1504bd26a74 |