Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to start vncserver with the following command--

/sbin/service vncserver start

This is the error I am getting--

Starting VNC server: no displays configured 

How do I setup vncserver correctly?

share|improve this question

Easy steps to confgure VNC:

  1. Create a user (e.g., user1).
  2. Edit the /etc/sysconfig/vncservers file. Enter the below entry in the file.

    VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost" 
  3. Login through user (user1).

  4. Execute ls -la in the user's home directory and check whether the .vnc directory exists.
  5. If not, run the vncpasswd command. It will ask for a password. Give a password you want to keep.
  6. Check the user home directory again for the existence of the .vnc directory.
  7. Start the vncserver service with service vncserver start.

For more details, see man vncserver(1), vncpasswd(1).

share|improve this answer

I got that error after a fresh install of Centos 6.3 i386. The issue is that /etc/sysconfig/vncservers needs to be filled out. There are some basic instructions in that file's comments. I added the following:

VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -localhost"

After doing that I could start the server but there are some other steps before you can get going. I found out how to do this and the remaining configuration at

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .