Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want access a VNC Server running on a linux machine from windows client, without using any password. Is that possible?

share|improve this question

migrated from stackoverflow.com Oct 6 '09 at 0:48

This question came from our site for professional and enthusiast programmers.

2 Answers 2

It depends on the VNC Server, but yes, the ones I've seen have an option whether to use a password or not. Question is: why on earth would you want anyone to be able to connect?

share|improve this answer

If you just want to remote to a server, most modern distros now have an option, "remote desktop", which is just a polite way of saying "run a VNC server attached to the current X session". If you enable this, and as long as you stay logged in at the console, you'll be able to remote to the server.

I'm going to guess that you're really trying to say "I don't want the password dialog to appear, but I want to log into a Linux box remotely". This is doable, but it does require some setup, and you may encounter some conflicts on newer distros.

First, if you are after something that more-closely resembles a Citrix session (where each user has an individual remote desktop), you'll want to disable the option I mentioned above. If it's turned on, you'll end up with a port conflict.

Next, you'll want to install a VNC server that has session support. I would recommend TightVNC over the stock VNC package, not only because it has support for compression, but it also seems to "play better" when authenticating against display managers.

  • Red Hat/CentOS:
yum remove vnc && yum install tightvnc
  • Debian/Ubuntu:
apt-get update && apt-get remove vnc ; apt-get install tightvnc

You'll want to create a new entry for your inet superserver service (inetd, xinetd, etc.) The idea is that you will dynamically create a connection for each client attempt. You'll want this because using a daemon that runs statically will not properly spawn off a subprocess for each connection attempt.

The entry for the inetd/xinetd server will have display size, color depth, etc. embedded into it. I would recommend something like 15 or 16 bpp, and a display around 1000x700 (the remaining 68 pixels will be taken up by your windows/linux/mac client at the bottom and top of the client display, and you'll have 12 pixels of "edge" on each side on a 1024x768 setup). If you require custom displays, you can create multiple entries, each with their own bit depth and display resolution. Yes, you can do custom resolutions, and some clients even support custom bit depths (12bpp, try it sometime...) This will provide you with some flexibility when connecting from different clients.

Finally, you'll want to enable remote logins on your display manager. Most distros will bundle GDM as the default, although it could be KDM, WDM, XDM, etc. so you'll need to investigate this to set it correctly.

Some examples:

http://www.simonsmess.com/ubuntu/vnc-to-gdm-with-login-it-can-work/

http://www.realvnc.com/pipermail/vnc-list/2000-December/019151.html

http://themadadmin.com/wp/?p=1225

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.