From 9b727b25a118b4f7e1adf6727aa3ad321cf40a9e Mon Sep 17 00:00:00 2001 From: alextrical <35117191+alextrical@users.noreply.github.com> Date: Tue, 5 Dec 2023 19:03:21 +0000 Subject: [PATCH] Passwordless login --- .../ublue-os/firstboot/launcher/autostart.sh | 7 +++ config/recipe.yml | 2 +- config/scripts/setdefaults.sh | 48 +++++++++---------- config/scripts/stlthumb.sh | 1 - 4 files changed, 30 insertions(+), 28 deletions(-) diff --git a/config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh b/config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh index 7576023acd..8a1c52702a 100755 --- a/config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh +++ b/config/files/usr/share/ublue-os/firstboot/launcher/autostart.sh @@ -1,4 +1,11 @@ #!/usr/bin/env bash +#Cleanup Fedora defaults and replace with Flathub +flatpak remote-delete --system --force fedora +flatpak remote-delete --user --force fedora +flatpak remove --system --noninteractive --all +flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo +flatpak remote-add --if-not-exists --user flathub https://flathub.org/repo/flathub.flatpakrepo + # Simply launches the "yafti" GUI with the uBlue image's configuration. /usr/bin/yafti /usr/share/ublue-os/firstboot/yafti.yml diff --git a/config/recipe.yml b/config/recipe.yml index 0792bd5471..df81a96bd8 100644 --- a/config/recipe.yml +++ b/config/recipe.yml @@ -75,5 +75,5 @@ modules: # this sets defaults for user profiles and logins - setdefaults.sh # this sets up the proper policy & signing files for signed images to work - - signing.sh - signing.sh + - signing.sh diff --git a/config/scripts/setdefaults.sh b/config/scripts/setdefaults.sh index 3c7b2fb6fc..bc7497d6f7 100644 --- a/config/scripts/setdefaults.sh +++ b/config/scripts/setdefaults.sh @@ -5,29 +5,25 @@ # builds actually ran successfully without any errors! set -oue pipefail -#Allow Passwordless Login -sed -i '1 i\auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' usr/etc/pam.d/sddm -sed -i '1 aauth sufficient pam_succeed_if.so user ingroup nopasswdlogin' usr/etc/pam.d/kde - -#Set Dark theme as default -kwriteconfig5 --file usr/share/kde-settings/kde-profile/default/xdg/kdeglobals --group KDE --key LookAndFeelPackage org.kde.breezedark.desktop -kwriteconfig5 --file usr/share/kde-settings/kde-profile/default/xdg/kdeglobals --group KDE --key ColorScheme BreezeDark - -#Allow user to apply updates -cat > usr/etc/polkit-1/rules.d/45-polkit-allow-updates.rules << 'EOF' -/* Allow users in to update or upgrade without authentication */ -polkit.addRule(function(action, subject) { - if (action.id == "org.projectatomic.rpmostree1.upgrade" && subject.isInGroup("users")) { - return polkit.Result.YES; - } -}); -EOF - -#Set Dark theme as default -kwriteconfig5 --file usr/etc/sddm.conf --group Autologin --key User makerspace -kwriteconfig5 --file usr/etc/sddm.conf --group Autologin --key Session plasmax11.desktop -kwriteconfig5 --file usr/etc/sddm.conf --group General --key DisplayServer x11 - - - - +# #Allow Passwordless Login +sed -i '1 i\auth sufficient pam_succeed_if.so user ingroup nopasswdlogin' /usr/etc/pam.d/sddm +sed -i '1 aauth sufficient pam_succeed_if.so user ingroup nopasswdlogin' /usr/etc/pam.d/kde + +# #Set Dark theme as default +# kwriteconfig5 --file usr/share/kde-settings/kde-profile/default/xdg/kdeglobals --group KDE --key LookAndFeelPackage org.kde.breezedark.desktop +# kwriteconfig5 --file usr/share/kde-settings/kde-profile/default/xdg/kdeglobals --group KDE --key ColorScheme BreezeDark + +# #Allow user to apply updates +# cat > usr/etc/polkit-1/rules.d/45-polkit-allow-updates.rules << 'EOF' +# /* Allow users in to update or upgrade without authentication */ +# polkit.addRule(function(action, subject) { +# if (action.id == "org.projectatomic.rpmostree1.upgrade" && subject.isInGroup("users")) { +# return polkit.Result.YES; +# } +# }); +# EOF + +# #Set Dark theme as default +# kwriteconfig5 --file usr/etc/sddm.conf --group Autologin --key User makerspace +# kwriteconfig5 --file usr/etc/sddm.conf --group Autologin --key Session plasmax11.desktop +# kwriteconfig5 --file usr/etc/sddm.conf --group General --key DisplayServer x11 diff --git a/config/scripts/stlthumb.sh b/config/scripts/stlthumb.sh index dd50653a67..032040e56e 100644 --- a/config/scripts/stlthumb.sh +++ b/config/scripts/stlthumb.sh @@ -9,7 +9,6 @@ set -oue pipefail wget https://github.com/alextrical/stl-thumb/releases/download/release/stl-thumb-0.5.0-1.x86_64.rpm -P /tmp rpm-ostree install /tmp/stl-thumb-0.5.0-1.x86_64.rpm rm /tmp/stl-thumb-0.5.0-1.x86_64.rpm -#rpm2cpio https://github.com/alextrical/stl-thumb/releases/download/release/stl-thumb-0.5.0-1.x86_64.rpm | cpio -idmv wget https://github.com/alextrical/stl-thumb-kde/releases/download/Release/stlthumbnail.so -P /usr/lib64/qt5/plugins chmod +x /usr/lib64/qt5/plugins/stlthumbnail.so wget https://github.com/alextrical/stl-thumb-kde/releases/download/Release/stlthumbnail.desktop -P /usr/share/kservices5 \ No newline at end of file