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

Kristian Høgsberg krh at bitplanet.net
Wed Sep 29 16:23:31 PDT 2004

Corey Hickey wrote:
> The output for setxkbmap -print under XFree86 is exactly the same as the
> first output reported above. Your message gave me enough of a clue to
> start messing around, and I noticed something on the console output that
> didn't show up in the log:
> /usr/local/X11R6cvs/lib/X11/xkb/xkbcomp: error while loading shared
> libraries: libxkbfile.so.1: cannot open shared object file: No such file
> or directory
> The next line is in the log, but I failed to notice it before:
> (EE) Couldn't load XKB keymap, falling back to pre-XKB keymap
> That seems to be the culprit.

Indeed.  When using xkb, the xkb code handles vt switching and if the 
xkb keymaps can't be parsed the ctrl+alt+fn keys aren't bound to the vt 
switch symbols.

 > I messed around with ldd on the console
> and it seemed that libxkbfile.so.1 wasn't found until I `export
> LD_LIBRARY_PATH=/usr/local/X11R6cvs/lib/` after which ldd showed all the
> libraries. The strange thing is, I have LD_LIBRARY_PATH set in the
> console from which I start xorg. I tried unsetting LD_LIBRARY_PATH, and
> it did make a difference: xorg wouldn't load, with the console output
> saved and attached as nold.log.

The X server strips out all LD* variables from the environment for 
security.  See xc/programs/Xserver/os/utils.c:1847.

> So, I added the following line to /etc/ld.so.conf:
> /usr/local/X11R6cvs/lib
> and re-ran ldconfig. Lo and behold, xorg ran and I could switch VT and
> resolution! The successful output is attached as ldconfig.log. So, it
> seems the library path is the culprit.
> However, I'm hesitant to leave that line in ld.so.conf - I don't want to
> interfere with the XFree86 programs I'm using yet. So, my question becomes:
> Why doesn't defining LD_LIBRARY_PATH work for xkbcomp, while it clearly
> works and allows xorg in general to load? Is the variable not
> "inherited" properly, or is it still PEBCAK? Also, I just checked the
> xterm after xorg loads (without the modification in /etc/ld.so.conf but
> with LD_LIBRARY_PATH) and LD_LIBRARY_PATH is still defined there.

If you're just playing around with the X server on your local box, you 
could just flip the #define in utils.c


More information about the xorg mailing list