From a3b5c931bfdf09b8bcb0b4cf218f227fb73aa179 Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Sat, 5 Aug 2023 19:58:58 -0600 Subject: [PATCH 1/4] chore: Copy yafti config to /etc Allows editing when things go weird --- Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Containerfile b/Containerfile index 8ce039b0..a662ff66 100644 --- a/Containerfile +++ b/Containerfile @@ -119,6 +119,7 @@ RUN rm /usr/share/applications/shredder.desktop && \ mkdir -p "/usr/etc/profile.d/" && \ ln -s "/usr/share/ublue-os/firstboot/launcher/login-profile.sh" \ "/usr/etc/profile.d/ublue-firstboot.sh" && \ + cp "/usr/share/ublue-os/firstboot/yafti.yml" "/etc/yafti.yml" && \ pip install --prefix=/usr yafti && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_kylegospo-bazzite.repo && \ From 56938e2c241d5304b4cc5babe56ede741570f22f Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Sun, 6 Aug 2023 14:02:52 -0600 Subject: [PATCH 2/4] fix: Remove flatpak caching, use network connection instead (#110) * fix: Stop caching flatpaks These take up way too much space in images * fix(flatpak-system-install): Require network connection * fix(flatpak-system-install): Restart on failure * fix(gnome): Add Silverblue flatpaks to install list * fix(flatpak-system-install): Silence errors on package removal A package may not be removed for a number of reasons, for example if someone were to rebase from Kinoite to Bazzite GNOME, they wouldn't have the GNOME app suite installed from Silverblue * fix(deck): Don't try to install cached system flatpaks --- Containerfile | 5 ----- .../system/flatpak-system-install.service | 3 +++ .../shared/usr/bin/ublue-flatpak-system-install | 11 +++++------ .../desktop/silverblue/etc/flatpak/install | 17 ++++++++++++++++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Containerfile b/Containerfile index 264c65cf..8748698b 100644 --- a/Containerfile +++ b/Containerfile @@ -133,11 +133,6 @@ RUN rm /usr/share/applications/shredder.desktop && \ sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \ mkdir -p /etc/flatpak/remotes.d && \ wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /etc/flatpak/remotes.d && \ - cat /etc/flatpak/install | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \ - cat /etc/flatpak/deck | while read line; do flatpak install --system --noninteractive --no-deploy flathub $line; done && \ - mkdir -p /etc/flatpak/{flathub,objects} && \ - cp -r /var/lib/flatpak/repo/refs/remotes/flathub/* /etc/flatpak/flathub && \ - cp -r /var/lib/flatpak/repo/objects/* /etc/flatpak/objects && \ systemctl unmask flatpak-system-install.service && \ systemctl enable flatpak-system-install.service && \ systemctl disable rpm-ostreed-automatic.timer && \ diff --git a/system_files/desktop/shared/etc/systemd/system/flatpak-system-install.service b/system_files/desktop/shared/etc/systemd/system/flatpak-system-install.service index 7dd6b986..d6a1161d 100644 --- a/system_files/desktop/shared/etc/systemd/system/flatpak-system-install.service +++ b/system_files/desktop/shared/etc/systemd/system/flatpak-system-install.service @@ -1,10 +1,13 @@ [Unit] Description=Install System Flatpak on boot Documentation=https://github.com/ublue-os/endlish-oesque/issues/10 +Wants=network-online.target +After=network-online.target [Service] Type=oneshot ExecStart=/usr/bin/ublue-flatpak-system-install +Restart=on-failure [Install] WantedBy=multi-user.target diff --git a/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install b/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install index e6d82ec4..a56aa9fe 100755 --- a/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install +++ b/system_files/desktop/shared/usr/bin/ublue-flatpak-system-install @@ -2,23 +2,22 @@ source /etc/default/bazzite if [[ -f '/etc/flatpak/install' ]]; then - cp -r /etc/flatpak/flathub/* /var/lib/flatpak/repo/refs/remotes/flathub - cp -r /etc/flatpak/objects/* /var/lib/flatpak/repo/objects cat /etc/flatpak/install | while read line; do - flatpak install --system --noninteractive --no-pull flathub $line + flatpak install --system --noninteractive flathub $line done && mv /etc/flatpak/install /etc/flatpak/installed fi if [[ -f '/etc/flatpak/remove' ]]; then cat /etc/flatpak/remove | while read line; do - flatpak remove --system --noninteractive $line - done && mv /etc/flatpak/install /etc/flatpak/removed + flatpak remove --system --noninteractive $line 2>/dev/null + done + mv /etc/flatpak/remove /etc/flatpak/removed fi if [[ -f '/etc/flatpak/deck' ]]; then if [[ ${IMAGE_NAME} == *'deck'* ]]; then cat /etc/flatpak/deck | while read line; do - flatpak install --system --noninteractive --no-pull flathub $line + flatpak install --system --noninteractive flathub $line done && cat /etc/flatpak/deck >> /etc/flatpak/installed fi fi diff --git a/system_files/desktop/silverblue/etc/flatpak/install b/system_files/desktop/silverblue/etc/flatpak/install index dd1f8ac5..9cc717aa 100644 --- a/system_files/desktop/silverblue/etc/flatpak/install +++ b/system_files/desktop/silverblue/etc/flatpak/install @@ -2,9 +2,24 @@ net.davidotek.pupgui2 org.freedesktop.Platform.VulkanLayer.MangoHud//22.08 org.freedesktop.Platform.VulkanLayer.vkBasalt//22.08 io.github.Foldex.AdwSteamGtk -org.gnome.Loupe com.mattjakeman.ExtensionManager org.gtk.Gtk3theme.adw-gtk3 org.gtk.Gtk3theme.adw-gtk3-dark org.mozilla.firefox com.github.tchx84.Flatseal +org.gnome.Calculator +org.gnome.Calendar +org.gnome.Characters +org.gnome.Connections +org.gnome.Contacts +org.gnome.Evince +org.gnome.Extensions +org.gnome.Logs +org.gnome.Loupe +org.gnome.Maps +org.gnome.NautilusPreviewer +org.gnome.TextEditor +org.gnome.Weather +org.gnome.baobab +org.gnome.clocks +org.gnome.font-viewer From 9383c2fdb2bfd032c69f8d48131444b977e55e95 Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Sun, 6 Aug 2023 15:31:03 -0600 Subject: [PATCH 3/4] feat(gnome): Use GDM on desktop (#111) * feat(gnome): Use GDM on desktop Restores GDM on desktop and implements GNOME autologin with GDM support. This allows users to use screen locking. Omitted from Steam Deck as there isn't a seemingly clean way to implement this for session switching. Will investigate in the future * fix(gnome): Restore patched xorg-x11-server-Xwayland package for VRR --------- Co-authored-by: Kyle Gospodnetich --- Containerfile | 15 ++++++++++----- .../deck/silverblue/usr/bin/gnome-autologin | 14 ++++++++++++++ .../desktop/silverblue/etc/gdm/custom.conf | 16 ++++++++++++++++ .../desktop/silverblue/usr/bin/gnome-autologin | 13 +++++-------- 4 files changed, 45 insertions(+), 13 deletions(-) create mode 100755 system_files/deck/silverblue/usr/bin/gnome-autologin create mode 100644 system_files/desktop/silverblue/etc/gdm/custom.conf diff --git a/Containerfile b/Containerfile index 8748698b..6b213859 100644 --- a/Containerfile +++ b/Containerfile @@ -78,16 +78,20 @@ RUN if grep -qv "gnome" <<< "${IMAGE_NAME}"; then \ rpm-ostree install \ steamdeck-kde-presets-desktop \ wallpaper-engine-kde-plugin \ - kdeconnectd \ + kdeconnectd && \ + rpm-ostree override replace \ + --experimental \ + --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr \ + xorg-x11-server-Xwayland.spec \ ; else \ rpm-ostree override replace \ --experimental \ --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr \ mutter \ gnome-control-center \ - gnome-control-center-filesystem && \ + gnome-control-center-filesystem \ + xorg-x11-server-Xwayland.spec && \ rpm-ostree install \ - sddm \ steamdeck-backgrounds \ gradience \ adw-gtk3-theme \ @@ -140,8 +144,6 @@ RUN rm /usr/share/applications/shredder.desktop && \ systemctl enable displaylink.service && \ systemctl enable input-remapper.service && \ if grep -q "gnome" <<< "${IMAGE_NAME}"; then \ - systemctl disable gdm.service && \ - systemctl enable sddm.service && \ rm /usr/share/applications/yad-icon-browser.desktop \ ; fi && \ echo -e "IMAGE_NAME=${IMAGE_NAME}\nBASE_IMAGE_NAME=${BASE_IMAGE_NAME}\nIMAGE_FLAVOR=${IMAGE_FLAVOR}\nFEDORA_MAJOR_VERSION=${FEDORA_MAJOR_VERSION}" >> /etc/default/bazzite && \ @@ -212,6 +214,7 @@ RUN if grep -qv "gnome" <<< "${IMAGE_NAME}"; then \ ; else \ rpm-ostree install \ gnome-shell-extension-bazzite-menu \ + sddm \ ; fi # Install new packages & dock updater - done manually due to proprietary parts preventing it from being on Copr @@ -256,6 +259,8 @@ RUN rm /usr/share/applications/winetricks.desktop && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/_copr_ycollet-audinux.repo && \ mv /etc/sddm.conf /etc/sddm.conf.d/steamos.conf && \ if grep -q "gnome" <<< "${IMAGE_NAME}"; then \ + systemctl disable gdm.service && \ + systemctl enable sddm.service && \ systemctl enable gnome-autologin.service \ ; fi && \ if grep -qv "gnome" <<< "${IMAGE_NAME}"; then \ diff --git a/system_files/deck/silverblue/usr/bin/gnome-autologin b/system_files/deck/silverblue/usr/bin/gnome-autologin new file mode 100755 index 00000000..208a072b --- /dev/null +++ b/system_files/deck/silverblue/usr/bin/gnome-autologin @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +USER=$(id -nu 1000) + +# SteamOS SDDM config +SDDM_CONF='/etc/sddm.conf.d/steamos.conf' +if [ ! -f ${SDDM_CONF} ]; then + # Fallback to sddm.conf + SDDM_CONF = '/etc/sddm.conf' +fi + +# Configure autologin +sed -i 's/.*Session=.*/Session=gnome-xorg.desktop/g' ${SDDM_CONF} +sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF} diff --git a/system_files/desktop/silverblue/etc/gdm/custom.conf b/system_files/desktop/silverblue/etc/gdm/custom.conf new file mode 100644 index 00000000..0edf23fc --- /dev/null +++ b/system_files/desktop/silverblue/etc/gdm/custom.conf @@ -0,0 +1,16 @@ +# GDM configuration storage + +[daemon] +#AutomaticLoginEnable=True +#AutomaticLogin= +#WaylandEnable=false +#DefaultSession=gnome-xorg + +[security] + +[xdmcp] + +[chooser] + +[debug] +#Enable=true diff --git a/system_files/desktop/silverblue/usr/bin/gnome-autologin b/system_files/desktop/silverblue/usr/bin/gnome-autologin index 208a072b..c9180539 100755 --- a/system_files/desktop/silverblue/usr/bin/gnome-autologin +++ b/system_files/desktop/silverblue/usr/bin/gnome-autologin @@ -2,13 +2,10 @@ USER=$(id -nu 1000) -# SteamOS SDDM config -SDDM_CONF='/etc/sddm.conf.d/steamos.conf' -if [ ! -f ${SDDM_CONF} ]; then - # Fallback to sddm.conf - SDDM_CONF = '/etc/sddm.conf' -fi +# GDM config +GDM_CONF='/etc/gdm/custom.conf' # Configure autologin -sed -i 's/.*Session=.*/Session=gnome-xorg.desktop/g' ${SDDM_CONF} -sed -i 's/.*User=.*/User='${USER}'/g' ${SDDM_CONF} +sed -i 's/.*AutomaticLoginEnable=.*/AutomaticLoginEnable=true/g' ${GDM_CONF} +sed -i 's/.*AutomaticLogin=.*/AutomaticLogin='${USER}'/g' ${GDM_CONF} +sed -i 's/.*DefaultSession=.*/DefaultSession=gnome-xorg/g' ${GDM_CONF} From d6775a7f3918c667c96c631501a9f93f51208268 Mon Sep 17 00:00:00 2001 From: Kyle Gospodnetich Date: Sun, 6 Aug 2023 14:42:52 -0700 Subject: [PATCH 4/4] chore: Correct package name --- Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containerfile b/Containerfile index 9773b77a..10c83e45 100644 --- a/Containerfile +++ b/Containerfile @@ -82,7 +82,7 @@ RUN if grep -qv "gnome" <<< "${IMAGE_NAME}"; then \ rpm-ostree override replace \ --experimental \ --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr \ - xorg-x11-server-Xwayland.spec \ + xorg-x11-server-Xwayland \ ; else \ rpm-ostree override replace \ --experimental \ @@ -90,7 +90,7 @@ RUN if grep -qv "gnome" <<< "${IMAGE_NAME}"; then \ mutter \ gnome-control-center \ gnome-control-center-filesystem \ - xorg-x11-server-Xwayland.spec && \ + xorg-x11-server-Xwayland && \ rpm-ostree install \ steamdeck-backgrounds \ gradience \