gsettings全局设置所在位置:
/usr/share/glib-2.0/schemas/
cache位置:
/home/socol/.config/dconf/user
通过追踪power设定来确定cache所在位置:
1. power的gsettings全局设定在
/usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml
2. 通过命令监控gsettings改变,并且进入control center手动改变power设定:
[socol@localhost Downloads]$ gsettings monitor org.gnome.settings-daemon.plugins.power
sleep-inactive-ac: true
sleep-inactive-ac: false
sleep-inactive-ac: true
3. 追踪监控程序读取的相关文件列表:
[socol@localhost Downloads]$ ps aux|grep gsettings
socol 19882 0.0 0.1 27036 2688 pts/2 Sl+ 19:26 0:00 gsettings monitor org.gnome.settings-daemon.plugins.power
socol 20283 0.0 0.0 4452 752 pts/1 S+ 19:28 0:00 grep --color=auto gsettings
[socol@localhost Downloads]$ lsof -p 19882
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gsettings 19882 socol cwd DIR 8,3 4096 147328 /home/socol/Downloads
gsettings 19882 socol rtd DIR 8,3 4096 2 /
gsettings 19882 socol txt REG 8,3 18956 539203 /usr/bin/gsettings
gsettings 19882 socol mem REG 8,3 80808 546841 /usr/lib/gio/modules/libgioremote-volume-monitor.so
gsettings 19882 socol mem REG 8,3 54552 1178083 /lib/libnss_files-2.13.90.so
gsettings 19882 socol mem REG 8,3 30712 540576 /usr/lib/gio/modules/libdconfsettings.so
gsettings 19882 socol mem REG 8,3 175380 546842 /usr/lib/gio/modules/libgvfsdbus.so
gsettings 19882 socol mem REG 8,3 115328 1191419 /lib/libgcc_s-4.6.0-20110530.so.1
gsettings 19882 socol mem REG 8,3 95364 547791 /usr/lib/libgvfscommon.so.0.0.0
gsettings 19882 socol mem REG 8,3 64448 1195943 /lib/libudev.so.0.11.1
gsettings 19882 socol mem REG 8,3 152200 1191460 /lib/ld-2.13.90.so
gsettings 19882 socol mem REG 8,3 1875356 1191461 /lib/libc-2.13.90.so
gsettings 19882 socol mem REG 8,3 136340 1191462 /lib/libpthread-2.13.90.so
gsettings 19882 socol mem REG 8,3 19888 1191464 /lib/libdl-2.13.90.so
gsettings 19882 socol mem REG 8,3 42368 1191463 /lib/librt-2.13.90.so
gsettings 19882 socol mem REG 8,3 87088 1191483 /lib/libz.so.1.2.5
gsettings 19882 socol mem REG 8,3 122652 1191470 /lib/libselinux.so.1
gsettings 19882 socol mem REG 8,3 1153112 1191478 /lib/libglib-2.0.so.0.2800.6
gsettings 19882 socol mem REG 8,3 110152 1191469 /lib/libresolv-2.13.90.so
gsettings 19882 socol mem REG 8,3 17428 1191479 /lib/libgthread-2.0.so.0.2800.6
gsettings 19882 socol mem REG 8,3 317504 1191480 /lib/libgobject-2.0.so.0.2800.6
gsettings 19882 socol mem REG 8,3 164592 1191482 /lib/libexpat.so.1.5.2
gsettings 19882 socol mem REG 8,3 12016 1191481 /lib/libgmodule-2.0.so.0.2800.6
gsettings 19882 socol mem REG 8,3 1230360 1191484 /lib/libgio-2.0.so.0.2800.6
gsettings 19882 socol mem REG 8,3 14648 1191501 /lib/libutil-2.13.90.so
gsettings 19882 socol mem REG 8,3 298724 1204344 /lib/libdbus-1.so.3.5.4
gsettings 19882 socol mem REG 8,3 99158720 528527 /usr/lib/locale/locale-archive
gsettings 19882 socol mem REG 8,3 7708 264477 /home/socol/.config/dconf/user
gsettings 19882 socol mem REG 8,3 1 149751 /home/socol/.cache/dconf/user
gsettings 19882 socol mem REG 8,3 114417 921101 /usr/share/glib-2.0/schemas/gschemas.compiled
gsettings 19882 socol 0u CHR 136,2 0t0 5 /dev/pts/2
gsettings 19882 socol 1u CHR 136,2 0t0 5 /dev/pts/2
gsettings 19882 socol 2u CHR 136,2 0t0 5 /dev/pts/2
gsettings 19882 socol 3r FIFO 0,8 0t0 292467 pipe
gsettings 19882 socol 4w FIFO 0,8 0t0 292467 pipe
gsettings 19882 socol 5r FIFO 0,8 0t0 292470 pipe
gsettings 19882 socol 6w FIFO 0,8 0t0 292470 pipe
gsettings 19882 socol 7u unix 0xefca5200 0t0 291718 socket
gsettings 19882 socol 8r FIFO 0,8 0t0 291719 pipe
gsettings 19882 socol 9w FIFO 0,8 0t0 291719 pipe
gsettings 19882 socol 10r FIFO 0,8 0t0 293102 pipe
gsettings 19882 socol 11w FIFO 0,8 0t0 293102 pipe
4. 移除/还原可疑文件,在移除/还原后确定control center中对应的结果是否匹配。
5. 确定gsettings的cache文件为:
/home/socol/.config/dconf/user