-2

How to configure vnc server in Linux (Cent OS7) server to access from windows and Linux machines.

I have tried with Tiger VNC but its not working every time after reboot the system. Please suggest other than Tiger VNC.

Sekhar
  • 53
  • 1
  • 2
  • 11
  • This questions is probably more proper on the StackExchange sites [**Super User**](http://superuser.com/) or [**ServerFault**](http://serverfault.com/) or [**Unix & Linux**](http://unix.stackexchange.com/) – David C. Rankin Aug 18 '16 at 15:21

2 Answers2

1

Given are the steps to install and configure VNC server in centOs:

  1. ~]# yum install tigervnc-server
  2. ~]# cp /usr/lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
  3. ~]# vim /etc/systemd/system/vncserver@:1.service

replaced USER with riddhi in this file

ExecStart=/usr/sbin/runuser -l USER -c "/usr/bin/vncserver %i -geometry 1280x1024"
PIDFile=/home/USER/.vnc/%H%i.pid
  1. ~]# systemctl daemon-reload
  2. ~]# su - riddhi
  3. ~]$ vncpasswd //update password for user riddhi
  4. ~]# systemctl start vncserver@:1.service
  5. ~]# systemctl enable vncserver@:1.service

Now connect to centOs from Windows:

  1. IP: ip address:5901

  2. password : password of vncpasswd

Riddhi Gohil
  • 1,758
  • 17
  • 17
0

Judging by your wording, it sounds like Tiger VNC is working just fine until you reboot. This is because the service is not set to start VNC automatically.

By following the guide found here (specifically step 3) you will have written your own .service file and all you need to do is run:

sudo systemctl enable whateveryoucalledyour.service

and it will start automatically every time the system is booted.