1
# $Id: 20x11-common_process-args 305 2005-07-03 18:51:43Z dnusinow $
3
# This file is sourced by Xsession(5), not executed.
5
# Determine how many arguments were provided.
8
# No arguments given; use default behavior.
11
# One argument given; see what it was.
14
# Failsafe session was requested.
15
if grep -qs ^allow-failsafe "$OPTIONFILE"; then
16
if [ -e /usr/bin/x-terminal-emulator ]; then
17
if [ -x /usr/bin/x-terminal-emulator ]; then
18
exec x-terminal-emulator -geometry +1+1
21
errormsg "unable to launch failsafe X session ---" \
22
"x-terminal-emulator not executable; aborting."
26
errormsg "unable to launch failsafe X session ---" \
27
"x-terminal-emulator not found; aborting."
32
# Default behavior was requested.
35
# Specific program was requested.
36
STARTUP_FULL_PATH=$(/usr/bin/which "$1" || true)
37
if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
38
if [ -x "$STARTUP_FULL_PATH" ]; then
41
message "unable to launch \"$1\" X session ---" \
42
"\"$1\" not executable; falling back to default session."
45
message "unable to launch \"$1\" X session ---" \
46
"\"$1\" not found; falling back to default session."
52
# More than one argument given; we don't know what to do.
53
message "unsupported number of arguments ($#); falling back to default" \
58
# vim:set ai et sts=2 sw=2 tw=80: