demo-wallpaper-select

Project

建構基礎

設定桌面圖片

gnome-shell

實作程式碼片段

gsettings set org.gnome.desktop.background picture-uri "file:///usr/share/backgrounds/default.jpg"

gsettings set org.gnome.desktop.background picture-uri-dark "file:///usr/share/backgrounds/default.jpg"

gsettings set org.gnome.desktop.screensaver picture-uri "file:///usr/share/backgrounds/default.jpg"

cinnamon

實作程式碼片段

gsettings set org.cinnamon.desktop.background picture-uri "file:///usr/share/backgrounds/default.jpg"

gsettings set org.cinnamon.desktop.background picture-options "zoom"

mate

實作程式碼片段

gsettings set org.mate.background picture-filename "/usr/share/backgrounds/default.jpg"

gsettings set org.mate.background picture-options "zoom"

xfce

實作程式碼片段

local screen=`xrandr --listactivemonitors | awk -F ' ' 'END {print $1}' | tr -d \:`
local monitor=`xrandr --listactivemonitors | awk -F ' ' 'END {print $2}' | tr -d \*+`


xfconf-query --channel xfce4-desktop --property "/backdrop/screen${screen}/monitor${monitor}/workspace0/last-image" --set "/usr/share/backgrounds/default.jpg" --type 'string' --create

xfconf-query --channel xfce4-desktop --property "/backdrop/screen${screen}/monitor${monitor}/workspace0/image-style" --set 5 --type 'int' --create

xfconf-query --channel xfce4-desktop --property "/backdrop/single-workspace-mode" --set 'true' --type 'bool' --create

feh

實作程式碼片段

feh --bg-scale "/usr/share/backgrounds/default.jpg"

pcmanfm

實作程式碼片段

pcmanfm --set-wallpaper "/usr/share/backgrounds/default.jpg"

pcmanfm --wallpaper-mode "fit"

pcmanfm-qt

實作程式碼片段

pcmanfm-qt --set-wallpaper "/usr/share/backgrounds/default.jpg"

pcmanfm-qt --wallpaper-mode "fit"