The geeky details: Clock and weather map

I promised I would give a rundown of the wall-clock-slash-weather-map setup, once I got to a braggable state. I think I can do that now.

I should explain the idea I had in mind before I started though. First, I wanted the weather map to update regularly, both with the planet shadow and weather overlay. Those two things are fairly easy to achieve, given the work I did with this last time.

I wanted it to start straightaway to X, without a login. I don’t see it rebooting much, but it seemed prudent just the same.

Next, I wanted conky to show only the time, but in big enough letters to read across the room. Any additional information, like a hostname or kernel version, would be unnecessary but acceptable.

The mouse cursor needed to disappear. It rather defeats the purpose to see the cursor on a wall clock. And there should be no timeout on the screen, no screensaver and no powersave timeout.

Finally, I wanted the screen to turn itself off at night and turn itself back on in the morning.

So this is how I solved most of those things. Autostarting was the easy task: Simply adjust /etc/inittab in one of the fashions shown in the Arch wiki.

Once X is up an running, there’s little I can mention in the way of improving xplanet over the last time I wrote about this. I will say that I moved the xplanet command to Openbox’s ~/.config/openbox/autostart.sh file, just for housekeeping purposes.

I also commented out the line that paints a background color in autostart.sh, since that’s just an added step.

Inside autostart.sh, I adjusted xplanet’s wait flag to 900 seconds, or 15 minutes. That’s not for the benefit of the weather map, but to watch the sunrise and sunset creep across the planet.

I also adjusted the radius of the image to 64, so there’s a better impression of a sphere. Not important, but worth mentioning.

Next, conky. I used this old conky arrangement from a long time ago, setting the font size to 64 point and moving it to the lower right corner instead of the lower left.

My xorg.conf file enables the double buffer, and my .conkyrc uses that for more-or-less :roll: seamless refreshes.

Next, I needed a way to hide the mouse cursor. Enter unclutter, which does only that one thing.

It has a few options for timing and specific conditions for hiding, but the defaults worked fine for me. If I press the touchpad the cursor reappears, but disappears a second later.

The biggest issue, and the part that gave me the biggest headache, was to tell X to stop blanking and just show the screen all the time — no timeouts, no powersave.

You’d think that would be easy, I got all kinds of crazy behavior, including a bizarre hash-pattern-plus-giant-X screensaver that I didn’t even know existed.

In the end, here’s what worked:

xset s off
xset dpms force on
xset -dpms

Believe it or not those options in that order and only in the autostart.sh file were the only things that worked. I added them to .xinitrc and even to .xsession, but something always zapped them once X passed the session to Openbox.

Both xplanet and conky will update themselves without any hard work, but there are a couple of other things that need cron.

First, the weather map needs downloaded at four-hour intervals (I think it was four hours. Maybe three). I’m not sure exactly when it’s updated, so I set cron to run the python script and download on the hour.

The script is smart enough to check first, and see if the existing file needs updated. If it doesn’t, it closes.

The last thing was a way to turn off the backlight at night, and turn it on in the morning. A tool for every job, and for this job the tool is vbetool.

vbetool, as I understand it, allows the console to access DPMS functions, which are usually triggered through the BIOS. In my case some of the functions were inaccessible, which I believe might be because of the age of the machine.

Regardless, just dpms off and dpms on were enough to get the behavior I wanted. These were only working as a root user though, so I added these to root’s crontab. Which now looks like …

00  * * * * /usr/bin/python /home/kmandla/.xplanet/download_clouds.py /home/kmandla/.xplanet/clouds_2048.jpg
00 23 * * * /usr/sbin/vbetool dpms off
30 06 * * * /usr/sbin/vbetool dpms on

And that’s it, really. I thought it would need a little work than that, but the only thing I’ve added to the machine over the past day has been dropbear, so I can access it remotely and save myself typing on that rotten keyboard.

I originally planned to add a system update to cron, but since Squeeze moved to stable, I haven’t seen much in the way of updates at all.

So I might do those manually, along with making sure ntpdate sets the clock right. So far the display hasn’t been far off from any other machine in the house, or more than a few seconds.

So that’s it. Between this post and the one from a few years ago, you should be able to set this up in Debian without undue effort.

I see that most of this software is available in Slitaz, but I think you might have to build most of it in ConnochaetOS, if you want that for an old i586. For others … check and see. ;)

Next stop: Tearing it all apart. :twisted:

About these ads

8 Responses to “The geeky details: Clock and weather map”


  1. 1 Ivica 2011/02/14 at 10:41 AM

    Nice work K, and thank you for a very very big help on autostart link from arch wiki i was looking for something like that since no autologin on xdm and i am kind of lazy on typing in passwords :)

    Curently tweaking Book PC (AKA HTPCi810 or f@milynet) that i recently salvaged from some garage sale.
    Repaired the PSU and put it on in usable state.

    He made me bump on your blog (and come back every day) since i am reading all around www tips for speeding up.
    Curently instaled on this pc is vector linux 6.0 lite with icewm ram consumption of 62MB but i feel it can be tweaked down for a litlle more.
    Any tips on icewm for speed? since it is a bit slow respons on intel 810 integrated graphic even with direct rendering on or is it a normal thing (not much of a icewm user).

  2. 2 Perry 2011/02/14 at 11:15 PM

    Nice work! I’ve got an old Sharp Actius MV12 that I’ve been tossing the idea around of turning into a digital picture frame. I’ve never started because (for me) for it to be worth it, it had to do more. This post has really got me thinking. Thanks.

  3. 3 Jose Catre-Vandis 2011/04/10 at 4:33 AM

    Seeing you had a bit of a fight getting the screen to not blank, I had similar problems with my setup, here’s how I resolved it:

    http://bimma.me.uk/2011/04/06/prevent-screen-blanking-on-xubuntu-cli-slim-openbox-install-on-asus-eb1012-nettop/

    Also, can we have the search box back on your blog?


  1. 1 Links 14/2/2011: GNU/Linux Education in Valencia, London Stock Exchange Goes Live With GNU/Linux | Techrights Trackback on 2011/02/15 at 12:26 AM
  2. 2 Stormy future: The weather clock project « Motho ke motho ka botho Trackback on 2011/02/16 at 11:11 PM
  3. 3 More updates: The weather clock project « Motho ke motho ka botho Trackback on 2011/02/19 at 8:44 AM
  4. 4 Case in point: A 133Mhz photo frame « Motho ke motho ka botho Trackback on 2011/03/06 at 10:23 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,959,852 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: