Change sizes of gnome desktop background

By | 26th June 2015

A simple script to change the background.

 

Just a simple bash script for changing the position of your wallpaper, and it works on Fedora 18;)

#!/bin/bash
      OPTIONS="Centered Scaled Spanned Zoom Stretched Wallpaper Quit"
        select opt in $OPTIONS; do
            if [ "$opt" = "Centered" ]; then
                gsettings set org.gnome.desktop.background picture-options "centered"
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Scaled" ]; then
                gsettings set org.gnome.desktop.background picture-options "scaled"
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Spanned" ]; then
                gsettings set org.gnome.desktop.background picture-options "spanned"        
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Zoom" ]; then
                gsettings set org.gnome.desktop.background picture-options "zoom"
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Stretched" ]; then
                gsettings set org.gnome.desktop.background picture-options "stretched"
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Wallpaper" ]; then
                gsettings set org.gnome.desktop.background picture-options "wallpaper"      
                echo You choose the background-picture to be $opt ! | tr '[A-Z]' '[a-z]' 
            elif [ "$opt" = "Quit" ]; then
                echo done
                exit
            else
                clear
                echo Bad option
            fi
        done

source: https://ask.fedoraproject.org/en/question/24825/on-gnome3-how-can-i-center-an-image-as-my-wallpaper-or-maybe-stretch-or-tile-it/