ãã¼ã¸ã§ã³2.26以ä¸ã®GIOã©ã¤ãã©ãªã«ãããGSettingsã®æ©è½ã¨ãã®è¨å®ãæ±ããã¼ã«ã«ã¤ãã¦
GConfã¨GSettings
GNOMEãªã©ã®ã¢ããªã±ã¼ã·ã§ã³ãè¨å®ãä¿åããããã®ä»çµã¿ã¨ãã¦GConfã¨ãããã®ããããé層æ§é ãæã£ãè¨å®ãã¼ã¿ãã¼ã¹ã«å¯¾ãã¦è¨å®ãèªã¿æ¸ãããããã®GConfã¯å¤é¨ã®GConfã©ã¤ãã©ãª(libgconf)ãå¿
è¦ã§ãè¨å®ãã¼ã¢ã³(gconfd)ãåä½ããã
ããã¨ã¯å¥ã«ããã¼ã¸ã§ã³2.26以ä¸ã®GIOã©ã¤ãã©ãªã§ã¯GSettingsã¨ããé«ã¬ãã«ãªè¨å®ã®èªã¿æ¸ãã®ä»çµã¿ãç¨æãããGLib/GIOã®ã©ã¤ãã©ãªããè¦ãå¤é¨ã®ã©ã¤ãã©ãªã«ä¾åããã«GConfã®ãããªé層æ§é ãæã£ãè¨å®ãã¼ã¿ãã¼ã¹ã®æä½ãè¡ããã¨ãã§ããããã«ãªã£ã¦ããã
ãã®GSettingsã§ã¯å®éã«ãã¼ã¿ãæ±ãããã¯ã¨ã³ã(ä½ã¬ãã«ãªè¨å®ãã¼ã¿ç®¡çã·ã¹ãã )ãè¤æ°æã¤(使ç¨æã«ãããããé¸æãã)ãã¨ãã§ããæ¨æºçãªãã®ã¨ãã¦ã¯è»½éãªdconf(https://live.gnome.org/dconf)ãããã
GSettingsã®ãã¼ã«(gsettingsã³ãã³ã)ã«ã¤ãã¦
ãã¼ã¸ã§ã³2.26以ä¸ã®GLibã«ä»å±ããgsettingsã¨ãããã¼ã«(ã³ãã³ã)ãç¨ããã¨ãããã¯ã¨ã³ãã«ä¾åããå
±éããæ¹å¼ã§è¨å®ãã¼ã¿ãã¼ã¹ã®é
ç®ãæä½ã§ããããã®ãã¼ã«ã¯ãDebian/Ubuntuã§ã¯ãlibglib2.0-binãããã±ã¼ã¸ã«å«ã¾ããã
è¨å®ã¯
- ãã¹ãã¼ããã¨å¼ã°ããã[ãã¡ã¤ã³...].[è¨å®é層...]ãå½¢å¼ã®é層(ä¾:org.gnome.yelp)
- ããã¼ãã¨å¼ã°ããåè¨å®é ç®(ä¾:font-adjustment)
ã¨ãã£ãå½¢ã§é層é¨åã¨è¨å®é
ç®é¨åã«åããã¦ãããè¨å®ãã¼ã¿ã®èªã¿æ¸ãã®éã«ã¯ãã®2ã¤ãç¨ããã
ã¹ãã¼ãã®ãã¼ã¿ã¯/usr/share/glib-2.0/schemas/以ä¸ã®.gschema.xmlãã¡ã¤ã«ã«æ¸ããã¦ããã
以ä¸ãä½æ¥ä¾ã¨ãã®åºåãè²¼ãä»ããããåºåã¯ç°å¢ã«ãã£ã¦ç°ãªããã¾ãã以ä¸ã§æ±ãæä½(å
é¨ã³ãã³ã)ã¯ä¸é¨ã§ãå
¨ã¦ã§ã¯ãªãã
ã¹ãã¼ãä¸è¦§ã®åå¾ä½æ¥ä¾
å é¨ã³ãã³ãåã¯ãlist-schemasã,å¼æ°ã¯ä»ããªãã
$ gsettings list-schemas org.gnome.yelp org.gnome.Evince.Default org.gnome.system-tools.users com.canonical.indicator.datetime (ä¸ç¥) org.gnome.system.smb org.gnome.desktop.lockdown
ã¹ãã¼ãå ã®ãã¼(è¨å®é ç®)ä¸è¦§ã®åå¾ä½æ¥ä¾
å é¨ã³ãã³ãåã¯ãlist-keysã,å¼æ°ã«ã¯ã¹ãã¼ããæå®ããã
$ gsettings list-keys org.gnome.yelp font-adjustment show-cursor
ãã¼(è¨å®é ç®)ã®å¤ã®åå¾ä½æ¥ä¾
å é¨ã³ãã³ãåã¯ãgetã,å¼æ°ã«ã¯ã¹ãã¼ãã¨ãã¼ãæå®ããã
$ gsettings get org.gnome.yelp font-adjustment 0 $ gsettings get org.gnome.yelp show-cursor false
ãã¼ã®å¤ã«ã¯æ´æ°ãæåå,çå½å¤(true/false)ãªã©ã®è²ã ãªåããããé ååã®å ´åã¯
['dog', 'rabbit', 'crocodile', 'lion']
ã®ãããª(ã·ã³ã°ã«ã¯ã©ã¼ããããæååãã³ã³ã(+åè§ã¹ãã¼ã¹)åºåãã«ãã¦è§æ¬å¼§ã§å²ãã )å½¢ã§è¡¨ç¤ºãããã
ãã¼(è¨å®é ç®)ã®å¤ã®æ¸ãè¾¼ã¿ä½æ¥ä¾
å é¨ã³ãã³ãåã¯ãsetã,å¼æ°ã«ã¯ã¹ãã¼ã,ãã¼,æ°ããå¤ãæå®ããã
(以ä¸ã¯yelpã®è¨å®ãå¤æ´ããã®ã§ãå®è¡ã«ã¯æ³¨æãå¿ è¦) $ gsettings set org.gnome.yelp font-adjustment 4 $ gsettings set org.gnome.yelp show-cursor true
é ååã®ãã¼ã¿ãæå®ããå ´åãå¤ã®å ¨ä½ãã¯ã©ã¼ãããã
(ãã®ã¹ãã¼ãã¯åå¨ããªãã®ã§ãå®è¡ãã¦ãæå³ã¯ãªã) $ gsettings set com.example.magic.greeting friends "['eel', 'mouse', 'skunk', 'headfish', 'mouse', 'rhinoceros']"
é¢é£è¨äº:
使ç¨ãããã¼ã¸ã§ã³:
- GLib 2.28.6
é¢é£URL: