1. 程式人生 > 其它 >linux系統維護篇:org.gtk.vfs.Daemon: A connection to the bus can‘t be made

linux系統維護篇:org.gtk.vfs.Daemon: A connection to the bus can‘t be made

技術標籤:linux相關vncserverlinuxcentosvncgnome

問題:linux-centos7.9安裝的GNOME桌面莫名其妙不能使用vnc遠端。

排查:經過定位,發現伺服器上vncserver服務無法啟動,日誌如下:

Feb  3 16:30:01 localhost systemd: Started Session 17 of user root.
Feb  3 16:30:22 localhost systemd: Starting Remote desktop service (VNC)...
Feb  3 16:30:22 localhost systemd: Started Remote desktop service (VNC).
Feb  3 16:30:22 localhost systemd: Started Session c10 of user root.
Feb  3 16:30:25 localhost vncserver_wrapper: New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1
Feb  3 16:30:25 localhost vncserver_wrapper: Starting applications specified in /root/.vnc/xstartup
Feb  3 16:30:25 localhost vncserver_wrapper: Log file is /root/.vnc/localhost.localdomain:1.log
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.976903]: IMSettings-Daemon[7223]: INFO: Starting imsettings-daemon...
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.977036]: IMSettings-Daemon[7223]: INFO:   [HOME=/root/.config/imsettings]
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.977070]: IMSettings-Daemon[7223]: INFO:   [XINPUTRCDIR=/etc/X11/xinit/]
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.977101]: IMSettings-Daemon[7223]: INFO:   [XINPUTDIR=/etc/X11/xinit/xinput.d/]
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.977130]: IMSettings-Daemon[7223]: INFO:   [MODULEDIR=/usr/lib64/imsettings]
Feb  3 16:30:25 localhost com.redhat.imsettings: [ 1612341025.977160]: IMSettings-Daemon[7223]: INFO:   [MODULES=gsettings]
Feb  3 16:30:26 localhost com.redhat.imsettings: [ 1612341026.042798]: IMSettings-Daemon[7223]: INFO: Release the ownership of com.redhat.imsettings
Feb  3 16:30:26 localhost com.redhat.imsettings: Exiting...
Feb  3 16:30:26 localhost com.redhat.imsettings: [ 1612341026.042979]: GLib-GIO[7223]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Feb  3 16:30:26 localhost com.redhat.imsettings: [ 1612341026.043039]: GLib-GIO[7223]: CRITICAL **: Error while sending AddMatch() message: The connection is closed
Feb  3 16:30:26 localhost com.redhat.imsettings: [ 1612341026.043134]: IMSettings-Daemon[7223]: INFO: Unloading imesttings module: gsettings
Feb  3 16:30:26 localhost org.gtk.vfs.Daemon: A connection to the bus can't be made
Feb  3 16:30:26 localhost com.redhat.imsettings: [ 1612341026.043198]: IMSettings-Daemon[7223]: INFO: imsettings-daemon is shut down.
Feb  3 16:30:30 localhost vncserver_wrapper: FATAL: 'vncserver :1' failed to start after 5 seconds!
Feb  3 16:30:30 localhost systemd: 
[email protected]
:1.service: main process exited, code=exited, status=2/INVALIDARGUMENT Feb 3 16:30:30 localhost systemd: Unit [email protected]:1.service entered failed state. Feb 3 16:30:30 localhost systemd: [email protected]:1.service failed.

接下來就開始了長達兩天的探索、研究。。。。百度。百度。百度。。。。Bing。。

最終在Bing國際版找到了一圈同時也發現此時裝置的桌面圖形與最初時候有些不一樣了,開始有些眉目了,可能是桌面套件的問題導致的。

思路:找一臺正常的裝置來對比下兩者的桌面套件安裝情況

#檢視gnome安裝情況
[[email protected] ~]# yum list installed | grep -Pi '(gnome)'
#檢視gnome等其他桌面套件程序情況
[[email protected] ~]# ps -A | egrep -i "gnome|kde|mate|cinnamon|lx|xfce|jwm"

經過對比,發現我們的裝置缺失了很多相關的元件軟體。

解決:重新安裝GNOME相關套件

[[email protected] ~]# yum -y groups install "GNOME DESKTOP" "Graphical Administration Tools"

啟動vncserver:

[[email protected] ~]# systemctl start [email protected]:1.service

到此,問題完美解決。記錄和分享下。希望對有次同樣問題的小夥伴有所幫助。