[neon/neon/settings/Neon/release-lts] usr/share/initramfs-tools/scripts/casper-bottom: add a workaround for the live session uid

Harald Sitter null at kde.org
Fri Jun 11 12:29:43 BST 2021


Git commit 29ffaed693df783a724402ad2ffc56f62264c22a by Harald Sitter.
Committed on 11/06/2021 at 11:29.
Pushed by sitter into branch 'Neon/release-lts'.

add a workaround for the live session uid

it's a bit awkward but the user is 999 not 1000 so there's a fundamental
conflict between what /etc says should be the minimum and what it
actually is

kdenetwork-filesharing specifically depends on this being correct
because it uses the login.defs data to filter out system users from its
user list. if the current user itself is a system user that gets a bit
awkward

M  +5    -1    usr/share/initramfs-tools/scripts/casper-bottom/40kde_neon_setup

https://invent.kde.org/neon/neon/settings/commit/29ffaed693df783a724402ad2ffc56f62264c22a

diff --git a/usr/share/initramfs-tools/scripts/casper-bottom/40kde_neon_setup b/usr/share/initramfs-tools/scripts/casper-bottom/40kde_neon_setup
index aa54014..1448703 100755
--- a/usr/share/initramfs-tools/scripts/casper-bottom/40kde_neon_setup
+++ b/usr/share/initramfs-tools/scripts/casper-bottom/40kde_neon_setup
@@ -1,7 +1,7 @@
 #!/bin/sh
 # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
 # SPDX-FileCopyrightText: 2016 Jonathan Riddell <jr at jriddell.org>
-# SPDX-FileCopyrightText: 2017-2019 Harald Sitter <sitter at kde.org>
+# SPDX-FileCopyrightText: 2017-2021 Harald Sitter <sitter at kde.org>
 
 PREREQ=""
 DESCRIPTION="Disabling unnecessary Plasma services and setting up desktop..."
@@ -75,6 +75,10 @@ Relogin=true
 EOF
 fi
 
+# Lower the minimum UID so software (e.g. Dolphin's Share tab) doesn't trip over the fact that the system
+# says the lowest "user" uid is 1000 but then the current user is clearly below that.
+sed -i -E 's/(^\s*UID_MIN\s+)([0-9]+)/\1 999/' /root/etc/login.defs
+
 # Replace discover with ubiquity or calamares, cheap hack to get the installers
 # into kickoff.
 if [ -f /root/usr/share/applications/kde4/ubiquity-kdeui.desktop ]; then


More information about the Neon-commits mailing list