Ubah desktop GNOME dengan gconftool-2: Perbedaan revisi

Dari IGNwiki
Langsung ke: navigasi, cari
Baris 152: Baris 152:
 
  $ gconftool-2 --set /apps/nautilus/preferences/always_use_location_entry --type=bool false
 
  $ gconftool-2 --set /apps/nautilus/preferences/always_use_location_entry --type=bool false
  
 +
== Atur desktop ==
 +
Media eksternal seperti USB Flash Disk atau harddisk eksternal saat di mount akan muncul ikonnya di desktop. Kemunculan ikon dapat diatur.
 +
ON
 +
$ gconftool-2 --set /apps/nautilus/desktop/volumes_visible --type=boolean false
 +
 +
OFF
 +
$ gconftool-2 --set /apps/nautilus/desktop/volumes_visible --type=boolean false
 
   
 
   
 
== Tombol pintas (shortcut) ==
 
== Tombol pintas (shortcut) ==
 +
# Tombol super key atau win key atau Super_L untuk mengakses menu GNOME
 +
$ gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string "Super_L"
 +
 
# win key (Super_L) + E untuk membuka nautilus
 
# win key (Super_L) + E untuk membuka nautilus
 
  gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_1 "<Super>e"
 
  gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_1 "<Super>e"

Revisi per 10 Juni 2010 16.18

Desktop GNOME dapat diubah melalui gcont-editor ataupun melalui gconftool-2.

gconftool-2

Sintak

$ gconftool-2 --set /path/to/setting --type <type> "value"

Melihat Konfigurasi

$ gconftool-2 -R /

Melihat Konfigurasi desktop GNOME 2

$ gconftool-2 -R /desktop/gnome

Configuration Sources [2]

GConf looks for each value in a series of storage locations called configuration sources. These are specified in a file called /etc/gconf/<version>/path. Each configuration source has a backend that knows how to read it - for now, this is always the "xml" backend, which stores data in XML files.

By default, GConf comes configured as follows:

  xml:readonly:/etc/gconf/gconf.xml.mandatory
  include "$(HOME)/.gconf.path"
  xml:readwrite:$(HOME)/.gconf
  xml:readonly:/etc/gconf/gconf.xml.defaults

Skema [2]

Keys normally have simple values such as integers, strings, or lists of those. However, a special kind of value called a schema can also be stored in GConf.

A schema is a bundle of metainformation describing a configuration setting. This metainformation includes the type of value, short documentation on the setting, and the factory default for that value. Schemas are conventionally stored in the database under the /schemas toplevel directory.

Contoh:

$ gconftool-2 --get /schemas/apps/metacity/general/num_workspaces
   Type: int
   List Type: *invalid*
   Car Type: *invalid*
   Cdr Type: *invalid*
   Default Value: 4
   Owner: metacity
   Short Desc: Number of workspaces
   Long Desc: 
             Number of workspaces. Must be more than zero, and 
             has a fixed maximum (to prevent accidentally destroying 
             your desktop by asking for 34 million workspaces).

Melihat Parameter

Melihat lokasi gambar background

$ gconftool-2 --get /desktop/gnome/background/picture_filename

Tipe Paramater Tipe yang dapat digunakan sesudah perintah type

$ gconftool-2 --set /path/to/setting --type 

Adalah

int|bool|float|string|list|pair

eksport dan impor panel

gconftool-2 --dump /apps/panel > panelku.entries
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --load panelku.entries

Contoh pemakaian

[3] string example: The following command sets a Mandatory Background Image:

gconftool-2 --direct \
--config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.mandatory \
--type string --set /desktop/gnome/background/picture_filename /usr/share/wallpapers/default-1600x1200.jpg

bool example: The following command sets the "Include a delete command" within Nautilus the default behaviour:

gconftool-2 --direct \
--config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults \
--type bool --set /apps/nautilus/preferences/enable_delete True

int example: The following command set the number of workspaces to 4 by default (SLED defaults to 1 unless you are running Xgl).

gconftool-2 --direct \
--config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults \
--type int --set /apps/metacity/general/num_workspaces 4

list example: The List type took me a while to get right, the following will change the Main Menu default Favorite Applications to something more suitable for an office.

gconftool-2 --direct \
--config-source xml:readwrite:/etc/opt/gnome/gconf/gconf.xml.defaults \
--type list --list-type=string --set /desktop/gnome/applications/main-menu/file-area/user_specified_apps \
[nautilus-home.desktop,writer.desktop,MozillaFirefox.desktop,calc.desktop,scribus.desktop,impress.desktop,gimp.desktop,inkscape.desktop,gcalctool.desktop,dia.desktop]

Autohide

$ gconftool-2 --set --type integer /apps/panel/toplevels/top_panel_screen0/auto_hide_size 0

Dapat juga diubah melalui gconf-editor, lakukan:

ALT-F2 > "gconf-editor" > apps > panel > toplevels > top_panel_screen0 > auto_hide_size > 0

Disable User List

$ sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list true

Enable User List

$ sudo -u gdm gconftool-2 --set --type boolean /apps/gdm/simple-greeter/disable_user_list false

Ubah agar nautilus saat dibuka mengakses /home/user

$ gconftool-2 --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir true

Ubah agar nautilus saat dibuka mengakses /home/user/Desktop

$ gconftool-2 --set --type=bool /apps/nautilus-open-terminal/desktop_opens_home_dir false

Ubah default font sizes ke 8

$ gconftool-2 --set /apps/nautilus/preferences/desktop_font --type string "Sans 8"
$ gconftool-2 --set /desktop/gnome/interface/document_font_name --type string "Sans 8"
$ gconftool-2 --set /desktop/gnome/interface/font_name --type string "Sans 8"
$ gconftool-2 --set /apps/metacity/general/titlebar_font --type string "Sans Bold 8"
$ gconftool-2 --set /desktop/gnome/interface/monospace_font_name --type string "Monospace 8"

Ubah Font Widget

$ gconftool-2 --type string --set /desktop/gnome/interface/font_name "Serif 12"

Ubah gambar background dengan comet.jpg

$ gconftool-2 --set /desktop/gnome/background/picture_filename  --type string "/usr/share/backgrounds/cosmos/comet.jpg"

Ubah Nautilus File Browser

$ gconftool-2 --set "/apps/nautilus/preferences/always_use_browser" --type bool TRUE
$ gconftool-2 --set "/apps/nautilus/preferences/click_policy" --type string "single"

Gnome ScreenSaver Lock

$ gconftool-2 --set /apps/gnome-screensaver/lock_enabled --type bool 1"

Proxy Automatis [1]

Edit file ~/.xprofile

# Set the proxy
if /sbin/ifconfig eth0 | grep -q 10.66.6.17
then
  gconftool-2 –set “/system/http_proxy/use_http_proxy” –type bool “true”
else
  gconftool-2 –set “/system/http_proxy/use_http_proxy” –type bool “false”
fi

Ikon di desktop [4]

OFF

$ gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop false

ON

$ gconftool-2 --type bool --set /apps/nautilus/preferences/show_desktop true

Wallpaper non aktif

$ gconftool-2 --type string --set /desktop/gnome/background/picture_options none
$ gconftool-2 --type string --set /desktop/gnome/background/primary_color 000000
$ gconftool-2 --type string --set /desktop/gnome/background/color_shading_type solid

Atur window

Window memiliki elemen minimizem, maximize dan close

$ gconftool-2 --set "/apps/metacity/general/button_layout" --type string ":minimize,maximize,close"

Window hanya memiliki elemen close

$ gconftool-2 --set "/apps/metacity/general/button_layout" --type string ":close"

Nautilus Agar nautilus selalu memunculkan lokasi folder modifikasi /apps/nautilus/preferences/always_use_location_entry ON

$ gconftool-2 --set /apps/nautilus/preferences/always_use_location_entry --type=bool true

OFF

$ gconftool-2 --set /apps/nautilus/preferences/always_use_location_entry --type=bool false

Atur desktop

Media eksternal seperti USB Flash Disk atau harddisk eksternal saat di mount akan muncul ikonnya di desktop. Kemunculan ikon dapat diatur. ON

$ gconftool-2 --set /apps/nautilus/desktop/volumes_visible --type=boolean false

OFF

$ gconftool-2 --set /apps/nautilus/desktop/volumes_visible --type=boolean false

Tombol pintas (shortcut)

  1. Tombol super key atau win key atau Super_L untuk mengakses menu GNOME
$ gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string "Super_L"
  1. win key (Super_L) + E untuk membuka nautilus
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_1 "<Super>e"
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_1 "nautilus"

  1. win key + F untuk memunculkan jendela pencarian
gconftool-2 -t str --set /apps/metacity/keybinding_commands/command_11 "gnome-search-tool"
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_11 "<Super>f"
  1. win key + F untuk menjalankan gnome terminal
gconftool-2 -t str --set /apps/metacity/global_keybindings/run_command_terminal "<Super>x"

  1. win key + d untuk menampilkan desktop
gconftool-2 -t str --set /apps/metacity/global_keybindings/show_desktop "<Super>d"

Pengembalian seting

Semua seting yang telah dilakukan dapat dikembalikan ke seting semula. Seting yang dikembalikan antara lain:

  1. Akses ke wifi akan di reset

Jalankan:

$ gconftool-2 --recursive-unset /

Referensi