1. Install vnc4server Server Installation: After the sudoapt-getinstallvnc4server is installed, The vncserver will let you enter the account and password entered during the vnc client login after installation vncserver will be in HOME /. generate an xstartup file under vnc to modify the file. Change the twm started by default VNC to the gnome modification method that you want to start. Comment out all the three lines following the file, and add gnome to the end.
1. Install vnc4server
Server Installation: sudo apt-get install vnc4server
After the installation, executing vncserver will allow you to enter the account and password you entered when logging on to the vnc client.
After installation, the vncserver generates the xstartup file in HOME/. vnc.
Modify this file and change the default VNC-enabled twm to the gnome
The modification method is to comment out all the three lines after the file, and add gnome-session & my file content to the end
#! /Bin/sh
# Uncomment the following two lines for normal desktop:
# Unset SESSION_MANAGER
# 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 &
Gnome-session &
2. Enter after restarting
Sudo reboot
Vncserver startup Service
I do not know whether the other part is useful or not, and I have not verified it. If not, you can add or compile the file.
sudo vi /etc/X11/xorg.conf
The content is as follows. We recommend that you copy it directly.
Section "Device" Identifier "VNC Device" Driver "vesa" EndSection Section "Screen" Identifier "VNC Screen" Device "VNC Device" Monitor "VNC Monitor" SubSection "Display" Modes "1024x768" EndSubSection EndSection Section "Monitor" Identifier "VNC Monitor" HorizSync 30-70 VertRefresh 50-75 EndSection
3. Add vncserver to the auto-start item