无法在 18.04 上打开 gnome-terminal

无法在 18.04 上打开 gnome-terminal

我认为运行后apt upgrade我的浏览gnome-terminal器无法再打开。我尝试了其他问题中的一些建议,这些建议说重新生成语言环境可能会解决这个问题。

我已经安装xterm,大约 40 秒后的输出如下:

# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

这在系统日志中打印了几次:

Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: dbus-daemon[1465]: Activating service name='org.a11y.atspi.Registry' requested by ':1.1005' (uid=1000 pid=9634 comm="/usr/bin/gnome-terminal.real " label="unconfined")
Aug 26 11:26:16 sirius at-spi2-registr[9636]: Could not open X display
Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: dbus-daemon[1465]: Successfully activated service 'org.a11y.atspi.Registry'
Aug 26 11:26:16 sirius at-spi-bus-launcher[1456]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
Aug 26 11:26:16 sirius at-spi2-registr[9636]: AT-SPI: Cannot open default display

由于默认显示存在错误,我还尝试运行DISPLAY=:0 gnome-terminal,但结果相同。sudo gnome-terminal确实可以正确打开终端。当我运行dbus-update-activation-environment --systemd --all从这里),但重新启动后我收到以下消息:

# Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
# Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

还尝试了前五个答案这个问题

更新:以下是不属于我的用户的文件。

~$ find $HOME -not -user $USER
/home/dominic/.dbus/session-bus/35e9e36cbe34423e8c8274630326355c-0
find: ‘/home/dominic/.gvfs’: Permission denied
/home/dominic/.gvfs
find: ‘/home/dominic/.cache/doc’: Permission denied
/home/dominic/.cache/doc
/home/dominic/.cache/dconf/user

将所有者更改为我的用户并重新启动。没有,.dconf但有.gconf。再次重新启动,但终端仍然没有打开。

我还注意到,当我运行sudo gnome-terminalxterm进入时,su dominic一切gnome-terminal都开始工作。我甚至可以关闭所有gnome-terminals并再次打开它们。重新启动后,一切都恢复正常。

答案1

搜索, find $HOME -not -user $USER 如果某些文件不属于您的用户,则使用。使用

sudo chown -R $USER:$USER /path/to/file

注销并重新登录。

下一步将从您的桌面会话中恢复您的态度。

mv $HOME/.dconf $HOME/.dconf.bak

同样适用于

mv $HOME/.gconf $HOME/.gconf.bak

注销并重新登录。

相关内容