Code is Love

Tag: Gnome

Flickr-ify your Gnome Screen Saver

by someguy on Oct.28, 2007, under Uncategorized

I’ve been reading about the estarling, a digital photo frame that will sit on a wireless network and grab photos from an RSS feed, on say, Flickr, or Picasaweb. What a fantastic idea this is — and really it’s the product I’ve been waiting to come to market for a long time if its features work as promised. Imagine: stick it in the home of your grandparents, parents, etc. - and _you_ can send the photos to their frame - keeping them up to date with all the latest photos from the lives of their family and friends.

To go along with this, I wanted a simple screen saver for my new install of Ubuntu Feisty-Fawn that did the same thing — grabbed latest images from an RSS feed on the web and then serve them when the screen was locked, or the system idle for more than a few minutes. It seemed like every Mac in my office has been taunting me with a feature like this, but maybe all those photo slideshows I’ve been seeing are from local images.

So, this is nothing short of a hack, but if you want this functionality on your desktop, maybe you’ll think it’s worth it like I did. The end result is Gnome Pictures Screen Saver with a modified version of bashpodder that grabs the latest photos from any feed(s) I specify to become the content for my screensaver.

The script takes a config file which consists of the URL to the feed you want to subscribe to and the xsl file which pulls out the URLs to the photos themselves from the feed. Currently RSS feeds/xsl transformations from Gallery, Picasaweb, and Flickr have been tested. When it runs, it checks the feed against files previously downloaded and only downloads the new stuff. It could be run from cron or perhaps when you log in. I suggest running it by hand the first time to make sure it is doing what you expect.

Package available in this thread:

Prerequisite pkg: libwww-perl (I used GET instead of wget - long story)

To install:

$tar -xzvf rss_photos.tar.gz

Edit rss_photos.sh and change the values of CONF_FILE and LOG_FILE to a permanent location. Create the CONF_FILE you just specified.

# Lines in CONF_FILE should be of the pipe-delimited format:
# |
# e.g.
# http://api.flickr.com/services/feeds/photos_public .gne?id=YOURIDHERE&lang=en-us&format=atom|parse_flickr_enclosure.xsl

Obviously, you will need to enable the “Pictures Folder” screen saver in Gnome for this to work - the script simply grabs photos for the screen saver.

Comments Off :, , , , , , , , more...

Gnome Terminal Profiles for Connecting to Different Hosts

by someguy on Jan.19, 2007, under Uncategorized

I was really surprised that I couldn’t find a how-to to configure Gnome’s Terminal program to have various profiles to connect to different hosts. For those familiar, I was looking for something PuTTY like, where when I launched the program, I would have a list of hosts to connect to, rather than just opening a local shell and running the same ssh commands to different hosts each time I need to login to a remote system. Yes, I have heard that PuTTY runs on linux, but I really wanted to use Gnome Terminal since I use it every day and want to use more standard tools in my daily Linux life.

What I did find, however, was the Gnome Terminal Launcher Applet. This is an applet that runs in your Gnome tray/panel with a drop down menu for each of your terminal profiles. Sweet! I ran into a problem though: if I just put “ssh ” in the profile, ssh wouldn’t use my keys already in memory thanks to keychain and the ssh agent, of course. So, here’s where my hack comes into play — and might save you the same minor hassle.

Create a shell script in your home directory called terminal-helper with the following contents:

#!/bin/sh
. .bash_profile
ssh $1

so I get the benefit of the keychain lines pre-existing in my .bash_profile when it is sourced, and it just connects to whatever host I pass to the script (thanks, Diego, for removing some obvious clunkiness from the original implementation). In my Gnome Terminal profiles, on the “Title and Command” tab, I specify “Run command as a login shell”, “Run a custom command instead of my shell”, and then specify the command:
/home/myuser/terminal-helper <yourusernamehere>@<yourhostnamehere>

Now I can connect to whatever host I have created a profile for just by clicking on a drop down menu. 10-15 keystrokes per host saved! Heh. Enjoy.

Leave a Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...