How can I add more wallpapers?
Solution 1
You might want to install wallch from Software Center and add it to the Startup Applications. That is an application made for that purpose, as described before.
Solution 2
Well, I think I found the answer. First, you should take ownership of /usr/share/backgrounds
and /usr/share/backgrounds/contest/precise.xml
using the chown
command. Then you can copy your favorite image(s) to /usr/share/backgrounds
. Then you can modify precise.xml
to do your desired job.
Open precise.xml
in a text editor. Suppose the image you want to add is named ABSTRACT-AnotherBlue_1024x768.png
. Then you should copy one part of the body program and modify it like:
<static><duration>1795.0</duration>
<file>/usr/share/backgrounds/ABSTRACT-AnotherBlue_1024x768.png</file></static
<transition><duration>5.0</duration>
<from>/usr/share/backgrounds/Twilight_Frost_by_Phil_Jackson.jpg</from>
<to>/usr/share/backgrounds/Twilight_Frost_by_Phil_Jackson.jpg</to></transition>
Note that the next image name is Twilight_Frost_by_Phil_Jackson.jpg
, so you should copy this piece just before:
<static><duration>1795.0</duration>
<file>/usr/share/backgrounds/Twilight_Frost_by_Phil_Jackson.jpg</file></static>
<transition><duration>5.0</duration
<from>/usr/share/backgrounds/Twilight_Frost_by_Phil_Jackson.jpg</from>
<to>/usr/share/backgrounds/Precise_Pangolin_by_Vlad_Gerasimov.jpg</to></transition>
Now save and exit. Then restart your computer. You're done!
Solution 3
I wrote a perl script to build out the xml file. So if you have a directory with a ton of images and you would like to use them for backgrounds that change through out the day you can just run this once to build the list.
#! /usr/bin/perl
use strict;
use warnings;
# Change the value below to the directory where you images are stored!
my $dir = "/~/Pictures/backgrounds";
my $transition_duration = '5.0';
my $duration = '1795.0';
# Change the value below to the xml file to build.
my $bg_list_file = "/usr/share/backgrounds/contest/saucy.xml";
my @pictures;
opendir(DIR, $dir) or die $!;
while (my $file = readdir(DIR)){
next unless (-f "$dir/$file");
push @pictures, $file;
}
my $last_file;
open (my $fh, '>', $bg_list_file) or die "Could not open file '$bg_list_file' $1";
print $fh " <background>\n\t<starttime>\n\t\t<year>2009</year>\n\t\t<month>08</month>\n\t\t<day>04</day>\n\t\t<hour>00</hour>\n\t\t<minute>00</minute>\n\t\t<second>00</second>\n\t</starttime>\n";
foreach my $pic (@pictures){
my $xml = "\t<static>\n\t\t<duration>$duration</duration>\n\t\t<file>$dir/$pic</file>\n\t</static>";
if (defined $last_file and length $last_file){
$xml = "\t<transition>\n\t\t<duration>$transition_duration</duration>\n\t\t<from>$dir/$last_file</from>\n\t\t<to>$dir/$pic</to>\n\t</transition>\n$xml";
}
$last_file = $pic;
print $fh "$xml\n";
}
print $fh "</background>";
close $fh;
exit;
Hope it helps!
Related videos on Youtube
bjnobrega
Updated on September 18, 2022Comments
-
bjnobrega about 1 year
How do I increase the amount of wallpapers that appear on the menu for customizing the desktop with my backgrounds in 11.10?
I added more images to the respective folder in
/usr/share/background
as root, but the list does not remain persistent.The images in 11:10 changes alone. So I want to add funds to enhance the environment. When I copy the images to the folder
/usr/share/backgrounds
the list is updated and increased. But only for the first time. Thereafter, the system ignores the other images, and the list of funds has become original as first.Any help?
-
bjnobrega over 11 yearsAlexandre, the system is running good in changing the backgrounds. So far, so good. I just want to add more pics to the original of 11.10 list's but i can't see the impediment..
-
bjnobrega over 11 yearsGood point the second option, but what I've tried to add the images by pressing the plus (+) and minus (-), but the image disappears from the list, except the original images of Ubuntu.
-
bjnobrega over 11 yearsYes this is an option but the system already change the funds. I just want add more.
-
bjnobrega over 11 yearsBut what I've tried to add the images by pressing the plus (+) and minus (-), but the image disappears from the list, except the original images of Ubuntu. How can i package the pics and create a xml file to follow your tip?
-
bjnobrega over 11 yearsMy desire is to shown my backgrounds and ubuntu backgrounds in same folder.
-
RSX-1327 over 11 yearsI believe you have to use a different folder than the default one, the collection might be locked or something; have you tried that?
-
bjnobrega over 11 yearsIf the default pics are shown why others cant? Even under root access?
-
RSX-1327 over 11 yearsHave you attempted to use the
chmod
command in terminal? If you didn't have write, then you shouldn't have been able to modify anything in the folder. -
bjnobrega over 11 yearsI will try this.
-
dobey over 11 years@bjnobrega When you add them with the [+] button, they appear under the "Pictures" item instead, the next time you open the appearance properties. If you click on the "Wallpapers" drop-down and choose "Pictures" you should see them in there. I'll update my answer about the XML file, as there's another place you can put it, instead of making a .deb package.
-
bjnobrega over 11 yearsOk. Thank's for helping. Waiting for final tip.
-
jokerdino over 11 years@Alexandre, use this browser script to add apt links to the software in your answer.