Take the 2-minute tour ×

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
add comment

2 Answers

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.

  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
add comment

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 http://wiki.centos.org/HowTos/VNC-Server

share|improve this answer
add comment

Your Answer


