Page 5 of 5 FirstFirst ... 345
Results 41 to 48 of 48

Thread: HowTo: Create a background slideshow.

  1. #41
    Join Date
    Mar 2011
    Beans
    15

    Thumbs down Re: HowTo: Create a background slideshow.

    Quote Originally Posted by k3lt01 View Post
    .... I think you'll need to look for the file that controls global settings in appearance and see what it is like....
    Ok I've got that. I did an strace on the files that are read/written by gnome-appearance-properties and it looks like the properties file is:~/.gnome2/backgrounds.xml. A segment for setting a wallpaper slide show looks like:
    <wallpaper deleted="false">
    <name>Contest</name>
    <filename>/usr/share/backgrounds/contest/background-1.xml</filename>
    <options>zoom</options>
    <shade_type>solid</shade_type>
    <pcolor>#2c2c00001e1e</pcolor>
    <scolor>#2c2c00001e1e</scolor>
    </wallpaper>
    Are you saying I should add the options/pcolor/scolor values to the slideshow xmi file (in this instance background-1.xml)??

  2. #42
    Join Date
    Oct 2007
    Location
    Australia
    Beans
    1,715
    Distro
    Ubuntu Development Release

    Re: HowTo: Create a background slideshow.

    I have tried a numerous times to reply to you but my net connection is slow as a wet week today.

    You could try inserting those code lines into the xml file. I would try different positions within the xml until you get it to work, not that I am saying it will work but certainly give it a try.

    I'm sorry I can't be of more assistance at the moment. Let us know how you go and if you have any more questions please ask and I will do my best to help out.
    Ubuntu User 23142 | Wiki | Laptop | HowTo:Create a background slideshow and Screensaver | Reconditioning pre-loved PCs and installing Ubuntu to give away to good homes.

  3. #43
    Join Date
    Mar 2011
    Beans
    15

    Thumbs down Re: HowTo: Create a background slideshow.

    Quote Originally Posted by k3lt01 View Post
    ...Let us know how you go and if you have any more questions please ask and I will do my best to help out...
    Thank you. I ended up creating a slideshow XML file using the XML format you already gave us and then select it and the option values using the background tool. This sets the options for the whole slide show but thats adequate.

    Right now I'm trying to get the latest version (3.3) of openoffice installed. 3.2 seems to have problems with furagana text I created using OO on windows.

    I have a little 60 line perl script that creates the XML that I'd be happy to publish somewhere if you think anyone would be interested.

    I really appreciate your quick replies! Thanks!

  4. #44
    Join Date
    Oct 2007
    Location
    Australia
    Beans
    1,715
    Distro
    Ubuntu Development Release

    Re: HowTo: Create a background slideshow.

    You can attach your script in your next post of you wish and I will update the OP to let people know it's available.

    I don't want to go to far off-track in tnis thread but I understand your desire to update OOo but if I may suggest you try out LO (Libre Office) which is the new Open Source version of what was Open Office. I think it will be available in 11.04 but if not you can add a PPA to your sources.list and use synaptic to install it.
    Ubuntu User 23142 | Wiki | Laptop | HowTo:Create a background slideshow and Screensaver | Reconditioning pre-loved PCs and installing Ubuntu to give away to good homes.

  5. #45
    Join Date
    Mar 2011
    Beans
    15

    Thumbs down Re: HowTo: Create a background slideshow.

    Here's that perl script. To use it, just put it on your path and call it something that makes sense. I call it MakeSlideshow.pl. With no arguments it prints usage. It requires an output directory where it expects to find the image files and you can optionally give it a time period for the image display

    I've been copying the image directory to /usr/share/backgrounds, running the script and then using the Apperance Preferences applet to add the xml file to the backgrounds/slideshows.

    By the way, I wasn't asking for help on OO -- just saying why I was moving on. I installed LibreOffice 3.3 which is a fork of OO and that fixed my problem. There was a thread on how to do that.

    Again, thanks for the help.
    ==================
    #!/usr/local/bin/perl -w
    # $Header: /home/sjs/bin/RCS/MakeSlideshow.pl,v 1.1 2011/03/16 15:51:24 sjs Exp $
    use strict;
    use Cwd 'abs_path';
    use File::Basename 'basename';
    ...

    This script had bugs. Please see the following post.
    Last edited by bebopiiam; March 17th, 2011 at 04:55 PM.

  6. #46
    Join Date
    Mar 2011
    Beans
    15

    Red face Re: HowTo: Create a background slideshow.

    Sorry. Theres an error in that script. This should be more better.
    =================
    #!/usr/local/bin/perl -w # $Header: /home/sjs/bin/RCS/MakeSlideshow.pl,v 1.2 2011/03/16 23:57:53 sjs Exp $
    use strict;
    use Cwd 'abs_path';
    use File::Basename 'basename';

    my $USAGE = "USAGE: " . basename($0) . " output_directory [display_time]
    Make a slideshow xml file for image (.png, .jpg and .bmp files) based on files found in output_directory. Output file is named 'slideshow.xml'.
    Display time is optional and defaults to 5 minutes. If input it is an
    integer value for minutes.
    ";

    my $OutputDirectory = shift @ARGV || die $USAGE;
    my $DisplayTime = shift @ARGV || 5;
    -d $OutputDirectory || die $USAGE, "$OutputDirectory is not directory.\n";
    -w $OutputDirectory || die $USAGE, "$OutputDirectory is not writable.\n";
    die $USAGE, "Invalid time value: $DisplayTime\n" unless $DisplayTime =~ /^\d+$/;
    die $USAGE if @ARGV;
    $OutputDirectory = abs_path($OutputDirectory);

    my @GraphicsFiles = grep -f && m{\.(png|jpg|bmp)$}, <$OutputDirectory/*>;
    die $USAGE, "No graphic files found in $OutputDirectory\n" unless @GraphicsFiles;
    print "Found ", scalar @GraphicsFiles, " graphics files.\n";

    # Shuffel the graphics files.
    foreach my $index (0..$#GraphicsFiles) {
    my $rand = int(rand($#GraphicsFiles));
    my $tmp = $GraphicsFiles[$index];
    $GraphicsFiles[$index] = $GraphicsFiles[$rand];
    $GraphicsFiles[$rand] = $tmp;
    }
    my $OutputFile = "$OutputDirectory/slideshow.xml";
    print "Creating $OutputFile with $DisplayTime minute display time.\n";
    open (F, "> $OutputFile") || die "Failed to open $OutputFile for write.\n";
    my $Header = '<?xml version="1.0" encoding="utf-8"?>
    <background>
    <starttime>
    <year>2010</year>
    <month>01</month>
    <day>01</day>
    <hour>00</hour>
    <minute>00</minute>
    <second>00</second>
    </starttime>
    ';
    print F $Header;
    my $next_index = 1;
    foreach my $index (0..$#GraphicsFiles) {
    my $this_file = $GraphicsFiles[$index];
    my $next_file = $GraphicsFiles[$next_index];
    $next_index = ($next_index == $#GraphicsFiles) ? 0 : $next_index + 1;
    print F " <static>\n"
    , " <duration>300.0</duration>\n"
    , " <file>$this_file</file>\n"
    , " </static>\n"
    , " <transition type=\"overlay\">\n"
    , " <duration>$DisplayTime</duration>\n"
    , " <from>$this_file</from>\n"
    , " <to>$next_file</to>\n"
    , " </transition>\n";
    }

    print F "</background>\n";
    close F;
    exit 0;

  7. #47
    Join Date
    Oct 2007
    Location
    Australia
    Beans
    1,715
    Distro
    Ubuntu Development Release

    Re: HowTo: Create a background slideshow.

    Thanks for that I'll link to the new post in the OP now. Just so people don't get confused and choose the wrong script it may be an idea if you edit the previous post. Also, it doesn't worry me cause the script isn't very big, you may find people requesting you to put things in code boxes in other threads. Code boxes help to make the post smaller and more manageable to read.
    Ubuntu User 23142 | Wiki | Laptop | HowTo:Create a background slideshow and Screensaver | Reconditioning pre-loved PCs and installing Ubuntu to give away to good homes.

  8. #48
    Join Date
    Mar 2011
    Beans
    15

    Re: HowTo: Create a background slideshow.

    Quote Originally Posted by k3lt01 View Post
    Thanks for that I'll link to the new post in the OP now. Just so people don't get confused and choose the wrong script it may be an idea if you edit the previous post. Also, it doesn't worry me cause the script isn't very big, you may find people requesting you to put things in code boxes in other threads. Code boxes help to make the post smaller and more manageable to read.
    Thanks for the advice. I'm still new here...

Page 5 of 5 FirstFirst ... 345

Tags for this Thread

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
  •