Difference between revisions of "Vncserver"
(Created page with "<yambe:breadcrumb>Remote_administration_tools|Remote administration tools</yambe:breadcrumb> =vncserver= It is possible to do graphical remote desktop on a machine using vncs...") |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|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 '<tt>vncserver :0</tt>' or '<tt>vncserver :1</tt>'. 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. | 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 '<tt>vncserver :0</tt>' or '<tt>vncserver :1</tt>'. 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. | ||
Line 9: | Line 12: | ||
</pre> | </pre> | ||
to connect to server assuming vncserver is listening on 5901 (:1). Then on the remote client use '<tt>vncviewer 127.0.0.1:5901</tt>' to connect to desktop of remote server | to connect to server assuming vncserver is listening on 5901 (:1). Then on the remote client use '<tt>vncviewer 127.0.0.1:5901</tt>' 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: | |||
# Disable selinux | |||
# Dissble firewall | |||
# Install tigervnc server | |||
#:<pre> | |||
#:: yum install tigervnc-server -y | |||
#:</pre> | |||
# If required, add local system OS users | |||
#:<pre> | |||
#:: useradd <useraccount> | |||
#:: passwd <useraccount> | |||
#:</pre> | |||
# Create vnc password for user account | |||
#:<pre> | |||
#:: #Get shell for corresponding user | |||
#:: su - <useraccount> | |||
#:: vncpasswd | |||
#:</pre> | |||
# Create & modify vnc configuration file '<tt>/etc/sysconfig/vncservers</tt>' via root | |||
#:<pre> | |||
#:: VNCSERVERS="2:<useraccount>" | |||
#:: VNCSERVERARGS[2]="-geometry 1280x1024" | |||
#:</pre> | |||
# To give vnc access to more users, modify /etc/sysconfig/vncservers in following manner | |||
#:<pre> | |||
#:: VNCSERVERS="2:<useraccount> 3:<useraccount> 4:<useraccount>" | |||
#:: VNCSERVERARGS[2]="-geometry 1280x1024" | |||
#:: VNCSERVERARGS[3]="-geometry 1280x1024" | |||
#:: VNCSERVERARGS[4]="-geometry 1280x1024" | |||
#:</pre> | |||
# Start vnc server | |||
#:<pre> | |||
#:: service vncserver start | |||
#:: chkconfig vncserver on | |||
#:</pre> | |||
# 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: | |||
* https://www.unixmen.com/install-vnc/ | |||
[[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:
- Disable selinux
- Dissble firewall
- Install tigervnc server
- yum install tigervnc-server -y
- If required, add local system OS users
- useradd <useraccount>
- passwd <useraccount>
- Create vnc password for user account
- #Get shell for corresponding user
- su - <useraccount>
- vncpasswd
- Create & modify vnc configuration file '/etc/sysconfig/vncservers' via root
- VNCSERVERS="2:<useraccount>"
- VNCSERVERARGS[2]="-geometry 1280x1024"
- 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"
- Start vnc server
- service vncserver start
- chkconfig vncserver on
- 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