Can't get VNC to work for the life of me

Hey everyone.

I’m not a linux pro by any means but I’ve followed this tutorial on starting VNC services within Suse 11.4 and just cannot get it to work.

TightVNC (VNC Xvnc) on openSUSE as Client or Server (Remote Desktop Connections)

I’ve installed the RPMs
Initialized passwords
Edited the xstartup file in VI for KDE 4.x
Started the VNC service using “dbus-launch vncserver”

And still cannot VNC into the SUSE machine from my Windows 7 workstation or my Windows Server 2003 workstation using both UltraVNC viewer and TightVNC viewer. Nothing.

Some help is greatly appreciated.

Firewall has 5900 open for this service, everything is being done on a LAN.

Side question: How do I edit a file in KWrite (instead of VI) from the bash shell?

Not good at all with VI and would rather edit files in KWrite, just don’t know how to launch it from bash…

Thanks everyone!

When you start VNC with dbus-launch vncserver, and nothing else, IIRC it defaults to window :1 (i.e. port 5901). So I am wondering how did you open the allowed service in the openSUSE firewall? I use YaST>Security and Users>Firewall, and then select “Alllowed Services” on the left. For “External Zone”, the “Service to allow”, by adding it, is VNC. That will open ports 5900 to 5999. For security, you should delete the “VNC” service using the same Firewall function when you have finished.

Hey consused,

Thanks for your reply.

I don’t have the SUSE firewall enabled since we’re testing various services on this VM and we have a hardware network firewall to take care of everything anyway.

I was able to launch VNC by running the dbus-launch vncserver command and browsing to my SUSE host at 10.x.x.x:7

:7 since that’s what I saw in bash after starting the VNC service

Oh, didn’t see any mention of a VM in your original post. I assume that post referred to 11.3 (just released) not 11.4. I’ve not run VNC in a VM environment, or used tightvnc from a client on Windows. I can confirm it works from openSUSE 11.3 client into vncserver on 11.3 (or 11.2) via internet connection. On the client I use vncviewer or KRDC, both work. Can I assume you don’t have another openSUSE system to test as a vnc client?

Check out this thread here, specifically post #62, but apologies if you have seen it already, tried the fix, or found it’s not appropriate to your setup.

BTW you should be able to run KWrite from the command line by typing kwrite (followed by arguments if any).

What happens when you start VNC server with a screen resolution explicitly specified? Like this for example:

dbus-launch vncserver -geometry 1024x768 :1

I was able to launch VNC by running the dbus-launch vncserver command and browsing to my SUSE host at 10.x.x.x:7

:7 since that’s what I saw in bash after starting the VNC service

This indicates that you have started quite a few instances of VNC. The first start will open the window using port 5901, the second port 5902 … and so on up to the current window/port 5907. Kill all the other ones by rebooting or by running the kill command “vncserver -kill :1”, then kill :2 and so on. Then run the command as “dbus-launch vncserver :1” and stick with a consistent channel/port.

I don’t have the SUSE firewall enabled since we’re testing various services on this VM and we have a hardware network firewall to take care of everything anyway.

We know from the first quote that the server is broadcasting. We know from the second quote that the signals are blocked by the hardware firewall.

You must open port TCP 5901 (or whatever port you’re broadcasting on) in the hardware firewall. You must also create a “service” in that firewall for VNC and apply “port forwarding” in the hardware firewall to direct the comms from the client on through to the IP address of the VM machine that carries the TightVNC server.

My second comment above assumes you’re trying to get in from the WAN side of your LAN. If not, then ignore it.