以前,我需要清除文档历史记录,所以我用谷歌搜索并找到了这个:
http://www.watchingthenet.com/ubuntu-tip-clear-disable-recent-documents.html
我做了这一步,然后当我在 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:/#
Run Code Online (Sandbox Code Playgroud)
它发生在用户终端:
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:~$
Run Code Online (Sandbox Code Playgroud)
我真的希望有人在这种情况下提供帮助,谢谢。
小智 2
用这个
(nohup gedit 2>/dev/null &)
Run Code Online (Sandbox Code Playgroud)
gedit它在后台的子 shell 中运行,扩展名为nohup. 因此,错误消息由 处理nohup,关闭终端不会影响gedit。一个更简单的方法是:
gedit &> /dev/null
Run Code Online (Sandbox Code Playgroud)
这只会丢弃来自 的任何错误消息gedit。