每次从终端打开 GUI 文本编辑器时都会出现错误消息

每次从终端打开 GUI 文本编辑器时都会出现错误消息

每当我使用命令从终端打开 Gnome 文本编辑器时gnome-text-editor ./example.txt,我都会收到以下错误消息:

(gnome-text-editor:9560): dconf-WARNING **: 00:00:58.433: failed to commit changes to dconf: The connection is closed

(gnome-text-editor:9560): dconf-WARNING **: 00:00:58.444: failed to commit changes to dconf: The connection is closed
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)
Error creating proxy: The connection is closed (g-io-error-quark, 18)

(gnome-text-editor:9560): dconf-WARNING **: 00:00:59.141: failed to commit changes to dconf: The connection is closed

(gnome-text-editor:9560): dconf-WARNING **: 00:00:59.142: failed to commit changes to dconf: The connection is closed

(gnome-text-editor:9560): dconf-WARNING **: 00:00:59.142: failed to commit changes to dconf: The connection is closed

尽管出现错误消息,但使用编辑器工作正常。它甚至可以正确保存。关闭 GUI 时我收到另一条消息。

(gnome-text-editor:9560): dconf-WARNING **: 00:01:18.853: failed to commit changes to dconf: The connection is closed

我应该关心这些消息吗? gnome-text-editor 是否损坏?

答案1

这是完全正常的。

GUI 应用程序往往会向 STDERR 发出大量警告消息,假设它们是从菜单或图标启动的,并且所有此类输出都将重定向到~/.xsession-errors.

您始终可以将 stderr (以及可选的 stdout )重定向到 /dev/null ,例如bash

 gnome-text-editor ./example.txt &> /dev/null

或附加到 ~/.xsession-errors:

 gnome-text-editor ./example.txt &>> ~/.xsession-errors

相关内容