Xorg 6.8.1: can't switch VT or resolution (partially solved)

Corey Hickey bugfood-ml at fatooh.org
Wed Oct 20 22:04:17 PDT 2004

Glynn Clements wrote:
> One possible solution for this specific case is to rename the xkbcomp
> executable, and replace it with a script which re-sets LD_LIBRARY_PATH
> before running the original executable.

Wow, that actually worked. Interesting idea, thanks. I used:

export LD_LIBRARY_PATH=/usr/local/X11R6.8/lib
cat | $LD_LIBRARY_PATH/X11/xkb/xkbcomp.bin "$@"

That allows me to use setxkbmap directly, or just leave it out and let X
run xkbcomp on its own. That's probably the cleanest solution so far to
the xkb problem, though I'm open to suggestions if anybody has other ideas.

>>==========second question==========
>>I had some trouble earlier because I was using:
>>setxkbmap -print | xkbcomp - $DISPLAY
>>...in my xinitrc. It actually seems that $DISPLAY is not set until
>>later; I suppose this is xinit's fault, but does anyone know exactly
>>when $DISPLAY is set? I'm just curious.
> $DISPLAY *should* be set for the xinitrc script, otherwise none of the
> clients which are started in that script will work. Environment
> variables are passed down from parent to child; if it isn't set in the
> parent (i.e. xinitrc), it won't be set in the child, and nothing which
> xinit does subsequently will change that.

Ok, it looks like this one is officially PEBKAC. I was using a "here
document" to create the xinitrc from within my xorg startup script, and
was mistakenly under the impression that bash would not perform any
variable expansion. I just re-read the section on here documents in the
bash man page and the way to prevent expansion is to quote the EOF, like

cat > some.file << "EOF"

After making that change, referencing $DISPLAY works fine. Oops.


More information about the xorg mailing list