Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: HowTo: Wallpaper Changer for Xubuntu (Xfce)

  1. #11
    Join Date
    Mar 2007
    Beans
    6
    Distro
    Xubuntu 6.10 Edgy

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Nice. Problem is that my computer has a tendency of freezing up during the changes, and when I'm playing games or watching movies, I'd prefer it to not switch, so I whipped up a little script that temporarily lowers it scheduling priority.

    Code:
    #!/bin/bash
    #change-background
    
    #get the pid for xfdesktop
    pid=`ps -e | grep xfdesktop | gawk '{print $1}'`
    
    #a regular expression containing the names of the processes
    #that will defer the switching
    deferred='(mplayer|xgame)'
    
    if [[ -z $pid ]] && [[ -n `ps -e | egrep $deferred` ]]; then
    
    else
        renice 19 -p $pid
        kill -USR1 $pid
        renice 0 -p $pid
    fi

  2. #12
    Join Date
    Nov 2005
    Beans
    259
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Quote Originally Posted by gringogrande View Post
    Nice. Problem is that my computer has a tendency of freezing up during the changes, and when I'm playing games or watching movies, I'd prefer it to not switch, so I whipped up a little script that temporarily lowers it scheduling priority.

    Code:
    #!/bin/bash
    #change-background
    
    #get the pid for xfdesktop
    pid=`ps -e | grep xfdesktop | gawk '{print $1}'`
    
    #a regular expression containing the names of the processes
    #that will defer the switching
    deferred='(mplayer|xgame)'
    
    if [[ -z $pid ]] && [[ -n `ps -e | egrep $deferred` ]]; then
    
    else
        renice 19 -p $pid
        kill -USR1 $pid
        renice 0 -p $pid
    fi
    I'm not smart like you. Is it on line 9 that I could change it to something like...

    Code:
    deferred='(mplayer|xgame|vlc)'
    ?

  3. #13
    Join Date
    Mar 2007
    Beans
    6
    Distro
    Xubuntu 6.10 Edgy

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Quote Originally Posted by daynah View Post
    I'm not smart like you. Is it on line 9 that I could change it to something like...

    Code:
    deferred='(mplayer|xgame|vlc)'
    ?
    Yes, exactly. Any process that contains the three letter combination 'vlc' (like wxvlc, for instance) will then disable the script from changing the background.

  4. #14
    Join Date
    Apr 2007
    Location
    On your plate
    Beans
    99
    Distro
    Xubuntu

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Quote Originally Posted by ramasdf123 View Post
    how can i get this to work on gnome?
    http://ubuntuforums.org/showthread.php?t=415255

  5. #15
    Join Date
    Jun 2007
    Location
    Melbourne, Vic, Australia
    Beans
    85
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Quote Originally Posted by gringogrande View Post
    Nice. Problem is that my computer has a tendency of freezing up during the changes, and when I'm playing games or watching movies, I'd prefer it to not switch, so I whipped up a little script that temporarily lowers it scheduling priority.

    Code:
    #!/bin/bash
    #change-background
    
    #get the pid for xfdesktop
    pid=`ps -e | grep xfdesktop | gawk '{print $1}'`
    
    #a regular expression containing the names of the processes
    #that will defer the switching
    deferred='(mplayer|xgame)'
    
    if [[ -z $pid ]] && [[ -n `ps -e | egrep $deferred` ]]; then
    
    else
        renice 19 -p $pid
        kill -USR1 $pid
        renice 0 -p $pid
    fi
    I used this script and it is working perfectly, thanks.

    It makes life so much easier when things just work! I added an icon so that if I don't feel like using that image then I can switch to a new one.

    Thanks for the tip.
    No Coffee, No Workee

  6. #16
    Join Date
    Feb 2007
    Location
    Jersey City, NJ, USA
    Beans
    92
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Thanks, this helped.

  7. #17
    Join Date
    Mar 2008
    Beans
    20
    Distro
    Xubuntu 8.04 Hardy Heron

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    I ended up using this crontab line to avoid trying to send signals to other users' xfdesktop processes:

    Code:
    */10 * * * * kill -USR1 $(ps awxu | grep -E '^loginname[ \t]+.+[0-9:]+ /usr/bin/xfdesktop' | awk '{print $2}') >/dev/null 2>&1
    Replace the underlined "loginname" with your login name.
    Last edited by dakal; June 13th, 2008 at 03:30 PM.

  8. #18
    Join Date
    Jul 2007
    Location
    /earth/USA/WA/Spokane
    Beans
    299
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    I know I'm resurrecting the dead here, but this is AMAZING. Thanks a lot, works perfectly.
    Ubuntu User # 17031
    Quote Originally Posted by RAV TUX View Post
    who needs support when you use Linux.
    Quote Originally Posted by asjdfwejqrfjcvm msz34rq33 View Post
    Open-Source: The power to create completely useless, but extremely cool, programs.

  9. #19
    Join Date
    Nov 2008
    Location
    Spain
    Beans
    3
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    Interesante.

    Gracias por el how-to

    Un saludo.

  10. #20
    Join Date
    Sep 2008
    Location
    Rīga, Latvija
    Beans
    126
    Distro
    Xubuntu 10.04 Lucid Lynx

    Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)

    I would suggest easyr is this.
    After putting wallpaper list and installing cron
    just open crontab -e
    paste there just */5 * * * * export DISPLAY=:0; /usr/bin/xfdesktop -reload
    save and exit with ctrl+shift+X and then Y and Enter
    and thats it.
    it will make every minute that can be divided by 5 to reload xfdesktop so basicly every 5 minuts
    Last edited by Kangarooo; June 18th, 2010 at 10:13 AM.

Page 2 of 3 FirstFirst 123 LastLast

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
  •