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
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.
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: