summaryrefslogblamecommitdiffstats
path: root/desktop/gnome-session/0002-gnome-session-add-profile-sourcing.patch
blob: a50466c28c5cc8b21f6b93726a692944d522e197 (plain) (tree)
1
2
                                                                                                                      
                                                                                           















                                                                                                   


     












                                                                                                                        
diff -Naur gnome-session-42.0/gnome-session/gnome-session.in gnome-session-42.0-patched/gnome-session/gnome-session.in
--- gnome-session-42.0/gnome-session/gnome-session.in	2022-03-21 15:13:31.651419000 -0500
+++ gnome-session-42.0-patched/gnome-session/gnome-session.in	2022-11-13 12:24:01.155570483 -0600
@@ -1,5 +1,13 @@
 #!/bin/sh
 
+# Include gnome-shell's custom built schemas in XDG_DATA_DIRS,
+# which allows the new settings to show up in dconf-editor:
+SYS_DATADIR=/usr/share
+ALT_DATADIR=$SYS_DATADIR/gnome-shell/gsettings-desktop-schemas
+if [ -e "$ALT_DATADIR" ]; then
+  export XDG_DATA_DIRS=$ALT_DATADIR:$SYS_DATADIR:$XDG_DATA_DIRS
+fi
+
 if [ "x$XDG_SESSION_TYPE" = "xwayland" ] &&
    [ "x$XDG_SESSION_CLASS" != "xgreeter" ] &&
    [  -n "$SHELL" ] &&
@@ -13,6 +21,16 @@
   fi
 fi
 
+# Force blocaled to update LANG according to /etc/profile.d/lang.sh:
+if [ -f /etc/profile.d/lang.sh ]; then
+  (
+  source /etc/profile.d/lang.sh
+  busctl call org.freedesktop.locale1 /org/freedesktop/locale1 org.freedesktop.locale1 SetLocale "asb" 1 "LANG=$LANG" 0
+  )
+  # If we are GDM then source /etc/profile.d/lang.sh for real:
+  [ "x$XDG_SESSION_CLASS" = "xgreeter" ] && source /etc/profile.d/lang.sh
+fi
+
 SETTING=$(G_MESSAGES_DEBUG='' gsettings get org.gnome.system.locale region)
 REGION=${SETTING#\'}
 REGION=${REGION%\'}