root@Ubuntu:~# startx hostname: Name or service not known xauth: file /root/.Xauthority does not exist xauth: (stdin):1: bad display name "Ubuntu:0"in"add"command
X.Org X Server 1.18.4 Release Date: 2016-07-19 X Protocol Version 11, Revision 0 Build Operating System: Linux 4.4.0-97-generic x86_64 Ubuntu Current Operating System: Linux Ubuntu 4.4.0-105-generic #128-Ubuntu SMP Thu Dec 14 12:42:11 UTC 2017 x86_64 Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.4.0-105-generic root=UUID=e2048966-750b-4795-a9a2-7b477d6681bf ro net.ifnames=0 quiet console=tty0 console=ttyS0,115200n8 Build Date: 13 October 2017 01:57:05PM xorg-server 2:1.18.4-0ubuntu0.7 (For technical support please see http://www.ubuntu.com/support) Current version of pixman: 0.33.6 Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Fri Feb 23 17:00:08 2018 (==) Using system config directory "/usr/share/X11/xorg.conf.d"
^Cxinit: connection to X server lost
waiting for X server to shut down (II) Server terminated successfully (0). Closing log file.
xinit: unexpected signal 2 xauth: (argv):1: bad display name "Ubuntu:0"in"remove"command
0x05.安装 realvnc 的 VNC Server
1 2 3 4 5
cd Downloads/ wget https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.2.1-Linux-x64-ANY.tar.gz tar zxvf VNC-Server-6.2.1-Linux-x64-ANY.tar.gz cd VNC-Server-6.2.1-Linux-x64/ ./vncinstall
############# Specify a VNC password for VNC Server ############# # Mandatory for Home subscription (except Raspberry Pi). Not required for Professional or Enterprise subscription. More information: # man vncpasswd # Specify a VNC password for VNC Server in Service Mode: sudo vncpasswd -service # Enterprise subscription only. Specify a VNC password for VNC Server in Virtual Mode: vncpasswd -virtual
只能是前8位,但还是连不上,The connection was refused by the computer:
1 2 3 4 5 6 7
root@Ubuntu:~/Downloads# vncpasswd -service Setting "Password" VNC parameter for Service Mode server Password: Verify: Successfully set"Password" VNC parameter in /root/.vnc/config.d/vncserver-x11 Please note users of third party VNC Viewer projects will be able to connect by entering the first 8 characters of this password only.