vnc 启动 x windows 但不启动窗口管理器

vnc 启动 x windows 但不启动窗口管理器

我正在尝试通过隧道使用 VNC 实现远程桌面。有人可以提供建议吗?

目前,当我通过 vnc 远程访问我的计算机时,我只看到灰色屏幕。我可以从命令行打开计算机上的窗口,但不能用鼠标管理它们(例如最小化、移动它们等)。这就像我运行了 X,但没有窗口管理器。

我使用以下命令启动 vncserver:

vncserver :1 -geometry 1920x1080 -depth 24 -dpi 96

(我已尝试过其他变体,例如单独使用 vncserver:1,或 -depth 32)。

我正在运行 18.04.2 LTS (Bionic Beaver),我使用 xfce 作为窗口管理器

我尝试了各种各样的 xstartup 文件。这是它现在的样子,但你可以看到我一直在寻找正确的设置……到目前为止还没有找到。

#!/bin/bash

#xrdb $HOME/.Xresources
# Add the following line to ensure you alwayus haver an xterm available
#( while true ; do xterm ; done ) &
#exec /usr/bin/gnome-session
# 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 &
#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
exec startxfce4
#twm &
#if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
#       eval `dbus-launch --sh-syntax –exit-with-session`
#       echo "D-BUS per-session daemon address is: \
#       $DBUS_SESSION_BUS_ADDRESS"
#fi
#exec  gnome-session

这是我的(已删除的)日志文件:

24/08/19 21:57:25 Xvnc version TightVNC-1.3.10
24/08/19 21:57:25 Copyright (C) 2000-2009 TightVNC Group
24/08/19 21:57:25 Copyright (C) 1999 AT&T Laboratories Cambridge
24/08/19 21:57:25 All Rights Reserved.
24/08/19 21:57:25 See http://www.tightvnc.com/ for information on TightVNC
24/08/19 21:57:25 Desktop name 'X' (niobiumnitride:1)
24/08/19 21:57:25 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
24/08/19 21:57:25 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
/usr/bin/startxfce4: X server already running on display :1

24/08/19 21:57:33 Got connection from client XX.XX.XX.XX
24/08/19 21:57:33 Using protocol version 3.8
24/08/19 21:57:33 Full-control authentication passed by XX.XX.XX.XX
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 16
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 22
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 21
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 15
24/08/19 21:57:33 Using zlib encoding for client XX.XX.XX.XX
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -314
24/08/19 21:57:33 Enabling full-color cursor updates for client 18.25.10.197
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -223
24/08/19 21:57:33 Pixel format for client XX.XX.XX.XX:
24/08/19 21:57:33   8 bpp, depth 6
24/08/19 21:57:33   true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
24/08/19 21:57:33 Using raw encoding for client 18.25.10.197
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 22
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 21
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 16
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 15
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -314
24/08/19 21:57:33 Enabling full-color cursor updates for client 18.25.10.197
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -223
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 16
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 22
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 21
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding 15
24/08/19 21:57:33 Using zlib encoding for client XX.XX.XX.XX
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -314
24/08/19 21:57:33 Enabling full-color cursor updates for client 18.25.10.197
24/08/19 21:57:33 rfbProcessClientNormalMessage: ignoring unknown encoding -223
24/08/19 21:57:33 Pixel format for client XX.XX.XX.XX:
24/08/19 21:57:33   32 bpp, depth 24, little endian
24/08/19 21:57:33   true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
24/08/19 21:57:33   no translation needed
24/08/19 21:57:38 Client 18.25.10.197 gone
24/08/19 21:57:38 Statistics:
24/08/19 21:57:38   key events received 0, pointer events 600
24/08/19 21:57:38   framebuffer updates 3, rectangles 132, bytes 46979
24/08/19 21:57:38     cursor shape updates 3, bytes 1668
24/08/19 21:57:38     raw rectangles 1, bytes 17292
24/08/19 21:57:38     zlib rectangles 128, bytes 28019
24/08/19 21:57:38   raw bytes equivalent 10385316, compression ratio 229.200768

相关内容