Difference between revisions of "Vncserver"

From Notes_Wiki
m
m
 
Line 1: Line 1:
<yambe:breadcrumb self="Vncserver">Remote administration tools|Remote administration tools</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Remote administration tools]] > [[Vncserver]]


'''Latest vnc server notes are available at [[CentOS 7.x tigervnc-server]]'''
'''Latest vnc server notes are available at [[CentOS 7.x tigervnc-server]]'''
Line 60: Line 60:


   
   
<yambe:breadcrumb self="Vncserver">Remote administration tools|Remote administration tools</yambe:breadcrumb>
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Remote administration tools]] > [[Vncserver]]

Latest revision as of 15:56, 24 August 2022

Home > CentOS > CentOS 6.x > Remote administration tools > Vncserver

Latest vnc server notes are available at CentOS 7.x tigervnc-server

One time setup of tigervnc-server

It is possible to do graphical remote desktop on a machine using vncserver. Vncserver can be started remotely over SSH so direct physical access to computer is not required for enabling remote desktop. Use command 'vncserver :0' or 'vncserver :1'. It will prompt for server password. Type something safe of about 8 characters and repeat password. Note that this password would be permanently saved for future sessions also. If there is nothing already listening on port 5900 in case of :0 or port 5901 in case of :1 then vncserver will start easily. In case of error try :2, :3, etc.

Now use

  ssh -L 5901:127.0.0.1:5901 <username>@<host>

to connect to server assuming vncserver is listening on 5901 (:1). Then on the remote client use 'vncviewer 127.0.0.1:5901' to connect to desktop of remote server


Setup tigervnc-server as service

Instead of using vncserver just once, to setup it as service to always be available as part of system boot using:

  1. Disable selinux
  2. Dissble firewall
  3. Install tigervnc server
    yum install tigervnc-server -y
  4. If required, add local system OS users
    useradd <useraccount>
    passwd <useraccount>
  5. Create vnc password for user account
    #Get shell for corresponding user
    su - <useraccount>
    vncpasswd
  6. Create & modify vnc configuration file '/etc/sysconfig/vncservers' via root
    VNCSERVERS="2:<useraccount>"
    VNCSERVERARGS[2]="-geometry 1280x1024"
  7. To give vnc access to more users, modify /etc/sysconfig/vncservers in following manner
    VNCSERVERS="2:<useraccount> 3:<useraccount> 4:<useraccount>"
    VNCSERVERARGS[2]="-geometry 1280x1024"
    VNCSERVERARGS[3]="-geometry 1280x1024"
    VNCSERVERARGS[4]="-geometry 1280x1024"
  8. Start vnc server
    service vncserver start
    chkconfig vncserver on
  9. VNC server can access from windows machines using realvnc viewer.
    Download link for realvnc viewer https://www.realvnc.com/en/connect/download/viewer/windows/


Refer:


Home > CentOS > CentOS 6.x > Remote administration tools > Vncserver