diff options
| author | Christian Rößler | 2013-05-10 15:03:15 +0200 |
|---|---|---|
| committer | Christian Rößler | 2013-05-10 15:03:15 +0200 |
| commit | 1a7f3585a7e05c6c047d3527d2c47d0152306efe (patch) | |
| tree | 3fa11f5628abc3bf8bf69ea752cbb9f64515a81b /remote/modules/xorg | |
| parent | commit (diff) | |
| parent | Remove unneeded packages from vmplayer.conf (diff) | |
| download | tm-scripts-1a7f3585a7e05c6c047d3527d2c47d0152306efe.tar.gz tm-scripts-1a7f3585a7e05c6c047d3527d2c47d0152306efe.tar.xz tm-scripts-1a7f3585a7e05c6c047d3527d2c47d0152306efe.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/modules/xorg')
| -rw-r--r-- | remote/modules/xorg/data/etc/X11/Xsession | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/remote/modules/xorg/data/etc/X11/Xsession b/remote/modules/xorg/data/etc/X11/Xsession index 529208cd..a9b3d43b 100644 --- a/remote/modules/xorg/data/etc/X11/Xsession +++ b/remote/modules/xorg/data/etc/X11/Xsession @@ -3,4 +3,36 @@ #Workaround to start Xsession. The original Xsession script includes error handling functionality and sources other scrips from the Xsession.d/ directory. #start selected session -exec $1 + case "$1" in + failsafe) + # Failsafe session was requested. + if [ -e /usr/bin/xterm ]; then + if [ -x /usr/bin/xterm ]; then + exec xterm -geometry +1+1 + else + # fatal error + errormsg "unable to launch failsafe X session ---" \ + "x-terminal-emulator not executable; aborting." + fi + else + # fatal error + errormsg "unable to launch failsafe X session ---" \ + "x-terminal-emulator not found; aborting." + fi + ;; + *) + # Specific program was requested. + STARTUP_FULL_PATH=$(/opt/openslx/usr/bin/which "${1%% *}" || true) + if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then + if [ -x "$STARTUP_FULL_PATH" ]; then + exec $1 + else + message "unable to launch \"$1\" X session ---" \ + "\"$1\" not executable; falling back to default session." + fi + else + message "unable to launch \"$1\" X session ---" \ + "\"$1\" not found; falling back to default session." + fi + ;; + esac |
