Re: Readline initialization in .bash_profile -> Xquartz crash
Re: Readline initialization in .bash_profile -> Xquartz crash
- Subject: Re: Readline initialization in .bash_profile -> Xquartz crash
- From: Harald Hanche-Olsen <email@hidden>
- Date: Tue, 19 Feb 2008 12:18:01 +0100 (CET)
+ Knut Arild Lisæter <email@hidden>:
> -"set bell-style visible" in .bash_profile
That is the wrong way to set it: It should be in .inputrc, not in
.bash_profile. When you put this in .bash_profile, the effect is to
replace the shell's arguments "$@" by the two words "bell-style" and
"visible". So when the X11 launch procedure runs
/bin/bash --login /usr/X11/bin/startx
the unamusing consequence is that bash runs
/usr/X11/bin/startx bell-style visible
which, as far as I can read the startx script, should result in
xinit xterm bell-style visible -- ...
where the serverbit (marked ...) don't concern us here.
If you edit /usr/X11/bin/startx adding a line "set -x" just before it
runs xinit near the end, you can see this quite clearly in the
resulting log file. How that apparently results in xterm receiving an
argument "xterm", is beyond me. (If I run xterm bell-style visible
from the command line, it complains about "bell-style", not "xterm".)
To Jeremy: This way of running startx is clearly dangerous, as the
user's .bash_profile can easily corrupt the argument vector of the
shell. If you really need to do this, you will have to wrap an extra
script or program around startx, or maybe invoke it via a hard link
named /usr/X11/bin/startx-noargs and add code like
case "$0" in
*-noargs) set -- ;;
esac
to it (untested).
- Harald
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden