Thread: HOWTO: Random Wallpapers on Different Monitors with Different Resolutions
to setup
assumptions: works in gnome. have 1 or 2 monitors. don't have more isn't tested more. think may work...not sure on point.
script setup
1) download attachment wallpaper.sh (it perl file .pl blocked works fine either extension.)
2) sudo apt-get install perlmagick (this installs perlmagick splicing of images , outputing them.)
3) open terminal
4) mkdir ~/.wallpaper (or wherever want put wallpaper images.)
5) place wallpapers in ~/.wallpaper (or wherever made folder). wallpapers must exact resolution of monitor or won't picked.
6) open gedit (applications -> accessories -> text editor or open terminal -> gedit)
7) open wallpaper.sh gedit
config pretty self explanatory let example config.
let say, sake of argument, monitors 1920x1200 , 1440x900. right next each other, horizontally. (bigger monitor on right, smaller on left.) need modify numbers used according setup.
8) find @outputscreen line. add widths , use largest height. if doing vertical, opposite.
9) find @screens line. first monitor 1 furthest on right. here put in monitor resolutions. correct our example config.code:my @outputscreen = ('3360','1200');
10) find $orientation line. since our monitors horizontally aligned, correct. if had 1 on top of other, we'd need change vertical.code:my @screens = ( ['1920', '1200'], ['1440', '900'], );
11) find @wallpaper_dirs line. change looks this. replace [username] username if used default wallpaper directory location.code:my $orientation = "horizontal";
12) find $output_file line. change looks this. replace [username] username if used default wallpaper directory location. if want desktop image somewhere else, adjust accordingly.code:my @wallpaper_dirs = ( '/home/[username]/.wallpaper/', );
13) open terminalcode:my $output_file = "/home/[username]/.wallpaper/output.jpg";
14) /path/to/wallpaper/wallpaper.sh
15) if wallpaper shows in wrong place, or else goes wrong, fix config accordingly.
cron job
(if want run every x length of time, if lazy , want stitch wallpaper instead of gimp, run normally.)
1) open terminal
2) crontab -e
3) choose prefered editor (i'd go nano if don't know means.)
4) insert following line @ end of file. suggested length 30 minutes. in other words, every 30 minutes wallpapers try switch. may not if have small # of wallpapers given resolution. if want faster / longer modify number 30. (e.g. 1 every minute. 59 every 59 minutes.) remove >/dev/null 2>&1 if want receive 'mail' (via mail command) cron job.
code:*/30 * * * * /path/to/wallpaper.sh >/dev/null 2>&1
to revert changes
1) delete relevant file (wallpaper.sh) placed.
2) crontab -e
3) delete crontab line added.
approved, , thank contributing tutorials & tips!
Forum The Ubuntu Forum Community Other Discussion and Support Tutorials Outdated Tutorials & Tips HOWTO: Random Wallpapers on Different Monitors with Different Resolutions
Ubuntu
Comments
Post a Comment