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
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
Quote:
Originally Posted by
gringogrande
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)'
?
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
Quote:
Originally Posted by
daynah
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.
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
Quote:
Originally Posted by
ramasdf123
how can i get this to work on gnome?
http://ubuntuforums.org/showthread.php?t=415255
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
Quote:
Originally Posted by
gringogrande
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.
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
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.
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
I know I'm resurrecting the dead here, but this is AMAZING. Thanks a lot, works perfectly.
Re: HowTo: Wallpaper Changer for Xubuntu (Xfce)
Interesante.
Gracias por el how-to
Un saludo.
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