VNC connection closing

I can connect to my file server (32bit opensuse 11.1 running as a samba and nfs server) via VNC both from tightvnc <ip>:5901 and the java web vnc <ip>:5801.

However for both as soon as I enter login creds the session gets terminated and I get the following errors.

java web vnc- network error; remote side closed connection.

tightvnc- connection closed

Server side I have all the VNC options enabled in the firewall settings.

Is there something that I am missing? Any log files I could be checking for more info?


If using KDE4 there is a bug for KDE. The workaround for KDE4 version is to start it with this:

dbus-launch vncserver

If not using KDE4; e.g. if using KDE3 or Gnome, then continue to use the standard command (vncserver).

For the web browser version, you view it a special way (only necessary if viewing KDE4): here’s a quote:

…address the remote desktop as usual with this address in Firefox on port
The login screen appears. BEFORE YOU LOGIN, use the drop-down box at top left,
labelled “Options”, to select Cursor Shape Updates = Disable

Both of these are covered in more detail here:

Of course, if you’re not serving out KDE4 desktop, tnen none of the above is relevant to your situation.

Incidentally, I thought you had to start a tightvnc viewing episode with this command:

vncviewer <ip>:1

rather than this command:

tightvnc <ip>:5901

Both those methods work for tightVNC…

Yes I am using kde4, I will try this later on today.Hopefully dbus-launch vncserver will fix this issue.

From with in my home network Cursor Shape Updates = Disable works, but if I try to access it from outside it fails before I can get to the options.

Thank for you help.

dbus-launch vncserver

OK, forgive me for being thick in the head. Do I just run that code once to config vnc? OR do I need to add that as a start up process or script?

I haven’t tried the following, but it makes sense, so try it out and tell us how it goes:

Set your normal user to automatic login (so it will boot to the KDE4 desktop).
Create a cron job to do the following at boot time: sleep for 10 seconds, maybe 20; then execute the command: dbus-launch vncserver

I just tried it – works OK. But I wonder about the ruggedness of the method, in the sense of what happens if the computer shuts down unexpectedly, like in a power failure, and then reboots as I imagine you have set it to reboot when the power is reconnected. Can you try that out and let me know?