Page 1 of 2 12 LastLast
Results 1 to 10 of 23

Thread: HOWTO: XPlanet

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Beans
    Hidden!

    HOWTO: XPlanet

    First of all, XPlanet displays the current daylight conditions in the world, as you desktop background.

    Screenshot


    First of all, install XPlanet:
    Code:
    $ sudo apt-get install xplanet

    Once installed, you have two options:

    1) Navigate to the xplanet folder and download some images to use for XPlanet. You will need to replace USERNAME with your user name.

    Code:
    $ cd /home/USERNAME/.xplanet/images/
    $ wget http://visibleearth.nasa.gov/images/2433/land_shallow_topo_2048.jpg
    $ mv land_shallow_topo_2048.jpg earth.jpg
    $ wget http://visibleearth.nasa.gov/images/1438/earth_lights_lrg.jpg
    $ mv earth_lights_lrg.jpg night.jpg
    or

    2) Install xplanet-images (thanks to mike998 for the info):

    Code:
    $ sudo apt-get install xplanet-images
    Next, we need to stop nautilus from controlling the desktop:
    Applications > System Tools > Configuration Editor
    In the Configuration Editor, go to apps > nautilus > preferences and untick "show_desktop".

    Finally, we need to start XPlanet when we log in:
    System > Preferences > Sessions
    Click on the "Startup Programs" tab, and click on "Add". Enter "xplanet" (without the quotes) into the "Startup Command" text box, and click OK.

    Log out and back in, and you should see an image of earth as your background.
    Last edited by Psycho275; July 16th, 2005 at 06:46 PM. Reason: Added xplanet-images package details.

  2. #2
    Join Date
    Nov 2004
    Location
    Ottawa, Canada
    Beans
    Hidden!
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: HOWTO: XPlanet

    You can install the xplanet-images package if you want rather than downloading the pictures.

    Good how-to - it was the not displaying background that I had missed previously.

  3. #3
    Join Date
    Jun 2005
    Beans
    Hidden!

    Re: HOWTO: XPlanet

    Quote Originally Posted by mike998
    You can install the xplanet-images package if you want rather than downloading the pictures.
    I saw the package when looking for xplanet, but didn't mention it as I haven't tried it yet.

    Quote Originally Posted by mike998
    Good how-to - it was the not displaying background that I had missed previously.
    Thanks - It took me a little while to figure out how to hide the background. One problem with not allowing nautilus to control the desktop is that it will no longer show icons for removable devices on the desktop automatically, so I now use "Computer" through Nautilus instead to access it.

  4. #4
    Join Date
    Nov 2004
    Location
    Nyack NY USA
    Beans
    988
    Distro
    Ubuntu Development Release

    Re: HOWTO: XPlanet

    To avoid losing my desktop icons I don't use the nautilus change you mention and use instead this script which works with gnome2

    http://stef.tvk.rwth-aachen.de/~nazgul/linux-hacks.php

    Great idea btw!

  5. #5
    Join Date
    Nov 2004
    Location
    Nyack NY USA
    Beans
    988
    Distro
    Ubuntu Development Release

    Re: HOWTO: XPlanet

    Actually for some reason the script borks so ignore my previous post

  6. #6
    Join Date
    Nov 2004
    Location
    Nyack NY USA
    Beans
    988
    Distro
    Ubuntu Development Release

    Re: HOWTO: XPlanet

    This one works better (you need python installed:


    #!/usr/bin/env python

    # Script for handling xplanet in Gnome
    # Add this script to your "Startup Programs" in the "Sessions" control center applet

    import sys, os, time, glob

    def main(argv):
    #we use /tmp to store image files
    originalFilename = '/tmp/xplanet-original.png'

    if len(argv) > 1: #called in update mode
    # At this point, there will be a two images in /tmp
    # We'll delete the old one, and rename the new one
    for f in glob.glob('/tmp/xplanet-background-*.png'):
    os.remove(f)
    #filename includes a timestamp
    background = '/tmp/xplanet-background-%d.png' % int(time.time())
    #rename the newly generate image
    os.rename(originalFilename, background)

    #now set the background to the new image (by modifying your gconf database)
    os.system('gconftool-2 -t str -s /desktop/gnome/background/picture_filename "%s"' % background)
    return

    #called in startup mode, set up and start xplanet

    #set some options, change here to suit your desires
    options = '-geometry 1600x1200 -longitude -74 -latitude 41'

    #start xplanet niced
    #refresh every 5 minutes, sleep if inactive for 10
    #name output image, will get renamed
    #re-call this script in update mode after rendering a new image
    #run this in the background so the script will exit
    startxplanetcommand = '/usr/bin/nice -19 xplanet -wait 300 -hibernate 600 -output %s %s -post_command "handle-xplanet.py update" &' %
    (originalFilename, options)
    os.system(startxplanetcommand)

    if __name__ == '__main__':
    main(sys.argv)


    You may wish to change the latitude and longtude if you don't live in New York

    Then to get it to work:

    sudo cp handle-xplanet.py /usr/bin

    then (as above)

    System > Preferences > Sessions
    Click on the "Startup Programs" tab, and click on "Add". Enter "handle-xplanet.py" (without the quotes) into the "Startup Command" text box, and click OK

    You may also need to reboot to eliminate previous xplanet instances.

    Sorry to hijack the thread

  7. #7
    Join Date
    Mar 2006
    Beans
    34

    Re: HOWTO: XPlanet

    When I try and run xplanet I get the following:

    Error: Can't open display
    Exiting from getDisplay.cpp at line 47

    I've tried that Nautilus thing, but that doesn''t fix it.

    Any ideas...?

  8. #8
    Join Date
    Jun 2007
    Beans
    1,941

    Re: HOWTO: XPlanet

    Quote Originally Posted by ponx View Post
    When I try and run xplanet I get the following:

    Error: Can't open display
    Exiting from getDisplay.cpp at line 47

    I've tried that Nautilus thing, but that doesn''t fix it.

    Any ideas...?

    i've got the same problem. i am using kubuntu, but i had xplanet working previously. i have a feeling something got messed up because i used the svn on the xplanet website first, then i tried to build from source, and now i'm trying the repo way... none so far have worked.

    i had this working before on a previous install, but i didn't have to do anything to fix it - i never had this error before. i have a feeling my system needs to be completely purged of anything xplanet - does anyone know a quick 'n' dirty way to do that? thanks!

  9. #9
    Join Date
    Mar 2007
    Location
    $HOME (Washington State)
    Beans
    4,590

    Re: HOWTO: XPlanet

    I think that is because it was made for an OLD old version of nautilus.
    See my themes here! | Dont preach Linux, mention it | Make GNOME Themes
    I'm no longer on here. If you want to talk to me, go to noost.org.
    My DeviantArt | Linux user #461096 | Ubuntu user #15753

  10. #10
    Join Date
    Jun 2007
    Beans
    1,941

    Re: HOWTO: XPlanet

    Quote Originally Posted by smartboyathome View Post
    I think that is because it was made for an OLD old version of nautilus.
    i'm using kubuntu... no nautilus here.

Page 1 of 2 12 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
  •