私はこのガイドに従いました。RHELでVNCサーバーを構成するAlmaLinux 9.3
マイコンピュータにvnc接続を確立します。 VNCセッション中に表示される実際のデスクトップには、次の問題があります。
Firefox
なぜ予想されるのか、そしてXTerm
ウィンドウが表示されるのかわかりませんxfce4-session
。ただし、次のコマンドを入力するとデスクトップstartx
がxfce4
表示されます。
サービスファイルの状態を確認すると、何もすぐに目立たない。
● vncserver@:2.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:2.service; disabled; preset: disabled)
Active: active (running) since Fri 2024-01-05 17:22:54 GMT; 53s ago
Process: 11707 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :2 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Process: 11712 ExecStart=/usr/bin/vncserver :2 -geometry 1280x1024 (code=exited, status=0/SUCCESS)
Main PID: 11719 (Xvnc)
Tasks: 243 (limit: 48083)
Memory: 368.7M
CPU: 3.734s
CGroup: /system.slice/system-vncserver.slice/vncserver@:2.service
├─11719 /usr/bin/Xvnc :2 -alwaysshared -geometry 1920x1080 -securitytypes vncauth,tlsvnc -auth /home/user/.Xauthority -desktop "localhost:2 (user)" -fp catalogue:/etc/X11/fontpath.d -pn -rfbauth /home/user/.vnc/passwd -rfbport 5902
├─11737 dbus-launch --sh-syntax --exit-with-session
├─11738 /usr/bin/dbus-daemon --syslog --fork --print-pid 5 --print-address 7 --session
├─11773 /usr/bin/xterm -geometry 80x50-50+150
├─11774 /usr/lib64/firefox/firefox /usr/share/doc/HTML/index.html
├─11795 bash
├─11893 /usr/libexec/gvfsd
├─11912 /usr/libexec/xdg-desktop-portal
├─11919 /usr/libexec/xdg-document-portal
├─11925 /usr/libexec/xdg-permission-store
├─11932 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /home/user/.cache/doc
├─11947 /usr/libexec/xdg-desktop-portal-gtk
├─11957 /usr/libexec/at-spi-bus-launcher
├─11964 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
├─11971 /usr/libexec/at-spi2-registryd --use-gnome-session
├─12078 /usr/lib64/firefox/firefox -contentproc -parentBuildID 20231129035847 -prefsLen 27636 -prefMapSize 237382 -appDir /usr/lib64/firefox/browser {675b4206-c092-4a32-ab77-a4582e559da7} 11774 socket
├─12159 /usr/lib64/firefox/firefox -contentproc -childID 1 -isForBrowser -prefsLen 27830 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {4e1242e4-50f6-4731-9502-01745913ab95} 11774 tab
├─12223 /usr/lib64/firefox/firefox -contentproc -childID 2 -isForBrowser -prefsLen 32519 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {be1c4cbc-6d2c-4174-ae32-65e69f2566b1} 11774 tab
├─12269 /usr/lib64/firefox/firefox -contentproc -childID 3 -isForBrowser -prefsLen 32576 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {1ca48e96-b7d0-4844-9d74-b269aa003429} 11774 tab
├─12303 /usr/lib64/firefox/firefox -contentproc -childID 4 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {56c69dce-39f9-40bf-bff1-b24208d9e6c7} 11774 tab
├─12306 /usr/lib64/firefox/firefox -contentproc -childID 5 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {e114b097-4c1b-40ea-86c5-53d6d9cc3928} 11774 tab
└─12310 /usr/lib64/firefox/firefox -contentproc -childID 6 -isForBrowser -prefsLen 28144 -prefMapSize 237382 -jsInitLen 240916 -parentBuildID 20231129035847 -appDir /usr/lib64/firefox/browser {feaa6536-974f-4dc1-a1ff-bd923039c8d3} 11774 tab
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.portal.Documents'
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Activating service name='org.freedesktop.impl.portal.desktop.gtk' requested by ':1.5' (uid=1000 pid=11912 comm="/usr/libexec/xdg-desktop-portal " label="kernel")
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Activating service name='org.a11y.Bus' requested by ':1.8' (uid=1000 pid=11947 comm="/usr/libexec/xdg-desktop-portal-gtk " label="kernel")
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Successfully activated service 'org.a11y.Bus'
Jan 05 17:22:55 localhost org.a11y.Bus[11964]: dbus-daemon[11964]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=11947 comm="/usr/libexec/xdg-desktop-portal-gtk " label="kernel")
Jan 05 17:22:55 localhost org.a11y.Bus[11964]: dbus-daemon[11964]: Successfully activated service 'org.a11y.atspi.Registry'
Jan 05 17:22:55 localhost org.a11y.Bus[11971]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.impl.portal.desktop.gtk'
Jan 05 17:22:55 localhost xdg-desktop-por[11912]: Failed connect to PipeWire: Couldn't connect to PipeWire
Jan 05 17:22:55 localhost dbus-daemon[11738]: [session uid=1000 pid=11736] Successfully activated service 'org.freedesktop.portal.Desktop'
私の考えでは、VNCはgnome
デフォルトでデスクトップをロードしようとしますが、私はデスクトップのみを使用しているようですxfce
。デフォルトのデスクトップを設定する方法と場所がわかりません。どんなアドバイスも本当にありがとうございます。
私のファイルの内容~/.vnc/xstarup
:
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/etc/X11/xinit/xinitrc
# Assume either Gnome will be started by default when installed
# We want to kill the session automatically in this case when user logs out. In case you modify
# /etc/X11/xinit/Xclients or ~/.Xclients yourself to achieve a different result, then you should
# be responsible to modify below code to avoid that your session will be automatically killed
if [ -e /usr/bin/gnome-session ]; then
vncserver -kill $DISPLAY
fi