GNOME
GNOME 3.22 (Fedora 25)
Intro
- GNOME 3 pre svoje fungovanie potrebuje v podstate iba DBus service (sucast freedesktop.org projektu)
- Bola vykonana (zatial este nie uplna) migracia z GConf (GNOME 2) na GSettings (GNOME 3)
dconf
(low-level configuration system) is only the GSettings backend. Most applications will not want to interface directly with dconf, but rather with GSettings
- Commandline konfiguracny nastroj
gsettings
v GNOME 3 zamiena predoslygconftool-2
z GNOME 2 - Analogicky GUI aplikacia
dconf-editor
v GNOME 3 zamiena predoslygconf-editor
z GNOME 2 gsettings
nemoze zmenit hodnotu kluca pokial nebezi DBus service (napr. problemy s X-serverom), mozno vsak pouzitdbus-launch
utilitu
$ dbus-launch gsettings get org.gnome.desktop.session session-name 'gnome' # default GNOME 3 $ dbus-launch gsettings set org.gnome.desktop.session session-name 'gnome-fallback' # rezim spatnej kompatibility (hardware cannot handle graphics acceleration)
- Kedze este nebola zavrsena plna migracia z Gconf na GSettings, pre plnu konfigurovatelnost GNOME 3 sa moze okrem predurceneho
gsettings
(resp. GUI ekvivalentdconf-editor
) pouzivat ajgconftool-2
(resp. GUIgconf-editor
). Pre realny zivot je vsak uz takmer (GNOME > 3.14) plna migracia na GSettings.
Configuration
GNOME configuration tools | |||
---|---|---|---|
gnome-control-center |
basic | GUI | Configure GNOME settings |
gnome-tweaks |
advanced | GUI | Graphical interface for advanced GNOME settings |
dconf |
expert | CLI | Tool for manipulating a dconf database |
dconf-editor |
expert | GUI | Graphical editor for gsettings and dconf |
gsettings |
expert | CLI | GSettings configuration tool |
GSettings configuration tool
gsettings(1) offers a simple commandline interface to GSettings. Note that gsettings needs a D-Bus session bus connection to write changes to the dconf(1) database.
# example withorg.gnome.desktop.background
schema andpicture-options
key $ gsettings describe org.gnome.desktop.background picture-options Determines how the image set by wallpaper_filename is rendered. Possible values are 'none', 'wallpaper', 'centered', 'scaled', 'stretched', 'zoom', 'spanned'. $ gsettings get org.gnome.desktop.background picture-options 'zoom' $ gsettings set org.gnome.desktop.background picture-options 'none' $ gsettings reset org.gnome.desktop.background picture-options $ gsettings reset-recursively org.gnome.desktop.background $ gsettings list-recursively org.gnome.desktop.background
My personal GNOME customization
$ wget https://raw.githubusercontent.com/musinsky/config/master/GNOME/gnome.sh -O - | bash
! POKRACOVAT !
$ set | grep -i XDG cat /usr/share/glib-2.0/schemas/org.gnome.desktop.background.gschema.xml
https://wiki.archlinux.org/title/GDM#Login_screen_background_image (extractgst.sh)
https://techwiser.com/ubuntu-alt-tab-ungroup/
- 2024-01
$ gsettings set org.gnome.desktop.wm.keybindings switch-windows "['<Alt>Tab']" # default @as [] $ gsettings set org.gnome.desktop.wm.keybindings switch-applications "[]" # ['<Super>Tab', '<Alt>Tab']
$ gsettings reset org.gnome.shell command-history $ gsettings set org.gnome.shell command-history "['gnome-terminal', 'emacs', 'audacious']"
Commandline interface
<gistit user="musinsky" repo="config" file="GNOME/gnome.sh"/>
gsettings list-recursively > gsettings.all gsettings list-recursively org.gnome.desktop.background gsettings reset org.gnome.desktop.interface gtk-enable-primary-paste # Middle Click Paste (true) gsettings reset org.gnome.desktop.peripherals.touchpad disable-while-typing # (true)
GSettings schemas
- At runtime, GSettings looks for schemas in the glib-2.0/schemas/ subdirectories of all directories specified in the
XDG_DATA_DIRS
environment variable. The usual location to install schema files is /usr/share/glib-2.0/schemas/ - Uzivatel moze pridat svoju directory (napr. ~/.local/share/glib-2.0/schemas/) nastavenim premennej
export XDG_DATA_DIRS=~/.local/share:/usr/share
- Ina moznost je specifikovat directory, kde sa ma hladat schema, napr.
gsettings --schemadir ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/schemas/ get org.gnome.shell.extensions.system-monitor move-clock
glib-compile-schemas
kompiluje vsetky GSettings XML schemas files v jeden binarny file gschemas.compiled, ktory potom cita GSettings
$ ln -s ~/.local/share/gnome-shell/extensions/system-monitor@paradoxxx.zero.gmail.com/schemas/org.gnome.shell.extensions.system-monitor.gschema.xml \ /usr/share/glib-2.0/schemas/ $ glib-compile-schemas /usr/share/glib-2.0/schemas/
gsettings get org.gnome.shell.extensions.system-monitor move-clock
- Jednoducha moznost nastavenia vlastnych default hodnot vytvorenim subora s filename extension .gschema.override
https://docs.gtk.org/gio/class.Settings.html#vendor-overrides
https://unix.stackexchange.com/questions/199836/how-can-i-view-the-content-of-a-backup-of-the-dconf-database-file https://askubuntu.com/questions/363288/how-can-i-read-gsettings-values-from-a-filesystem-backup $ dconf dump / $ dconf dump /org/gnome/desktop/wm/preferences/
Just do dconf watch / and change the icon theme, it will show what dconf prop is changed $ dconf watch /
Windows Management
- Clutter
- Library for creating fast, hardware-accelerated (OpenGL), visually rich graphical user interfaces
- Mutter & Muffin
- Window and compositing managers. Mutter & Muffin combines the Clutter toolkit with solid window-management inherited from the Metacity window manager
- Mutter used as the display core of a larger system such as GNOME Shell or Moblin (default manager for GNOME 3 in Fedora)
- Muffin used as the display core of a larger system such as Cinnamon (non-default in Fedora)
Metacity- Window manager that was used by default in the GNOME 2 desktop. Since Gnome 3.16 metacity themes are no more supported. Mutter no longer uses Metacity themes.
Themes
- Vsetky themes subory sa nachadzaju v /usr/share/themes/<themeName>/, resp. ~/.themes/<themeName>/ directory
- Zmena celej theme, resp. desktop-u (odhliadnuc od icons a cursors), zahrna zmenu dvoch sub-theme:
- Shell theme - themes/<themeName>/gnome-shell/
- uzivatel moze vyberat, menit GNOME Shell theme az po nainstalovani extensions
dnf install gnome-shell-extension-user-theme
- GTK+ Theme - themes/<themeName>/{gtk-2.0,gtk-3.0}/
Current (Window) theme - themes/<themeName>/metacity-1/
- Themes je mozne velmi jedoducho vyberat, menit pomocou
gnome-tweak-tool
v menu Appearance - Default theme pre GNOME 3 (a zaroven aj pre Fedora) je Adwaita, rozne ine themes:
Customizing
- Najoptimalnejsi sposob ako menit niektore nastavenia v Shell alebo GTK+ themes je vytvorit kvazi novu theme, ktora je odvodena od povodnej theme. Window theme, resp. Metacity nie je mozne derivovat
- Customizing default Shell theme derived from default gnome-shell.css
$ wget https://raw.githubusercontent.com/musinsky/config/master/GNOME/gnome-shell.css -P /usr/share/themes/Mucha/gnome-shell/
- Customizing default GTK+ theme (Adwaita) derived from default gtk.css
$ wget https://raw.githubusercontent.com/musinsky/config/master/GNOME/gtk.css -P /usr/share/themes/Mucha/gtk-3.0/ $ ln -s /usr/share/themes/Adwaita/gtk-2.0/ /usr/share/themes/Mucha/
- Applying changes
gsettings set org.gnome.shell.extensions.user-theme name 'Mucha' gsettings set org.gnome.desktop.interface gtk-theme 'Mucha'
- https://wiki.archlinux.org/index.php/GNOME
- http://blog.fpmurphy.com/2011/03/customizing-the-gnome-3-shell.html
- http://blog.fpmurphy.com/2011/05/more-gnome-shell-customization.html
- https://github.com/gnome-integration-team/firefox-gnome
- Customizing Adwaita Window (Metacity) theme based on default metacity-theme-3.xml
$ mkdir -p /usr/share/themes/Mucha/metacity-1/ $ cp /usr/share/themes/Adwaita/metacity-1/metacity-theme-3.xml /usr/share/themes/Mucha/metacity-1/
- reduce titlebar height
$ sed -i '/title_vertical_pad/s|value="[0-9]\{1,2\}"|value="2"|g' /usr/share/themes/Mucha/metacity-1/metacity-theme-3.xml
- change titlebar color (in
titlebar_fill_focused
section)
- change titlebar color (in
$ sed -i 's/gtk:custom(wm_bg_b,gtk:bg\[NORMAL\])/blend\/#000000\/gtk:bg\[NORMAL\]\/0.8/' /usr/share/themes/Mucha/metacity-1/metacity-theme-3.xml
gsettings set org.gnome.desktop.wm.preferences theme 'Mucha' # GNOME 3.16 is DEPRECATED
GNOME Shell
GNOME Shell je zakladna cast user interface v GNOME 3 (spusta aplikacie, prepina okna a pod.), pouziva Mutter (compositing window manager) a je stale aktivne vyvijane.
Developer tools (keyboard command Alt+F2) | |
---|---|
'lg ' |
Looking Glass (GNOME Shell debugger) |
'r ' or 'restart ' |
restart GNOME Shell (not available on Wayland) |
'rt ' |
reload GNOME Shell theme |
'debugexit ' |
quit GNOME Shell |
Prostredie GNOME Shell sa moze flexibilne upravovat pomocou roznych extensions, ktore jednoducho nacitavaju JavaScript a CSS. Je to nahrada za applets a widgets. Subory s GNOME Shell extensions sa nachadzaju v /usr/share/gnome-shell/extensions/<extName>/, resp. ~/.local/share/gnome‑shell/extensions/<extName>/.
Manage GNOME Extensions | ||
---|---|---|
gnome-extensions |
CLI | Command line tool for managing GNOME extensions |
gnome-extensions-app |
GUI | Manage your GNOME Extensions |
https://extensions.gnome.org/local/ | Web | Find and install GNOME Shell extensions using website |
NOTE gnome-shell-extension-prefs and gnome-shell-extension-tool are deprecated, use gnome-extensions instead.NOTE GNOME Shell browser required $ dnf install gnome-browser-connector .
|
$ gnome-extensions list # Installed extensions $ gsettings get org.gnome.shell enabled-extensions # Enabled extensions $ dnf list gnome-shell-extension\* # Available extensions # personally I prefer installing extensions from a web browser instead of installing system packages # $ dnf remove gnome-shell-extension\*
GNOME Shell Extensions
Install gnome-shell-extensions from source https://gitlab.gnome.org/GNOME/gnome-shell-extensions
git clone https://gitlab.gnome.org/GNOME/gnome-shell-extensions.git cd gnome-shell-extensions/ git checkout gnome-45 # set version (ormain
branch) head meson.build # check versionversion: '45.2'
./export-zips.sh gnome-extensions install zip-files/apps-menu@gnome-shell-extensions.gcampax.github.com.shell-extension.zip gnome-extensions install zip-files/window-list@gnome-shell-extensions.gcampax.github.com.shell-extension.zip gnome-extensions enable apps-menu@gnome-shell-extensions.gcampax.github.com gnome-extensions enable window-list@gnome-shell-extensions.gcampax.github.com
ENAME="window-list@gnome-shell-extensions.gcampax.github.com" EDIR="$HOME/.local/share/gnome-shell/extensions/$ENAME" cp -p "$EDIR/stylesheet-dark.css" "$EDIR/stylesheet-dark.css.$(date +%F_%T)" wget https://raw.githubusercontent.com/musinsky/config/master/GNOME/extensions/window-list.stylesheet-dark.css -O - >> "$EDIR/stylesheet-dark.css" gnome-extensions disable "$ENAME" && gnome-extensions enable "$ENAME"
Other Shell Extensions
SDIR="$HOME/.local/share/gnome-shell/extensions/system-monitor-next@paradoxxx.zero.gmail.com/schemas/" gsettings --schemadir "$SDIR" reset-recursively org.gnome.shell.extensions.system-monitor gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor background '#ffffff16' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor icon-display false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor show-tooltip true gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor move-clock false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor cpu-show-text false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor cpu-style 'both' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor cpu-graph-width 80 gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor memory-display false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor net-show-text false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor net-style 'graph' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor disk-usage-style 'bar' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor thermal-display true gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor thermal-show-text false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.system-monitor thermal-style 'digit'
SDIR="$HOME/.local/share/gnome-shell/extensions/openweather-extension@jenslody.de/schemas/" gsettings --schemadir "$SDIR" reset-recursively org.gnome.shell.extensions.openweather gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather use-system-icons false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather disable-forecast false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather unit 'celsius' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather wind-speed-unit 'm/s' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather pressure-unit 'hPa' gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather position-index 1 gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather decimal-places 0 gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather days-forecast 3 gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather expand-forecast false gsettings --schemadir "$SDIR" set org.gnome.shell.extensions.openweather city \ '48.72,21.25>Košice, Slovensko>0 && 46.23,6.05>CERN, Switzerland>0 && 56.67,37.86>Дубна, Россия>0'