Enable VNC service configuration in Ubuntu
Ubuntu Server Configuration
Install vncserver
$ Sudo apt-get install vnc4server
Enable the vnc service
If you want to access the root user's desktop environment, use sudo vncserver. If you want to access the current normal user's environment, you can directly use vncserver.
At the first startup, you must set a password to be used for client access. You can use vncpasswd to modify the password later.
$ Vncserver
After vnc is started successfully, A. vnc directory is generated in the main directory.
Modify the existing xstartup file for graphical access
If you access the xstartup file from the client without modifying the file, a gray interface will appear. Obviously this is not what we want.
$ Vim ~ /. Vnc/xstartup
Modify file content:
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
Unset SESSION_MANAGER
Unset DBUS_SESSION_BUS_ADDRESS
# Exec/etc/X11/xinit/xinitrc
[-X/etc/vnc/xstartup] & exec/etc/vnc/xstartup
[-R $ HOME/. Xresources] & xrdb $ HOME/. Xresources
Xsetroot-solid gray
Vncconfig-iconic &
X-terminal-emulator-geometry 80x24 + 10 + 10-ls-title "$ VNCDESKTOP Desktop "&
# X-window-manager &
Export top_session = ubuntu-2d
Export GDMSESSION = ubuntu-2d
Export STARTUP = "/usr/bin/gnome-session = ubuntu-2d"
$ STARTUP
Restart the vnc service
After the modification, if you have enabled the vncserver service, you need to use:
$ Vncserver-kill: 1
(Here is the default desktop number 1, which can be modified as needed) to kill the running desktop service and then restart the service:
$ Vncserver: 1
When a new session is generated and the client reconnects, a graphical interface is displayed.
Client Configuration
Install vncviewer or use boxes installed by default by Fedora. Enter the address:
Vnc: // 192.168.31.192: 5901
Enter the password you set during connection.
Install VNC Server in CentOS 6.5 for graphical access
VNC installation Configuration
Install and configure VNC in CentOS 6.3
In Linux, the dependency installation VNC is not detected.
CentOS6 VNC service installation and configuration
Configure and install VNC in CentOS
VNC remote control installation and Setup
Windows accesses Ubuntu through VNC
Install VNC for accessing Ubuntu 12.04 through Windows Remote Desktop