Bother. There is a third problem, a scope issue of some sort.
The errors in ~/.xsession.error go away if "has_options" is moved from Xsession to its own file in Xsession.d
I don't see why sourceing it should make any difference, but it does.
$ cat /etc/X11/Xsession.d/00
has_option () {
# Ensure that a later no-foo overrides an earlier foo
if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" == "$1" ]; then
return 0
else
return 1
fi
}
Also I changed a "=" to "==", but that should be cosmetic.
Bother. There is a third problem, a scope issue of some sort.
The errors in ~/.xsession.error go away if "has_options" is moved from Xsession to its own file in Xsession.d
I don't see why sourceing it should make any difference, but it does.
$ cat /etc/X11/ Xsession. d/00
has_option () {
# Ensure that a later no-foo overrides an earlier foo
if [ "$(echo "$OPTIONS" | grep -Eo "^(no-)?$1\>" | tail -n 1)" == "$1" ]; then
return 0
else
return 1
fi
}
Also I changed a "=" to "==", but that should be cosmetic.