无法更改 gedit 首选项,并且终端首选项无法保存

无法更改 gedit 首选项,并且终端首选项无法保存

我对 Ubuntu 和 Linux 还不熟悉。我刚刚开始在大学课程中使用它,他们没有让我们所有人都在自己的机器上安装 Linux,而是让我们安装虚拟机(不确定这是否是问题所在)。无论如何,正如标题所说,我无法在 gedit 中更改我的首选项。每次我想用 gedit 编辑文件或尝试更改首选项时,都会遇到以下代码:

(gedit:760): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/dev/.config/dconf/user.DAFJCY': No such file or directory

(gedit:760): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/dev/.config/dconf/user.YCYLCY': No such file or directory

(gedit:760): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/dev/.config/dconf/user.KGR6BY': No such file or directory

(gedit:760): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/dev/.config/dconf/user.PYA9BY': No such file or directory

(gedit:760): dconf-WARNING **: failed to commit changes to dconf: GDBus.Error:org.gtk.GDBus.UnmappedGError.Quark._g_2dfile_2derror_2dquark.Code4: Failed to create file '/home/dev/.config/dconf/user.MV98BY': No such file or directory

我仍然可以正确编辑代码和所有内容,但每次运行 gedit 时都会收到这些警告。当我尝试更改首选项时,我遇到了相同的代码,但只有一个警告。我还注意到,当我想更改我的终端首选项时,它们不会在下次打开终端时保存。

查看我的 .config 文件后,我发现其中没有 dconf 目录/文件;只有标记为 xfce4 的内容。任何帮助都非常感谢,我可以根据需要提供其他信息。谢谢。

答案1

我遇到了同样的问题(在 Windows 10 创建者更新后,在 Windows 上的 Ubuntu 上使用 Bash),安装后问题消失了:

sudo apt-get install dconf-editor dbus-x11

也可以看看,https://www.reddit.com/r/Windows10/comments/4rsmzp/bash_on_windows_getting_dbus_and_x_server_working/

答案2

如果你想摆脱警告:

cd 
mkdir .config/dconf

关于保存偏好:

在更改某些偏好设置之前:

~/.config/dconf$ file user
user: GVariant Database file, version 0
rinzwind@schijfwereld:~/.config/dconf$ ls -l user
-rw-rw-r-- 1 rinzwind rinzwind 20023 mrt 13 09:20 user

更改后:

rinzwind@schijfwereld:~/.config/dconf$ ls -l user
-rw-rw-r-- 1 rinzwind rinzwind 20302 mrt 13 09:21 user

因此看起来添加目录后这个问题也将被修复。

相关内容