Skip to content

Commit

Permalink
Passwordless login
Browse files Browse the repository at this point in the history
  • Loading branch information
alextrical committed Dec 5, 2023
1 parent f66d93c commit 9b727b2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion config/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

48 changes: 22 additions & 26 deletions config/scripts/setdefaults.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion config/scripts/stlthumb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9b727b2

Please sign in to comment.