Add a new contrib/desktopentry-setlang/ mechanism
authorJon Trulson <jon@radscan.com>
Sun, 26 Jan 2020 18:54:38 +0000 (11:54 -0700)
committerJon Trulson <jon@radscan.com>
Sun, 26 Jan 2020 18:54:38 +0000 (11:54 -0700)
This was supplied by Antonis Tsolomitis
<antonis.tsolomitis@gmail.com>, and allows you to hardcode a LANG
setting before starting up CDE, if your login manager does not do that
for you.

cde/contrib/desktopentry-setlang/README-cde-alt [new file with mode: 0644]
cde/contrib/desktopentry-setlang/cde-alt.desktop [new file with mode: 0644]
cde/contrib/desktopentry-setlang/startxsession.sh [new file with mode: 0644]

diff --git a/cde/contrib/desktopentry-setlang/README-cde-alt b/cde/contrib/desktopentry-setlang/README-cde-alt
new file mode 100644 (file)
index 0000000..9d61334
--- /dev/null
@@ -0,0 +1,18 @@
+This is another method to setup an xsession which allows you to execute
+commads before the CDE Xsession gets executed. 
+This alternate method is useful when for example you need to 
+set a different language.
+
+In this example we 
+1. have the login manager execute /usr/dt/bin/startxsession.sh script
+2. The /usr/dt/bin/startxsession.sh first sets properly the LANG variable
+       (or you can add whatever you want to execute before CDE Xsession starts)
+       and then executes /usr/dt/bin/Xsession which will start CDE.
+
+To install, after you edit the startxsession.sh to your liking, do as root:
+
+cp /path/to/cdesktopenv-code/cde/contrib/desktopentry/cde-alt.desktop /usr/share/xsessions/
+cp /path/to/cdesktopenv-code/cde/contrib/desktopentry/startxsession.sh /usr/dt/bin/
+chmod ugo+rx /usr/dt/bin/startxsession.sh
+
+
diff --git a/cde/contrib/desktopentry-setlang/cde-alt.desktop b/cde/contrib/desktopentry-setlang/cde-alt.desktop
new file mode 100644 (file)
index 0000000..41c71b5
--- /dev/null
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=CDE
+Comment=Use this session to boot into the Common Desktop Environment
+Keywords=Common Desktop Environment
+Exec=/usr/dt/bin/startxsession.sh
+Icon=Dtlogo.pm
+Type=Application
diff --git a/cde/contrib/desktopentry-setlang/startxsession.sh b/cde/contrib/desktopentry-setlang/startxsession.sh
new file mode 100644 (file)
index 0000000..34608c4
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+export PATH=$PATH:/usr/dt/bin
+export LANG=el_GR.UTF-8
+/usr/dt/bin/Xsession
+