Results 1 to 4 of 4

Thread: Wallpaper changer

  1. #1
    Join Date
    Feb 2008
    Location
    Sheffield, UK
    Beans
    49
    Distro
    Ubuntu 10.04 Lucid Lynx

    Wallpaper changer

    Does anyone know of a program that could change my desktop wallpaper every few minutes from a selection in a folder?
    I'm not sure if said program exists, but would by mightily awesome.

    EDIT: found: http://ubuntuforums.org/showthread.p...ight=wallpaper
    *headdesk* Forgot to search before posting xD
    Last edited by tuxsheadache; December 14th, 2008 at 02:39 PM.
    Laptop: Ubuntu 10.04, Dell Studio 15, Core i5-450M (~2.4Ghz) 1GB ATI Mobility Radeon HD5470, 4GB (~1333MHz) DDR3.
    PC 1: Ubuntu 11.04/Windows 7, M3A32-MVP Deluxe/WiFi-AP, AMD X2 5050e (~2.6Ghz, 45W), 2GB (~800Mhz),256MB Sapphire Radeon HD2600XT.

  2. #2
    Join Date
    Jul 2007
    Location
    The Shire, Canada
    Beans
    Hidden!

    Re: Wallpaper changer

    Only for 8.04, and you're using 8.10. The GNOME team changed it so that it can't be done with the program that I know, at least not yet. Keep an eye on the thread though, the answer may yet come.


    http://ubuntuforums.org/showthread.php?t=888746
    Another round of Ubuntu for my friends here!
    Fighting to bring Pink back to The Pink Ponies archive.
    DELETE INSANITY!

  3. #3
    Join Date
    Aug 2007
    Location
    La Plata
    Beans
    111
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: Wallpaper changer

    This script changes your wallpaper randomly from a folder.
    You can schedule a cron job to execute it every couple of minutes if you want to; I set it up to get executed at the beginning of each session.
    If the picture name starts with the word "tile", it sets the wallpaper in tile mode. Otherwise, it stretches the picture to fit the screen. Pictures must be in *.jpg.
    Before running it, edit line 5 with your pics folder path.

    Comments are in spanish, sorry.

    Code:
    #!/bin/bash
    # almacenamos en una variable la carpeta donde residen las imagenes. en mi
    # caso /home/jose, cambia este valor por el que quieras usar en tu caso.
    
    picsfolder="/home/bruno/Imagenes/Wallpapers/"
    
    # Nos movemos al directorio donde estan las imagenes
    cd $picsfolder
    
    # Creamos un array con todos los ficheros de ese directorio que tengan
    # extension .jpg Un array es un concepto de programacion, podriamos
    # considerarlo como una lista de valores a los que podemos acceder por un
    # indice que es su posicion en esa lista. Por ejemplo, podriamos tener un
    # array llamado "dias" que almacenara los siguientes valores: lunes,
    # martes, miercoles, jueves y viernes. dias = [ lunes, martes,
    # miercoles, jueves, viernes]. Con ese array podriamos referenciar a un
    # elemento del mismo a partir de su posicion. Ejemplo: dias[0] es lunes,
    # dias[2] es miercoles.  En este ejemplo lo que hacemos es crear un array
    # con los nombres de todos los ficheros .jpg del directorio
    files=( *.jpg )
    
    # Recuperamos el numero de ficheros, N almacenara el numero de elementos del
    # array
    N=${#files[@]}
    
    # Seleccionamos "aleatoriamente" un valor de esos N ficheros
    ((N=RANDOM%N))
    
    # Con ese valor aleatorio (indice del array) accedemos al array y
    # recuperamos el nombre del fichero
    randomfile=${files[$N]}
    echo $randomfile
    
    # Si el nombre de archivo comienza con "tile", setear la opción
    # correspondiente
    
    A=`echo $randomfile | sed 's/^\(\w\{4\}\).*/\1/'`
    if [ "$A" = "tile" ]; then
        OPTION="wallpaper"
        echo $OPTION
    else
        OPTION="streched"
        echo $OPTION
    fi
    
    
    # Y una vez recuperado el nombre de ese fichero llamamos a gconftool para
    # fijar ese fichero como fondo de escritorio
    gconftool-2 -t str --set /desktop/gnome/background/picture_filename $picsfolder$randomfile
    
    # cambiamos tambien las propiedades de la imagen que se muestra
    gconftool-2 -t str --set /desktop/gnome/background/picture_options $OPTION #posibles valores "none", "wallpaper" (mosaico), "centered" "scaled", "stretched"

  4. #4
    Join Date
    Sep 2007
    Beans
    Hidden!

    Re: Wallpaper changer

    Wallpaper Tray works great for me. It can be installed via either apt-get or Synaptic Package Manager. The package title is wallpaper-tray.
    Have you ever found something in the second-to-last place you looked?
    If it seems like I am ignoring you, perhaps I am.
    world:~ mike$ rm -f /earth/united_states/washington/redmond/M$ █

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •