我安装了 12.04 LTS,我正在尝试让 VNC 工作。我希望能够连接到现有会话,并让它在启动时启动。我遵循了本指南并发表了评论以尝试解决我的问题,但没有骰子。我也尝试了我在谷歌上找到的所有解决方案,包括这里的解决方案,但我无法让它工作(我确信我错过了一些简单的东西)。
当我连接到 VNC 会话时,我会看到一个带有三个复选框的灰色屏幕:
这是我的 xstartup:
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
gnome-session -session=gnome-classic &
[ -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 &
Run Code Online (Sandbox Code Playgroud)
我还编辑了我的内容,包括:
/usr/bin/vncserver -geometry 1024x768
Run Code Online (Sandbox Code Playgroud)
它不会在启动时启动,但是当我运行命令时它会启动,但是我得到了灰屏。
小智 3
检查此链接上的解决方案
sudo vi .vnc/xstartup或者,您可以通过从终端运行来编辑位于主文件夹中的 xstartup 文件。
#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
gnome-session --session=gnome-classic &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 1280x1024+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
72856 次 |
| 最近记录: |