在终端打开Gedit时发出Gtk警告
以前,我需要清除文档历史记录,所以我用Google搜索并发现了这个:
Ubuntu Guide For Windows Users: Clear And Disable Recent Documents
我做了一步,然后当我在root终端打开gedit时,我得到了这个:
root@dellph1-desktop:/# gedit (gedit:8224): GLib-CRITICAL **: g_bookmark_file_load_from_data: assertion `length != 0' failed (gedit:8224): Gtk-WARNING **: Attempting to store changes into `/root/.recently-used.xbel', but failed: Failed to rename file '/root/.recently-used.xbel.FP7PPV' to '/root/.recently-used.xbel': g_rename() failed: Operation not permitted (gedit:8224): Gtk-WARNING **: Attempting to set the permissions of `/root/.recently-used.xbel', but failed: Operation not permitted root@dellph1-desktop:/#
它在用户终端中很开心:
dellph1@dellph1-desktop:~$ gedit (gedit:9408): Gtk-CRITICAL **: gtk_accel_label_set_accel_closure: assertion `gtk_accel_group_from_accel_closure (accel_closure) != NULL' failed dellph1@dellph1-desktop:~$
我真的希望有人在这种情况下提供帮助,谢谢。
用这个
(nohup gedit 2>/dev/null &)
这在子shell中在后台运行gedit
, nohup
。 因此,错误消息由nohup
处理,关闭终端不会影响gedit
。 一种更简单的方法是:
gedit &> /dev/null
这只是丢弃来自gedit
任何错误消息。
我建议您不要通过root用户使用gedit。 尝试通过sudo使用gedit。
重新安装gedit无济于事,我相信您需要按照指南撤消所造成的损害。