简而言之:如何通过 VNC 使用 Plasma 桌面环境?
我正在运行带有 KDE Plasma 5.24.7(“Kubuntu”映像安装)的 Ubuntu 22.04.3 LTS。
物理登录机器没问题,而且用户界面看起来很棒。现在我想使用远程桌面之类的东西访问机器,我认为 VNC 是最好的选择。
tightvncserver
因此我在机器上安装并运行,基本上遵循本指南:
sudo apt install tightvncserver
tightvncserver :1
我现在可以使用 RealVNC 客户端从 Windows 进行远程登录。但是,屏幕一片空白。
因此我回到我的机器进行更改~/.vnc/xstartup
,使其看起来像这样:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
重新启动 VNC 服务器后,我现在可以远程登录并实际查看和使用桌面,但环境当然现在是 Xfce,而不是像我使用物理访问时那样的 KDE Plasma。
使用 VNC 时如何使用 KDE?xstartup
我需要哪个命令?
我已经尝试过startkde &
,startx &
但startplasma-x11 &
所有这些都只会导致屏幕变成灰色。
具体来说,我发现本指南建议如下xstartup
:
#!/bin/sh
# Start up the standard system desktop
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/usr/bin/cinnamon-session
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
x-window-manager &
现在我在 VNC 连接时看到了 Plasma 加载启动画面,但几秒钟后屏幕变黑了。TightVNC 的完整错误日志如下:
03/01/24 11:37:50 Xvnc version TightVNC-1.3.10
03/01/24 11:37:50 Copyright (C) 2000-2009 TightVNC Group
03/01/24 11:37:50 Copyright (C) 1999 AT&T Laboratories Cambridge
03/01/24 11:37:50 All Rights Reserved.
03/01/24 11:37:50 See http://www.tightvnc.com/ for information on TightVNC
03/01/24 11:37:50 Desktop name 'X' (canis-major:1)
03/01/24 11:37:50 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
03/01/24 11:37:50 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
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: xrender >= 0.5 required to create pixmap cursors
kdeinit5: preparing to launch '/usr/lib/x86_64-linux-gnu/libexec/kf5/klauncher'
kdeinit5: Launched KLauncher, pid = 32195, result = 0
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: QXcbConnection: XCB error: 2 (BadValue), sequence: 355, resource id: 32, major code: 53 (CreatePixmap), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 356, resource id: 8388619, major code: 55 (CreateGC), minor code: 0
qt.qpa.xcb: QXcbConnection: XCB error: 9 (BadDrawable), sequence: 357, resource id: 8388619, major code: 55 (CreateGC), minor code: 0
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kdeinit5: opened connection to :1
qt.qpa.xcb: XKeyboard extension not present on the X server
Initializing "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/kcms/systemsettings/kcm_style.so"
kdeinit5: Got SETENV 'GTK_RC_FILES=/etc/gtk/gtkrc:/home/robert/.gtkrc:/home/robert/.config/gtkrc' from launcher.
kdeinit5: Got SETENV 'GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/robert/.gtkrc-2.0:/home/robert/.config/gtkrc-2.0' from launcher.
QDBusConnection: error: could not send signal to service "" path "//home/robert/.kde/share/config/kdeglobals" interface "org.kde.kconfig.notify" member "ConfigChanged": Invalid object path: //home/robert/.kde/share/config/kdeglobals
Initializing "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/kcms/systemsettings/kcm_fonts.so"
Initializing "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/kcms/systemsettings/kcm_mouse.so"
Xlib: extension "XInputExtension" missing on display ":1".
kdeinit5: Got SETENV 'XCURSOR_THEME=breeze_cursors' from launcher.
kdeinit5: Got SETENV 'XCURSOR_SIZE=24' from launcher.
org.kde.plasma.session: process job "kcminit_startup" finished with exit code 0
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
Warning: Setting a new default format with a different version or profile after the global shared context is created may cause issues with context sharing.
The X11 connection broke: Unsupported extension used (code 2)
XIO: fatal IO error 0 (Success) on X server ":1"
after 183 requests (5 known processed) with 0 events remaining.
qt.qpa.xcb: XKeyboard extension not present on the X server
Qt: Session management error: networkIdsList argument is NULL
Xlib: extension "MIT-SCREEN-SAVER" missing on display ":1".
kdeinit5: Got SETENV 'SESSION_MANAGER=local/canis-major:@/tmp/.ICE-unix/32251,unix/canis-major:/tmp/.ICE-unix/32251' from launcher.
kdeinit5: Got SETENV 'SESSION_MANAGER=local/canis-major:@/tmp/.ICE-unix/32251,unix/canis-major:/tmp/.ICE-unix/32251' from launcher.
Initializing "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/kcms/systemsettings/kcm_kgamma.so"
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/powerdevil.desktop" ("/usr/lib/x86_64-linux-gnu/libexec/org_kde_powerdevil")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/baloo_file.desktop" ("/usr/lib/x86_64-linux-gnu/libexec/baloo_file")
Initializing "/usr/lib/x86_64-linux-gnu/qt5/plugins/plasma/kcms/systemsettings/kcm_touchpad.so"
kcm_touchpad: Using X11 backend
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/org.kde.plasmashell.desktop" ("/usr/bin/plasmashell")
Xlib: extension "XInputExtension" missing on display ":1".
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/xembedsniproxy.desktop" ("/usr/bin/xembedsniproxy")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/polkit-kde-authentication-agent-1.desktop" ("/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1")
kwin_platform_x11_standalone: Compositing disabled: no composite extension available
kwin_core: Compositing is not possible
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/kaccess.desktop" ("/usr/bin/kaccess")
Baloo File Indexing has been disabled
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/pam_kwallet_init.desktop" ("/usr/share/libpam-kwallet-common/pam_kwallet_init")
kf.config.core: "\"fsrestore1\" - conversion of \"0,0,0,0\" to QRect failed"
kf.config.core: "\"fsrestore2\" - conversion of \"0,0,0,0\" to QRect failed"
kwin_core: Failed to update gamma ramp for output KWin::X11PlaceholderOutput(0x55c9cb2ee1e0, name="Placeholder-0", geometry=QRect(0,0 1920x1080), scale=1)
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 536, resource id: 20971525, major code: 18 (ChangeProperty), minor code: 0
qt.qpa.xcb: XKeyboard extension not present on the X server
kde.xembedsniproxy: could not load damage extension. Quitting
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 544, resource id: 20971526, major code: 18 (ChangeProperty), minor code: 0
Xlib XKB extension major= 1 minor= 0
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
New PolkitAgentListener 0x5613b941ae00
Adding new listener PolkitQt1::Agent::Listener(0x5613b94433a0) for 0x5613b941ae00
Listener online
X server has not matching XKB extension
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 564, resource id: 41943045, major code: 18 (ChangeProperty), minor code: 0
Authentication agent result: true
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/pulseaudio.desktop" ("/usr/bin/start-pulseaudio-x11")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/org.kde.discover.notifier.desktop" ("/usr/lib/x86_64-linux-gnu/libexec/DiscoverNotifier")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/gmenudbusmenuproxy.desktop" ("/usr/bin/gmenudbusmenuproxy")
AUDIT: Wed Jan 3 11:37:51 2024: 32132 Xtightvnc: client 12 rejected from local host
Failure: Module initialization failed
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/xdg-user-dirs.desktop" ("/usr/bin/xdg-user-dirs-update")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/org.kde.kdeconnect.daemon.desktop" ("/usr/lib/x86_64-linux-gnu/libexec/kdeconnectd")
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
qt.qpa.xcb: XKeyboard extension not present on the X server
org.kde.powerdevil: org.kde.powerdevil.discretegpuhelper.hasdualgpu failed
org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed ""
org.kde.powerdevil: org.kde.powerdevil.backlighthelper.brightness failed
kf.plasma.quick: Applet preload policy set to 1
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/geoclue-demo-agent.desktop" ("/usr/libexec/geoclue-2.0/demos/agent")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/at-spi-dbus-bus.desktop" ("/usr/libexec/at-spi-bus-launcher", "--launch-immediately")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/im-launch.desktop" ("/usr/bin/sh", "-c", "if [ \"x$XDG_SESSION_TYPE\" = \"xwayland\" ] ; then exec env IM_CONFIG_CHECK_ENV=1 im-launch true; fi")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/spice-vdagent.desktop" ("/usr/bin/spice-vdagent")
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/kup-daemon.desktop" ("/usr/bin/kup-daemon")
kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
org.kde.plasma.session: Starting autostart service "/etc/xdg/autostart/snap-userd-autostart.desktop" ("/usr/bin/snap", "userd", "--autostart")
org.kde.powerdevil: DPMS extension not available
qt.qpa.xcb: XKeyboard extension not present on the X server
kup.daemon: "Kup is not enabled, enable it from the system settings module. You can do that by running kcmshell5 kup"
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 612, resource id: 58720261, major code: 18 (ChangeProperty), minor code: 0
org.kde.powerdevil: Handle button events action could not check for screen configuration
org.kde.powerdevil: The profile "AC" tried to activate "DimDisplay" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported
org.kde.powerdevil: The profile "AC" tried to activate "DPMSControl" a non-existent action. This is usually due to an installation problem, a configuration problem, or because the action is not supported
kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
org.kde.powerdevil: org.kde.powerdevil.chargethresholdhelper.getthreshold failed ""
org.kde.kscreen: Failed to request backend: unknown error
org.kde.powerdevil: Handle button events action could not check for screen configuration
QObject::connect(QObject, ConfigMonitor::Private): invalid nullptr parameter
org.kde.kscreen: Failed to request backend: unknown error
qml: PlasmaExtras.ScrollArea is deprecated. Use PlasmaComponents3.ScrollView instead.
trying to show an empty dialog
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:118:19: QML Loader: Binding loop detected for property "height"
file:///usr/share/plasma/shells/org.kde.plasma.desktop/contents/views/Desktop.qml:118:19: QML Loader: Binding loop detected for property "height"
The X11 connection broke: Unsupported extension used (code 2)
XIO: fatal IO error 2 (No such file or directory) on X server ":1"
after 478 requests (441 known processed) with 0 events remaining.
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 819, resource id: 46137350, major code: 15 (QueryTree), minor code: 0
kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
kf.notifications: env says KDE is running but SNI unavailable -- check KDE_FULL_SESSION and XDG_CURRENT_DESKTOP
03/01/24 11:37:53 Got connection from client 127.0.0.1
03/01/24 11:37:53 Using protocol version 3.8
03/01/24 11:37:53 Full-control authentication passed by 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 24
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 16
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 22
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 21
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 15
03/01/24 11:37:53 Using zlib encoding for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -314
03/01/24 11:37:53 Enabling full-color cursor updates for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -223
03/01/24 11:37:53 Pixel format for client 127.0.0.1:
03/01/24 11:37:53 8 bpp, depth 6
03/01/24 11:37:53 true colour: max r 3 g 3 b 3, shift r 4 g 2 b 0
03/01/24 11:37:53 Using raw encoding for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 24
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 22
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 21
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 16
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 15
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -314
03/01/24 11:37:53 Enabling full-color cursor updates for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -223
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 24
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 16
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 22
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 21
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding 15
03/01/24 11:37:53 Using zlib encoding for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -314
03/01/24 11:37:53 Enabling full-color cursor updates for client 127.0.0.1
03/01/24 11:37:53 rfbProcessClientNormalMessage: ignoring unknown encoding -223
03/01/24 11:37:53 Pixel format for client 127.0.0.1:
03/01/24 11:37:53 32 bpp, depth 24, little endian
03/01/24 11:37:53 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
03/01/24 11:37:53 no translation needed
kdeconnect.core: Could not query capabilities from notifications server
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 857, resource id: 8388622, major code: 18 (ChangeProperty), minor code: 0
03/01/24 11:38:25 Client 127.0.0.1 gone
03/01/24 11:38:25 Statistics:
03/01/24 11:38:25 key events received 2, pointer events 37
03/01/24 11:38:25 framebuffer updates 683, rectangles 39590, bytes 9729171
03/01/24 11:38:25 cursor shape updates 3, bytes 1092
03/01/24 11:38:25 raw rectangles 1, bytes 17292
03/01/24 11:38:25 zlib rectangles 39586, bytes 9710787
03/01/24 11:38:25 raw bytes equivalent 820767620, compression ratio 84.370986
类似但对我没有帮助的问题: