1. 安装VNC服务

sudo apt-get install vnc4server -y

2. 启动VNC服务

vncserver :1

3. 此时客户端连上后你会发现灰屏,原因出在~/.vnc/xstart这个配置文件,在最后加上如下参数即可:

#!/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 grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &

gnome-session &
gnome-panel &
gnmoe-settings-daemon &
metacity &
nautilus &
gnome-terminal &

4. 再连,你会发现只有nautilus文件浏览器。

5. 安装gnome-panel

sudo apt-get install gnome-panel -y

6. 设置开机启动,crontab -e中加入以下行:

@reboot /usr/bin/vncserver :1

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
猜你喜欢
  • 2021-05-17
  • 2022-12-23
  • 2021-08-16
  • 2021-10-09
  • 2021-09-25
  • 2022-12-23
  • 2022-01-21
相关资源
相似解决方案