I’ve changed my home server from Centos 5.1 (32bit) to Ubuntu Desktop 8.04 (64bit) due to the CentOS drive crashing – it was real old. As my server doesn’t actually have a screen when it’s carefully hidden away I initially enabled Remote Desktop for GUI access. This worked ok, although slightly sluggish, in conjunction with Chicken of the VNC running on my MacBook as the viewer.
Problems arose once I rebooted it without the monitor plugged in as it defaulted to 800×600 without any obvious way of controlling this. Things got real annoying though when I discovered that a number of dialogs are longer than 600 pixels and I couldn’t see half the windows. That’s a real basic thing which shouldn’t be wrong.
So I tried installing the VNC Server itself and running that with options specifying my desired resolution
sudo apt-get install vnc4server vncserver :1 -geometry 1024x768 -depth 16
only to be presented with X11 rather than the Gnome Desktop Manager when I connected. Of note is that when you first run vncserver it’ll ask you for a password and setup a ~/.vnc folder to store that and an xstartup script.
After a bit of a google I found a helpful post showing how to configure and launch vncserver through xinetd as well as powering up GDM. Follow it exactly as it works a treat. It’s part of a thread titled HOWTO: Set up VNC Server with resumable sessions.
Logging in though reveled a new problem – the Gnome Theme Setting manager was constantly crashing and causing the current theme to continually be applied then dropped. I was given this error “there was an error starting the GNOME settings daemon“.
Turns out this is a recent problem with the 4.1.1 version of vnc4server and the fix has yet to be rolled into a package for Ubuntu. I found custom deb files with the latest version of vnc. Francesco Santini has helpfully copied across the compiled binaries from the latest vncserver 4.1.2 Fedora 9 packages, which have the fix, into has own i386 deb files for people to download and install – no help for my 64bit install of Ubuntu though.
I actually tried looking for the vnc source code, thinking I could just compile that directly, but that route started proving harder than I thought it should. So, I’ve ended following Francesco’s lead and copying out the binaries from the Fedora VNC x86_64 packages manually like this:
wget ftp://rpmfind.net/linux/fedora/updates/9/x86_64.newkey/vnc-server-4.1.2-31.fc9.x86_64.rpm wget ftp://rpmfind.net/linux/fedora/updates/9/x86_64.newkey/vnc-libs-4.1.2-31.fc9.x86_64.rpm rpm2cpio vnc-server-4.1.2-31.fc9.x86_64.rpm | cpio -dimv rpm2cpio vnc-libs-4.1.2-31.fc9.x86_64.rpm | cpio -dimv
And then copy them over top of my existing vnc binaries like so:
sudo cp usr/bin/* /usr/bin sudo cp usr/lib64/xorg/modules/extensions/libvnc.so /usr/lib64/xorg/modules/extensions sudo cp usr/lib64/librfb.so.* /usr/lib64
If you don’t have ‘rpm2cpio’ you’ll have to install rpm itself, a bit unnecessary and self defeating sounding I know:
sudo apt-get install
I found the latest vnc-server and the vnc-libs Fedora 9 x86_64 packages on rpmfind.net.
After doing all that I seemed to have made the situation worse and was getting a connection denied error from my viewer. A but more hunting and the problem turned out to be that the Fedora binaries, Xvnc in particullar, were expecting the libcrypto package and for one of it’s binaries to be differently named. I figure that’s due to them being compiled for Fedora. The following sorted that problem:
sudo apt-get install libcrypto++7 libcrypto++-utils sudo ln -snf /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.7
From memory I don’t think vncserver had this problem, just Xvnc, making the issue a bit harder to diagnose as running vncserver manually allowed me to connect, but not with the GDM login.
Having done all that I can now login to GDM and don’t get the crazy theme errors anymore, plus it’s noticeably faster. Something I discovered is that Chicken of the VNC doesn’t disconnect when you close the viewer window – and thus you can’t reconnect until you have quit the application. A bit suck, but oh well.
During my travels I found that I could manually do what xinetd was doing with this command:
sudo vncserver :5 -geometry 1200x750 passwordFile=~/.vnc/passwd -query localhost -fp /usr/share/fonts/X11/misc
Additionally I discovered the ‘alien’ package which converts rpm files to deb, which might ultmately be an easier way to install the latest version of vncserver from Fedora while maintaining a single package system.
No related posts.
![[del.icio.us]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/digg.png)
![[dzone]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/dzone.png)
![[Fark]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/fark.png)
![[Google]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/linkedin.png)
![[Reddit]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/reddit.png)
![[Shoutwire]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/shoutwire.png)
![[Slashdot]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/slashdot.png)
![[Sphinn]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/sphinn.png)
![[StumbleUpon]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Technorati]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/technorati.png)
![[Twitter]](http://www.motionstandingstill.com/wp-content/plugins/bookmarkify/twitter.png)



5 Comments
Hi, Got this from Ubuntu Launchpad, ( Sorry dont recall the url ).
I can confirm it fixes the “Gnome Theme Setting manager” crashing when the Gnome session starts, tested on Ubuntu 8.04, using vnc4server ( latest version on the repodepo as @ 18/10/2008 ).
“I can confirm the problem being reported for VNC. The solution is this:
In your ~/.vnc/xstartup file put the following:
#!/bin/sh
vncconfig -iconic &
eval `dbus-launch –sh-syntax –exit-with-session`
gnome-session &
Then chmod 744 xstartup, and your problem should be fixed. Again, this only applies to the VNC issue.”
Worked a treat for me. :)
Ive had hell trying to get this VNC server working in my virtual machine ( after I setup years ago on my headless server )
*good tip, log all your actions that work for you and write up a how to guide ;) itl save your bacon, and maybe a few others will benefit too*
Cool, thanks for that, Certainly much easier than the solution I ended up following through with.
I couldn’t agree more with you about taking notes when installing or setting something up. I often hit up howtoforge.com which has some really good guides, but I’ve never followed one exactly so have had to cut and paste their guides into my own notes…
I did a quick search and found the post that WebWolf mentioned above.
Post url = https://launchpad.net/ubuntu/+source/control-center/+bug/61381/comments/63
Thread url = https://launchpad.net/ubuntu/+source/control-center/+bug/61381
Slight update, for anyone that’s unable to get vnc4server working with anything other than an x-session ( grey screen with a black x cursor ).
All the guides Ive seen seem to bring in the workaround of backpedalling to use vncserver ( example, the xstartup file mentioned above, is only read by vncserver not vnc4server *vncserver is included with vnc4server for backward compatability* )
This is a known bug in the latest version of vnc4server.
Workaround:
**Follow the guides for setting up vnc4server but instead of using the new vnc4server just use the old gutsy version ( may not have the latest security updates, but it works perfectly and loads your default x-session first time )**
edit your repodepo sources list:
gksudo gedit /etc/apt/sources.list
:to include:
deb http://gb.archive.ubuntu.com/ubuntu/ gutsy main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ gutsy-updates main restricted
deb http://gb.archive.ubuntu.com/ubuntu/ gutsy universe
deb http://gb.archive.ubuntu.com/ubuntu/ gutsy multiverse
:just paste them in at the top of the file.
now update your repodepo:
sudo apt-get update
:and downgrade / install the gutsy version of vnc4server:
sudo apt-get install vnc4server/gutsy
:the repos dont stay in ubuntu’s archive for ever, you may find a few posts stating you should use the edgy version, edgy has been removed from archive, but I can confirm that the gutsy version works as @ 22/10/2008.
The bug may have been resolved in the latest 8.10 version of ubuntu too, I havent tried yet. also if you would like to try different down/up grades, just swap out “gutsy” with the version you would like to test ( Ensure the version of ubuntu archives you would to test is listed here:
http://gb.archive.ubuntu.com/ubuntu/dists/
:happy hunting:
Thanks for documenting this. It worked perfectly for me.
One Trackback
[...] References: http://ubuntuforums.org/showthread.php?t=122402 http://www.motionstandingstill.com/setting-up-a-resumable-remote-login-to-ubuntu-with-vnc/2008-10-13... [...]