rul*_*let 2 gedit command-line
像这样编辑任何文件时:
r@ngf:~$ sudo gedit /etc/default/grub
[sudo] password for r:
(gedit:1638): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: ?? ??????? ??????? ???? «/root/.local/share/recently-used.xbel.CJP8XV»: ??? ?????? ????? ??? ????????
(gedit:1638): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: ??? ?????? ????? ??? ????????
(gedit:1638): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: ?? ??????? ??????? ???? «/root/.local/share/recently-used.xbel.W8MHYV»: ??? ?????? ????? ??? ????????
(gedit:1638): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: ??? ?????? ????? ??? ????????
(gedit:1638): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: ?? ??????? ??????? ???? «/root/.local/share/recently-used.xbel.DZG7XV»: ??? ?????? ????? ??? ????????
(gedit:1638): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: ??? ?????? ????? ??? ????????
Run Code Online (Sandbox Code Playgroud)
它显示了一些错误,但这并不影响实际编辑 - 文件正常保存。那么这些错误可能意味着什么?
首先,您不应该使用sudo
GUI 程序。使用gksudo
来代替。
至于警告:它们是无害的。他们只是说 gedit 试图将文件保存在不存在的位置。如果你想让它们消失,你必须创建那个位置:
sudo mkdir -p /root/.local/share
Run Code Online (Sandbox Code Playgroud)