Sunday, December 04, 2011

I use tightvnc a lot. It's a great way to keep the context of what you were doing going over time. Last weekend I set up a new Ubuntu 10.04 LTS based development box for developing Android applications. The problem was the vncserver I was using kept dying. It took awhile to figure out what the problem was -- I eventually noticed a line similar to the following in /var/log/messages:

Dec 4 09:18:00 bishop kernel: [317333.194448] Xtightvnc[8667]: segfault at 7fff3584c000 ip 000000000044e4f1 sp 00007fff3584a920 error 6 in Xtightvnc[400000+17e000]

After a bit more googling around, I found this article. That led me to this article explaining that the problem is in TightVNC 1.3.9 and is fixed in 1.3.10. It also explains how to implement the fix, but that implementation has some problems. So I set about fixing the problem myself. Below are the steps I came up with. They worked for me, but YMMV.

pushd ~
sudo apt-get install xorg-dev libjpeg62-dev zlib1g-dev xmkmf
mkdir -p vnc-problem/new
cd vnc-problem/new
wget http://www.tightvnc.com/download/1.3.10/tightvnc-1.3.10_unixsrc.tar.gz
tar xzf tightvnc-1.3.10_unixsrc.tar.gz
cd vnc_unixsrc
xmkmf
make World
cd Xvnc
./configure
time make
sudo mv /usr/bin/Xtightvnc /usr/bin/Xtightvnc-1.3.9
sudo cp programs/Xserver/Xvnc /usr/bin/Xtightvnc-1.3.10
sudo chown root:root /usr/bin/Xtightvnc-1.3.10
sudo chmod 755 /usr/bin/Xtightvnc-1.3.10
sudo update-alternatives --install /usr/bin/Xtightvnc Xtightvnc /usr/bin/Xtightvnc-1.3.9 50
sudo update-alternatives --install /usr/bin/Xtightvnc Xtightvnc /usr/bin/Xtightvnc-1.3.10 60
sudo update-alternatives --config Xtightvnc # choose Xtightvnc-1.3.10
sudo update-alternatives --set Xtightvnc /usr/bin/Xtightvnc-1.3.10
popd

If this doesn't work for you, then you can go back with this command:

sudo update-alternatives --set Xtightvnc /usr/bin/Xtightvnc-1.3.9

At some point, if I get the chance, I'll try my hand at updating the Ubuntu package itself so that this can be fixed once and for all.

Labels: , ,


Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?