diff options
author | 2017-02-21 15:52:42 +0100 | |
---|---|---|
committer | 2017-02-21 15:52:42 +0100 | |
commit | f707ee9cdbe89d33d8fd78519558523975062964 (patch) | |
tree | 3a77bd3a9c2623a3e9adeb967218e98d6231c0b7 | |
parent | b96f6f3a8304b785bd54fa68cb0f92797cdc3ced (diff) | |
download | ktown-f707ee9cdbe89d33d8fd78519558523975062964.tar.gz ktown-f707ee9cdbe89d33d8fd78519558523975062964.tar.xz |
SDDM: add a wrapper script to allow localization of the UI
Exporting the LANG variable in /usr/share/sddm/scripts/Xsetup
is not working, apparently Xsetup is being started in its own
subshell and the LANG environment variable is not persistent.
-rw-r--r-- | kde/build/sddm-qt5 | 2 | ||||
-rw-r--r-- | kde/doinst.sh/sddm-qt5 | 3 | ||||
-rw-r--r-- | kde/post-install/sddm-qt5.post-install | 16 |
3 files changed, 20 insertions, 1 deletions
diff --git a/kde/build/sddm-qt5 b/kde/build/sddm-qt5 new file mode 100644 index 0000000..9a7456b --- /dev/null +++ b/kde/build/sddm-qt5 @@ -0,0 +1,2 @@ +2 + diff --git a/kde/doinst.sh/sddm-qt5 b/kde/doinst.sh/sddm-qt5 index c1364e2..d747215 100644 --- a/kde/doinst.sh/sddm-qt5 +++ b/kde/doinst.sh/sddm-qt5 @@ -78,4 +78,5 @@ fi if [ -f etc/sddm.conf.new ]; then config etc/sddm.conf.new fi - +# And our defaults file: +config etc/default/sddm.new diff --git a/kde/post-install/sddm-qt5.post-install b/kde/post-install/sddm-qt5.post-install index 15a6a1a..1a39fd0 100644 --- a/kde/post-install/sddm-qt5.post-install +++ b/kde/post-install/sddm-qt5.post-install @@ -4,3 +4,19 @@ rm -rf $PKG/etc/pam.d # Remove the sddm.conf file because we will generate our own in doinst.sh: rm -f $PKG/etc/sddm.conf +# Add a wrapper for the sddm binary, to enable a custom environment: +mv $PKG/usr/bin/sddm $PKG/usr/bin/sddm.bin +cat <<"EOT" > $PKG/usr/bin/sddm +#!/bin/sh +# Customized environment (LANG definition): +if [ -f /etc/default/sddm ]; then + . /etc/default/sddm +fi +/usr/bin/sddm.bin "$*" +EOT +chmod 0755 $PKG/usr/bin/sddm + +# Let's also add an example customization (localization of the UI): +mkdir -p $PKG/etc/default +echo ". /etc/profile.d/lang.sh" > $PKG/etc/default/sddm.new + |