Page 4 of 7 FirstFirst ... 23456 ... LastLast
Results 31 to 40 of 63

Thread: HOWTO: Finally! How to easily change your desktop to a random file at specified times

  1. #31
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    Quote Originally Posted by pt123 View Post
    Thanks Loke,

    yabbadabbadont then you can create 2+ lists, depending on how you have kept your wallpapers.

    Or you can create 2 random numbers
    eg. random1x 3 + (RANDOM2 % 3)
    will handle 32,000 X 3 wallpapers.
    I just wrote a tiny C program to generate them. It works well with my randomizing and rotating scripts. Besides, I think that your method won't work. I'm not positive, but I think that all numeric variables are limited to 32K in bash. Don't quote me on that though.

    In case anyone wants it, here is my getrandom.c code:
    Code:
    #include <time.h>
    #include <stdlib.h>
    #include <stdio.h>
    
    /*
    ** With no parameter, just print the
    ** results of calling random() to stdout.
    **
    ** With a parameter, limit the maximum
    ** value printed to that parameter.
    */
    
    int main(int argc, char *argv[])
    {
            int i = 0;
            long int j = 0;
    
            /*
            ** Seed the PRNG with the current time.
            */
    
            srandom((unsigned int) time((time_t *) NULL));
    
            /*
            ** PRNG's generally return better results
            ** after they have been hit a few thousand
            ** times.  My needs aren't that strict, so
            ** I'll just hit it a thousand times. ;)
            */
    
            for (i = 0; i < 1000; i++)
                    j = random();
    
            /*
            ** Are we limiting the value?
            */
    
            if (argc == 2)
            {
                    printf("%ld", (j % atol(argv[1])) + 1);
            }
            else
            {
                    printf("%ld", j);
            }
    
            return 0;
    }

  2. #32
    Join Date
    Oct 2007
    Location
    Denton, TX
    Beans
    426
    Distro
    Lubuntu Development Release

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    Quote Originally Posted by yabbadabbadont View Post
    ...That just doesn't cut it for a serious wallpaper collector like myself...

    (about 60,000 or so)
    holy... ****

  3. #33
    Join Date
    Jul 2005
    Location
    2 exits past crazy
    Beans
    4,222
    Distro
    Lubuntu 12.10 Quantal Quetzal

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    Quote Originally Posted by Saint Angeles View Post
    holy... ****
    <Jeopardy>What do you find in baby Jesus' diapers?</Jeopardy>



    You have to pull some tricks to optimize things so that the scripts will actually run in a reasonable amount of time.

  4. #34
    Join Date
    Feb 2006
    Location
    Albuquerque
    Beans
    20
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    I did not check your scripts, but use wallpaper tray. This is a nice little program, that does everything I need (change randomly ...) and is easily downloadable with the synaptic package manager.

  5. #35
    Join Date
    Dec 2007
    Location
    Behind you!!
    Beans
    978
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    Wicked tuto m8,. nice and simple like,. cheers

  6. #36
    Join Date
    Dec 2005
    Beans
    733
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    I have to ask for those using gnome how sudden are the wallpaper changes.
    I remember i tried something similiar a few years ago in gnome but i didn't like how the transition from one wallpaper to the next was so sudden.
    I was looking for something that did smooth transitions from one wallpaper to the next like what happens in Mac desktops, has it progressed as far as that?

  7. #37
    Join Date
    Jul 2005
    Beans
    740
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    it is a sudden change

  8. #38
    Join Date
    Jun 2008
    Location
    San Diego
    Beans
    182
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    A fellow user and I wrote a GUI program to do this. It works with Gnome's built in feature and it has a fading effect. It is released as a deb, so it can be installed with a couple clicks. It is GPL.

    Check out this post:
    http://ubuntuforums.org/showpost.php...5&postcount=30

    From this thread:
    http://ubuntuforums.org/showthread.php?t=798634
    Site | My PHP Framework
    "…the Linux philosophy is 'laugh in the face of danger'. Oops. Wrong one. 'Do it yourself'. That's it." -Linus Torvalds

  9. #39
    Join Date
    Feb 2007
    Beans
    14

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    Thanks for the great howto!

  10. #40
    Join Date
    Sep 2008
    Beans
    3

    Re: HOWTO: Finally! How to easily change your desktop to a random file at specified t

    great tutorial, but i seem to have a problem with the timer - doesnt change pics, i can change manually, but doesnt change automatically. any suggestions???

Page 4 of 7 FirstFirst ... 23456 ... 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
  •