The VNC server on Ubuntu Edgy and Feisty is busted and that has been true for some time. However, the VNC server from Debian Etch works just fine on Ubuntu, with one simple work-around for font directory location. Here is how to get it working in Ubuntu Feisty:
- Download the latest vnc4-common package to your home directory via packages.debian.org.
- Download the latest vnc4-server package to your home directory via packages.debian.org
- Type the following at a command prompt:
- cd /usr/X11R6/lib/X11
- mkdir fonts note - don't worry if it says the directory already exists, that's okay.
- cd fonts
- mv encodings encodings- again, don't worry if it says encodings doesn't exist, that's okay.
- ln -s /usr/share/fonts/X11/* .
- cd
- dpkg -i vnc4-common*.deb
- dpkg -i vnc4server*.deb
- apt-get install xvnc4viewer
- Run vnc4server the first time:
- vnc4server -depth 16 -geometry 1024x768 :1
- If all went well, you should have been prompted for a new password to use for connecting to the vnc server, then it should have started. Connect to the vncserver to make sure it started up correctly:
- xvnc4viewer localhost:1
- You should have gotten a window with a rather sparse twm configuration. (If not, check the log file that the vnc4server command created to see why not!). This probably isn't what you want. So edit the file ~/.vnc/xstartup to look something like this (make a copy of the file to another name first!):
#!/bin/sh
export KDEHOME="${HOME}/.vnckde"
xrdb $HOME/.Xresources
vncconfig &
startkde &# gnome-session vncsession &
- If you don't want a separate eyecandy-less KDE configuration for your VNC sessions (I have lots of memory and CPU thus I run my regular KDE with lotsa eye candy but that really doesn't travel well over the Internet), remove the KDEHOME line. If you want gnome rather than kde, comment out the startkde line and uncomment the gnome-session line. I also specify a vnc-specific session for the gnome-session line so that it will (hopefully) co-exist with a desktop gnome session.
- Now you're ready to test your new startup:
- vnc4server -kill :1
- vnc4server -depth 16 -geometry 1024x768 :1
- xvnc4viewer localhost:1
Another issue: what to put for -geometry. I put 1024x768 but if you have a big screen on your client computer, you'll want to put something bigger (something smaller really doesn't work for a number of reasons to do with KDE and Gnome UI design). -depth 8 would be faster, but a number of programs will not work with that, thus -depth 16.
-- Badtux the Linux Penguin
Really?
ReplyDeleteInteresting.
But I have no fucking idea what you are talking about.
And frankly my dear, I don't give a damn because it will all change tomorrow.
God, the I don't give a fuck computer user as long as what I have does what I want it to.
What he said...
ReplyDeleted.
I hate hassles like you just described.
ReplyDeleteThis is probably the main reason I'm staying away from linux. I actually tried to set up a media server not long ago, but the capture cards I had weren't supported (one might have been if I followed an instruction set as in-depth as what you just laid out.) I threw a windows MCE AIO on it instead.
If I did need a lightweight machine just to run openoffice and firefox, or if I had a machine where everything worked, I'd definitely look at XUbuntu or Puppy.
Thanks for your efforts, it looks lots of people having problems on ubuntu / kubuntu with VNC. I tried to fallow your instruction, I've deinstaled ubuntus own vnc4-common and vnc4server packages and instaled debain packages as you sugested. I got warning that there is newer version, which I ignored. Install went ok. Problem occured when I executed
ReplyDeletedpkg -i vnc4server*.deb
igot errors:
dpkg: error processing vnc4server*.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
vnc4server*.deb
any ideas
thanks
Darko
Just make sure you're in the same directory as the vncserver deb! (i.e., make sure 'ls' shows the vncserver deb).
ReplyDelete-BT
Thanks, so for future pinguiners who may read this helpful howto:
ReplyDeleteafter you do
# ln -s /usr/share/fonts/X11/*
than find location of your package files
sloacte -u
slocate vnc4server
on my computer it was in
/var/cache/apt/archives
so next step is
cd /var/cache/apt/archives
than continue
# dpkg -i vnc4-common*.deb
etc...
ok, it works!
ReplyDeleteone problem, some aps dont'run, I tried Eclipse but I starts to load but than it just doesnt, no messages. Same with gimp. Could it be because they are gnome apps ( I am accessing KDE from my windows laptop)
Any ideas
Thanks for help so far
Darko
Sorry, Darko, what that means is that you managed to track down where apt-install had stashed the original Ubuntu vncserver dkpg's and re-install them :-). Download the Debian dpkg's again, REMEMBER WHERE YOU DOWNLOADED THEM TO, un-install the Ubuntu packages again, then install the Debian packages.
ReplyDeleteAs far as I know, the only program that just absolutely refuses to work with the Debian packages is Opera. No big loss, IMHO.
-BT
douhg, yes I reinstalled Ubuntu packages, that is why it didn't completely work.
ReplyDeleteNow I deinstaled them and installed Debian packages, and it all works
so OS community rocks
thanks again
darko
Why does Ubuntu ship a broken vncserver package for already a few months now? According to the RealVNC guys there's also a severe security risk! Do the Ubuntu package/release managers just don't care, or is there nobody competent enough to fix this problem?
ReplyDeleteIt's unclear whether the current Ubuntu vnc packages pose a security risk. They've been heavily patched. It is clear that they just plain don't work with any GTK+ program or with many other programs due to bugs. As to why it doesn't get fixed, beats me. But I'm running the Debian packages now, so other than Synaptic whining about how it has two updates to apply (the broken Ubuntu packages), I'm good to go.
ReplyDelete- BT
The current feisty vnc4server package seems to work fine if you start it with:
ReplyDelete-extension XFIXES
as noted in https://bugs.launchpad.net/ubuntu/edgy/+source/vnc4/+bug/78282/comments/57
Thanks Badtux,
ReplyDeleteYour instructions worked perfectly and saved me a lot of time in getting it up and running!
"edit ~/.vnc/xstartup " :D
ReplyDeleteyou saved my day!