Liunx(Debian8下测试可以)环境安装TightVNC+Gnome远程桌面环境

第一、更新系统版本

apt-get update
apt-get upgrade

我们登录已经安装好的 Debian9 环境中,然后更新系统源,出现需要继续的时候输入Y回车就可以。

第二、安卓GNOME桌面软件

apt-get -y install gnome

第三、安装必要的字体文件

apt-get -y install xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi xfonts-75dpi-transcoded xfonts-base

这些字体一定要安装,要不登录桌面之后我们看到的可能会出现乱码。

第四、安装Tight服务器

apt-get install tightvncserver

安装之后我们才可以设置密码和登录桌面使用。

第五、TightVNC暂停工作

tightvncserver -kill :1

第六、编辑~/.vnc/xstartup文件

#!/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 grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
#gnome-session &
x-session-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &

把里面的内容全部替换成上面的。

若没有.Xresources文件,可以复制如下内容创建

!===============================
! – Setting for xterm
! ——————–
XTerm*locale: true
XTerm*utf8Title: true
XTerm*fontMenu*fontdefault*Label: Default
XTerm*faceName: Courier 10 Pitch:antialias=True:pixelsize=18
!中文字体
XTerm*faceNameDoublesize: Microsoft YaHei:antialias=True:pixelsize=12
!中文输入
XTerm*inputMethod: ibus
XTerm*faceSize: 20
XTerm*faceSize1: 20
XTerm*faceSize2: 20
XTerm*faceSize3: 20
XTerm*faceSize4: 20
XTerm*faceSize5: 20
XTerm*faceSize6: 20
XTerm.cjkWidth:true
XTerm*background: #C7EDCC
XTerm*foreground: #000000
XTerm*scrollBar: true
XTerm*rightScrollBar: true
XTerm*jumpScroll: true
XTerm*SaveLines: 1000

XTerm*VT100.Translations: #override \n
Ctrl <KeyPress> V: insert-selection(CLIPBOARD,PRIMARY,CUT_BUFFER0) \n                                                
<BtnUp>: select-end(CLIPBOARD,PRIMARY,CUT_BUFFER0) \n                                                                
Ctrl <KeyPress> P: print() \n                                                                                        
                                                                                                                     
!———————-                                                                                                            
!- End of setting Xterm                                                                                              
!=========================

第七、开启使用

tightvncserver -geometry 1024x720 :1

启动VNC之后,我们就可以通过客户端的VNCVIEW软件链接,TightVNC客户端工具也可以链接的。