以下是我尝试在 Nautilus 中禁用缩略图所采取的步骤(遵循此处提到的说明: https://wiki.gnome.org/dconf/SystemAdministrators)。这没有帮助。 (我使用的是 Debian Wheezy,默认情况下它似乎没有 /etc/dconf):
mkdir -p /etc/dconf/db/local.d/locks
nano /etc/dconf/db/local.d/settings
# /etc/dconf/db/local.d/settings # prevent showing thumbnails [org.gnome.nautilus.preferences] show-image-thumbnails="never"
nano /etc/dconf/db/local.d/locks/settings
# prevent changes to showing thumbnails setting org.gnome.nautilus.preferences.show-image-thumbnails
mkdir /etc/dconf/profile
nano /etc/dconf/profile/local
system-db:local
export DCONF_PROFILE=/etc/dconf/profile
dconf update
这是怎么回事?
我还尝试使用(作为 root 和普通用户)禁用它dconf-editor
,但我无法将设置从“仅本地”更改为“从不”,它看起来像是被锁定了。
我也尝试过gsettings
:
# gsettings get org.gnome.nautilus.preferences show-image-thumbnails 'local-only'
# gsettings set org.gnome.nautilus.preferences show-image-thumbnails "never"
** (process:5834): WARNING **: The connection is closed
** (process:5834): WARNING **: The connection is closed
PS:我没有重启。我需要重新启动才能使新设置生效吗?
我发现了几个 dconf 文件,但看起来它们不包含 org.gnome.nautilus.preferences.show-image-thumbnails 的任何锁并添加
[org.gnome.nautilus.preferences]
show-image-thumbnails="never"
对他们也没有帮助。他们是这样的:
/var/lib/gdm3/.cache/dconf
/var/lib/gdm3/.cache/dconf/user
/var/lib/gdm3/dconf/db
/var/lib/gdm3/dconf/profile
/var/lib/gdm3/dconf/db/gdm
/var/lib/gdm3/dconf/db/gdm.d
/var/lib/gdm3/dconf/db/gdm.d/00-upstream-settings
/var/lib/gdm3/dconf/db/gdm.d/10-desktop-base-settings
/var/lib/gdm3/dconf/db/gdm.d/90-debian-settings
/var/lib/gdm3/dconf/db/gdm.d/locks
/var/lib/gdm3/dconf/db/gdm.d/locks/00-upstream-settings-locks
/var/lib/gdm3/dconf/profile/gdm
和
/usr/share/gdm/dconf
/usr/share/gdm/dconf-profile
/usr/share/gdm/dconf/00-upstream-settings
/usr/share/gdm/dconf/10-desktop-base-settings
/usr/share/gdm/dconf/locks
/usr/share/gdm/dconf/locks/00-upstream-settings-locks
看起来 dconf update 忽略了:
/etc/dconf/db/local.d/settings
因为如果我故意在那里写错东西,它不会抱怨。
有任何想法吗?
答案1
我认为这也是我偶然发现的同样微妙的问题......仔细查看 dconf(7) 手册页。
您正在尝试设置DCONF_PROFILE
为目录,而不是文件。实际上,这不是必需的,因为实际上DCONF_PROFILE
默认为user
,因此只需命名该文件/etc/dconf/profile/user
即可确保它被读取:
# cat /etc/dconf/profile/user
user-db:user
system-db:local
#
只要dconf update
生成一个/etc/dconf/db/local
文件(从 中的任何内容/etc/dconf/db/local.d/
),那么这一切都应该生效。