Comment 162 for bug 185311

Revision history for this message
knarf (launchpad-ubuntu-f) wrote :

A good temporary solution to these problems is to copy Bryce's noxcb version of libx11 to a separate directory which you then prepend to LD_LIBRARY_PATH before starting problematic apps. A simple if somewhat hackish way to do that goes like this:

# go to your home directory, get the package, create directory
# and change ownership to normal user for now... makes it safer
# for hamfisted types who might rm -rf /usr accidentally when given the chance...

TMPDIR=$(mktemp -d)
cd $TMPDIR
wget -P $TMPDIR http://people.ubuntu.com/~bryce/Testing/libx11/libx11-6_1.1.3-1ubuntu2~noxcb_i386.deb
sudo mkdir -p /opt/LIBx11-noxcb
sudo chown $USER /opt/LIBx11-noxcb

# this produces a data.tar.gz, control.tar.gz and debian-binary file.
# The data.tar.gz contains the interesting bits, the rest is unimportant for this purpose

cd /opt/LIBx11-noxcb
ar x $TMPDIR/libx11-6_1.1.3-1ubuntu2~noxcb_i386.deb

# unpack data.tar.gz, move usr/lib -> /opt/LIBx11-noxcb/lib
# remove everything else which is not needed

tar zxf data.tar.gz
mv usr/lib .
rm -rf control.tar.gz data.tar.gz debian-binary usr

#revert ownership of the directory back to root)

cd
sudo chown -R root:root /opt/LIBx11-noxcb
rm -rf $TMPDIR

# that's all folks!

(this script is attached to this posting - as always check before you run to assure yourself that there are no nasty surprises hiding in there...)

You now have a directory called /opt/LIBx11-noxcb which only contains a lib directory with libX11.so.6.2.0 (and libX11.so.6 symlinked to this file). This directory is outside of package management so it will not be messed up by any updates, nor will installing the library this way mess up your system. If you want to run an app which needs this library you just prepend it to LD_LIBRARY_PATH before running the app. Like so:

LD_LIBRARY_PATH=/opt/LIBx11-noxcb/lib:$LD_LIBRARY_PATH name_of_app_to_run

If you have to do this very often you might want to create or change a startup script for said app...

Once the problems have been solved and xcb no longer gives locking problems you can just rm -rf /opt/LIBx11-noxcb...