[neon/snap-packaging/plasma-core-desktop] /: Remove the ubuntu-desktop-session

Kevin Ottens null at kde.org
Wed Jun 12 20:34:37 BST 2024


Git commit 871fd8bfcce72f7179256a977be34504fcb42470 by Kevin Ottens.
Committed on 12/06/2024 at 16:12.
Pushed by ervin into branch 'master'.

Remove the ubuntu-desktop-session

D  +0    -27   hooks/002-add-locales.chroot
M  +6    -98   hooks/006-add-gdm.chroot
M  +0    -17   hooks/007-admin-console.chroot
M  +0    -3    hooks/900-cleanup-etc-var.chroot
D  +0    -8    static/usr/share/wayland-sessions/ubuntu-desktop-session.desktop

https://invent.kde.org/neon/snap-packaging/plasma-core-desktop/-/commit/871fd8bfcce72f7179256a977be34504fcb42470

diff --git a/hooks/002-add-locales.chroot b/hooks/002-add-locales.chroot
deleted file mode 100755
index f4881ed..0000000
--- a/hooks/002-add-locales.chroot
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh -x
-
-set -e
-# Download all the base locale languages and keep
-# only the Gtk and Gnome ones.
-
-ORIG_BASE_DIR="/usr/share/locale-langpack"
-DEST_BASE_DIR="/usr/share/locale"
-
-apt install -y '^language-pack-gnome-[a-z]+-base$'
-
-for PATH in "$ORIG_BASE_DIR"/*; do
-    LANG=$(/bin/basename "$PATH")
-    DESTINATION="$DEST_BASE_DIR"/"$LANG"/LC_MESSAGES/
-    /bin/mkdir -p "$DESTINATION"
-    for FILENAME in coreutils.mo ibus10.mo gtk40.mo gtk30.mo gnome-shell.mo gnome-control-center-2.0.mo gnome-desktop-3.0.mo gnome-initial-setup.mo gnome-menus-3.0.mo language-selector.mo xdg-desktop-portal-gnome.mo xdg-desktop-portal.mo ibus-chewing.mo nautilus.mo nautilus-share.mo gnome-terminal.mo gdm.mo xdg-user-dirs.mo xdg-user-dirs-gtk.mo; do
-        FULL_PATH="$PATH"/LC_MESSAGES/"$FILENAME"
-        if [ -f "$FULL_PATH" ]; then
-            /bin/cp -a "$FULL_PATH" "$DESTINATION"
-        fi
-    done
-done
-
-/bin/rm -rf "$ORIG_BASE_DIR"
-/bin/rm -rf /usr/share/doc/language-pack-*
-/bin/rm -rf /usr/share/help-langpack
-/bin/rm -rf /usr/share/gnome/help-langpack/synaptic
diff --git a/hooks/006-add-gdm.chroot b/hooks/006-add-gdm.chroot
index 8dc7cce..e4373ec 100755
--- a/hooks/006-add-gdm.chroot
+++ b/hooks/006-add-gdm.chroot
@@ -14,49 +14,15 @@ apt install --no-install-recommends -y \
     libgl1-mesa-dri \
     locales-all \
     locales \
-    zenity \
-    yaru-theme-gtk \
-    yaru-theme-gnome-shell \
-    yaru-theme-icon \
-    fonts-ubuntu \
-    ubuntu-settings \
     xdg-user-dirs \
     pipewire \
     wireplumber \
-    pipewire-pulse \
-    pulseaudio-utils \
-    libgsound0 \
-    gsound-tools \
-    gir1.2-gsound-1.0 \
-    libcanberra-pulse \
-    libsnapd-glib1 \
-    ibus
+    pipewire-pulse
 
 # Install a basic Ubuntu session
 apt install --no-install-recommends -y \
-    ubuntu-session \
-    gkbd-capplet \
-    gnome-menus \
-    gnome-terminal \
-    gnome-settings-daemon \
-    gnome-shell-extension-appindicator \
-    gnome-shell-extension-desktop-icons-ng \
-    gnome-shell-extension-ubuntu-dock \
-    gnome-shell-extension-ubuntu-tiling-assistant \
-    gnome-control-center \
-    gnome-keyring \
-    fprintd \
-    libpam-fprintd \
-    opensc \
-    bolt \
-    libpam-gnome-keyring \
-    spice-vdagent \
-    xdg-desktop-portal \
-    xdg-desktop-portal-gnome \
-    xdg-desktop-portal-gtk \
-    xdg-user-dirs-gtk \
-    inotify-tools \
-    alsa-ucm-conf
+    pkexec \
+    xdg-desktop-portal
 
 mkdir /var/lib/sddm
 chown sddm:sddm /var/lib/sddm
@@ -69,9 +35,6 @@ apt install --no-install-recommends -y \
 # Remove setuid from some executables we're not using
 chmod u-s,g-s /usr/bin/pkexec
 
-# Remove Ubuntu X11 session
-rm /usr/share/xsessions/ubuntu.desktop
-
 # Move display-manager.service symlink out of /etc
 rm /etc/systemd/system/display-manager.service
 ln -s sddm.service /lib/systemd/system/display-manager.service
@@ -91,39 +54,21 @@ CompositorCommand=kwin_wayland --no-lockscreen --no-global-shortcuts --locale1
 EOF
 ln -s writable/sddm/sddm.conf /etc/sddm.conf
 
-
-# Remove D-Bus service activation files provided by
-# ubuntu-desktop-session snap.
-rm /usr/share/dbus-1/services/org.gnome.Nautilus.service
-rm /usr/share/dbus-1/services/org.gnome.Terminal.service
-rm /usr/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gnome.service
-rm /usr/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service
-rm /usr/share/dbus-1/services/org.gnome.Shell.Screencast.service
-rm -f /usr/share/dbus-1/services/org.freedesktop.IBus.service
-rm -f /usr/share/dbus-1/services/org.freedesktop.portal.IBus.service
-rm -f /usr/share/dbus-1/services/org.freedesktop.ColorHelper.service
-
-# Remove un-needed D-Bus service activation files
-rm -f /usr/share/dbus-1/services/org.gnome.evolution.dataserver.*
-
 # Remove systemd activation in services managed by
-# ubuntu-desktop-session snap
+# plasma-desktop-session snap
 rm -f /usr/lib/systemd/user/pipewire*
 rm -f /usr/lib/systemd/user/wireplumber*
 rm -rf /etc/systemd/user/pipewire*
 rm -f /etc/systemd/user/sockets.target.wants/pipewire*
 rm -f /etc/systemd/user/default.target.wants/pipewire*
-rm -f /usr/lib/systemd/user/org.freedesktop.IBus.session.GNOME.service
 rm -f /usr/lib/systemd/user/org.freedesktop.IBus.session.generic.service
-rm -f /usr/lib/systemd/user/gnome-session.target.wants/org.freedesktop.IBus.session.GNOME.service
-rm -f /usr/lib/systemd/user/colord-session.service
 
-# Disable console-conf, since it interferes with GDM taking over
+# Disable console-conf, since it interferes with SDDM taking over
 # /dev/tty1.  Due to the ExecStartPre/ExecStopPost commands, we can't
 # reliably get rid of it with Conflicts/After
 touch /var/lib/console-conf/complete
 
-# gnome-initial-setup uses AccountsService to create the user account.
+# ubuntu init uses AccountsService to create the user account.
 # AccountsService in turn calls /usr/sbin/adduser.  Replace that
 # script with a wrapper that adds the --extrausers argument.
 #
@@ -136,45 +81,8 @@ exec /usr/sbin/adduser.real --extrausers "$@"
 EOF
 chmod a+x /usr/sbin/adduser
 
-# Force gsd-xsettings to use the regular DISPLAY connection. If it
-# tries to connect to :1, gnome-shell will not auto-start Xwayland.
-mv /usr/libexec/gsd-xsettings /usr/libexec/gsd-xsettings.real
-cat <<\EOF > /usr/libexec/gsd-xsettings
-#!/bin/sh
-export GNOME_SETUP_DISPLAY="$DISPLAY"
-exec /usr/libexec/gsd-xsettings.real "$@"
-EOF
-chmod a+x /usr/libexec/gsd-xsettings
-
 # accounts-daemon uses systemd to lock down the paths it can write
 # to. That list of paths does not include the extrausers database used
 # by Ubuntu Core.
 sed -i "/^ReadWritePaths=/ a \\  /var/lib/extrausers/ \\\\" \
     /usr/lib/systemd/system/accounts-daemon.service
-
-# Hide gnome-terminal by default
-sed -i 's/OnlyShowIn=/NoDisplay=true\nOnlyShowIn=/g' /usr/share/applications/org.gnome.Terminal.desktop
-
-# change default wallpapers
-cp /usr/share/gnome-background-properties/ubuntu-wallpapers.xml /usr/share/gnome-background-properties/ubuntu-core-desktop-wallpapers.xml
-sed -i 's/warty-final-ubuntu.png/ubuntu-core-desktop-l.png/g' /usr/share/gnome-background-properties/ubuntu-core-desktop-wallpapers.xml
-sed -i 's/ubuntu-wallpaper-d.png/ubuntu-core-desktop-d.png/g' /usr/share/gnome-background-properties/ubuntu-core-desktop-wallpapers.xml
-sed -i 's/warty-final-ubuntu.png/ubuntu-core-desktop-l.png/g' /usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override
-sed -i 's/ubuntu-wallpaper-d.png/ubuntu-core-desktop-d.png/g' /usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override
-glib-compile-schemas /usr/share/glib-2.0/schemas
-
-# Remove regular Ubuntu sessions, so only confined session is available
-rm -f /usr/share/wayland-sessions/ubuntu.desktop
-rm -f /usr/share/wayland-sessions/ubuntu-wayland.desktop
-rm -f /usr/share/xsessions/ubuntu-xorg.desktop
-
-# Move GDM config to writable directory
-#mkdir -p /etc/writable/gdm3
-#mv /etc/gdm3/custom.conf /etc/writable/gdm3/custom.conf
-#ln -s ../writable/gdm3/custom.conf /etc/gdm3/custom.conf
-
-# Disable gnome-shell systemd
-rm -f /usr/lib/systemd/user/org.gnome.Shell*
-
-# Stop "gnome-language-selector" showing in the Dash
-rm -f /usr/share/applications/gnome-language-selector.desktop
diff --git a/hooks/007-admin-console.chroot b/hooks/007-admin-console.chroot
index eb59a5c..2100074 100755
--- a/hooks/007-admin-console.chroot
+++ b/hooks/007-admin-console.chroot
@@ -8,20 +8,3 @@ ssh -aXq -o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHos
 EOF
 
 chmod a+x /usr/bin/admin-console
-
-# Create desktop entry for Console
-cat >/usr/share/applications/admin-console.desktop<<EOF
-[Desktop Entry]
-Name=Console
-Comment=Console
-Keywords=console;shell;prompt;command;commandline;cmd;
-Exec=gnome-terminal -- /usr/bin/admin-console
-Icon=org.gnome.Terminal
-Type=Application
-Categories=System;
-StartupNotify=true
-StartupWMClass=AdminConsole
-SingleMainWindow=false
-OnlyShowIn=GNOME;
-X-Ubuntu-Gettext-Domain=gnome-terminal
-EOF
diff --git a/hooks/900-cleanup-etc-var.chroot b/hooks/900-cleanup-etc-var.chroot
index 98a91df..c3a4071 100755
--- a/hooks/900-cleanup-etc-var.chroot
+++ b/hooks/900-cleanup-etc-var.chroot
@@ -67,9 +67,6 @@ rm -rf /var/log/journal
 # systemd-tmpfiles creates this new dir now
 rmdir /var/log/private
 
-# gdm3 creates this
-rm -rf /var/log/gdm3
-
 # clean leftovers from the build
 rm -rf /var/log/*
 
diff --git a/static/usr/share/wayland-sessions/ubuntu-desktop-session.desktop b/static/usr/share/wayland-sessions/ubuntu-desktop-session.desktop
deleted file mode 100644
index 4b25eca..0000000
--- a/static/usr/share/wayland-sessions/ubuntu-desktop-session.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Name=Ubuntu (confined)
-Comment=This session logs you into Ubuntu
-Exec=core-desktop-session-wrapper.sh plasma-desktop-session.ubuntu-desktop-session ubuntu:GNOME
-TryExec=/snap/bin/plasma-desktop-session.ubuntu-desktop-session
-Type=Application
-DesktopNames=ubuntu:GNOME
-X-GDM-SessionRegisters=true



More information about the Neon-commits mailing list