Saturday, November 17, 2012

Simple Time and Weather Conky Desktop

Systems installed on: Linux Mint 10, Mint 13 MATE, and Peppermint 3.  

Let me start this off saying that I'm not a Conky expert, nor can I provide a ton of help for anyone that runs into problems with this script. I also mention an error that I've getting at the end of the blog post, and would love to know how to get rid of it.

What I was after was a clean and simple Time and Temp display for my Netbook that sits on a nightstand. It's really a glorified Clock radio. And the end results I got and wanted were something like this. 

If haven't you already installed conky, and played around with it you will need to. For those that use the Ubuntu Repositories and PPA's this is how you do it. ConkyForecast and a few other conky tweaks are part of the "Conky Companions" PPA. 
sudo add-apt-repository ppa:conky-companions/ppa
sudo apt-get update
sudo apt-get install conkyforecast
Or Download ConkyForecast 2.24 for Linux from launchpad yourself.

Built packages
  • conkyforecast Weather forecast script with support for language files, for use in Conky
    Package files

Once you have it installed that should be it for conkyForecast, but should you want to modify it, or need to modify it you can copy it to your home directory from within the terminal with this simple command, and then edit it with your text editor.
cp /usr/share/conkyforecast/conkyForecast.config ~/.conkyForecast.config
I had to edit my .conkyForecast.config file, for fahrenheit instead of celcius temperatures, and I also removed a # mark on line 5 to make the .xml infor available to conkyForecast.

BASE_XOAP_URL =<LOCATION>?cc=*&dayf=5&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=i
BASE_XOAP_URL =<LOCATION>?cc=*&dayf=10&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=i

DATE_FORMAT = %Y-%m-%d

Now that you've got conkyForecast on your system, next all your should have to do is to create or modify your .conkyrc text file. This can be the tricky part.  Below is a copy of my .conkyrc file. OR you can download a copy of it from here

# Modified by RandyNose(.com) for simple desktop time and temp #
# Original code swipped from Conky Metro Clock by Satya #
# #

# Conky settings #
background no
update_interval 1

override_utf8_locale yes

double_buffer yes
no_buffers yes

text_buffer_size 2048

# Window specifications #
own_window yes
own_window_class conky
own_window_transparent yes
own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager

border_inner_margin 0
border_outer_margin 0

alignment bl
gap_x 100
gap_y 100

# Graphics settings #
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no

# Text settings #
use_xft yes
xftalpha 0
text_buffer_size 2048

uppercase no

default_color FFFFFF

${voffset 10}${font Ubuntu Light:size=40}${goto 550}${execi 600 conkyForecast --location=44107 --datatype=CN --refetch}${voffset -10}
${voffset 10}${font Ubuntu Light:size=50}${goto 550}${execi 1800 conkyForecast --location=44107 --datatype=CT --refetch}${voffset -10}${goto 875}${execi 1800 conkyForecast --location=44107 -u --datatype=HT --refetch}
${voffset 10}${font Ubuntu Light:size=40}${time %A}${font}${voffset -10}
${voffset 10}${font Ubuntu Light:size=40}${time %B} ${time %e}${font}${voffset -10}
${voffset 10}${font Ubuntu Light:size=100}${time %I:%M %p}${font}${voffset -10}

Be sure to save the text file as .conkyrc in your home dir. The location setting that I have is 44107, my US zip code. I am going to guess that any valid US zip code will work.  If that doesn't work for you, try going to your city on and using the location code in the URL. OR try this posting to sort it out.

Now you should be all set to run conky at the terminal and test it out, and/or add it to your start up applications. 

I should also note, that I AM getting an error on my system when I run in the terminal. How to fix it at this point, I'm not sure. But maybe this posting will ferret out an answer. :) 
The error is this:

WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-nITDzm/pkcs11: No such file or directory
Conky: desktop window (180012f) is subwindow of root window (13a)
Conky: window type - normal
Conky: drawing to created window (0x2600001)
Conky: drawing to double buffer
ERROR: Server connection error: HTTP Error 503: Service Unavailable

Some of Sites that I visited while creating this post were:   He's also here:

Sunday, November 04, 2012

Tethering in a Tempest

Unless you've been living in another hemisphere, or not, I think that most everyone has heard about Hurricane Sandy.  If not, then, I'd like to know where you've been. As there were many folks just hammered by the storm, and were without power and or without internet service.  And even a few lost lives and houses. Us in the Cleveland, Ohio area had our share of the storm.

I'm one of the more fortunate, as we had a landlord who lives in the same building, (duplex) that hooked us up to generator power for a few hours each day.  But our internet service was on and off, so I wanted to use my Android Phone, (Thunderbolt HTC) to get online. I really don't like to type more than I have to if I'm using a phone, or a touch screen. Since I was also lucky enough to still have a Verizon Unlimited Data Package, I wanted to flex that option. 

One of my G+ Geek Trucker Buds  mentioned to use FoxFi for my phone, and turn it into a WiFi hotspot. FoxFi is a free App, etc.  So, off I go tap tap tapping away on my phone to around the Google Play app selection. I find it, download it, and Install it, and ZOinK!  No joy. I am informed by FoxFi that HTC has a locked up the WiFi or some such nonsense, but it suggests and supports Bluetooth.  I don't have a Bluetooth connection for my computer, so I opt to search for a more mundane method of USB cable tether.

I browse around on Google Play, and found the Demo Version of KLink.  I install it, expect that I'll have to fire up Windows in order to get the PC side to work, but nope.  Easy to follow links and instructions to DL a .DEB file to my phone that I can then install onto my Linux Mint 9 LTS endowed Acer PC.  

Viola! App is downloaded and installed, DEB file is found on Android via USB cable connection,  I fire up a terminal session, as suggested, type in Klink, and Bingo! We're live on the interwebs with a good and speedy connection too!  As the image below suggests. 

Man, I was so tickled, I bought the app, even though there are some freebie versions that are supposed to work, that I hadn't even tried at the time.  So, I shelled out $4.99 for the app, and get the full version, as I don't feel like mucking around with anything else. 

I was so happy, I had to celebrate with some cookies, milk, and a couple screen shots of my shenanigans. And I'm +1'd by a couple of other geek friends, Mat and Claudio

Thanks, Brandt,  Stephen, and others for the suggestions of FoxFi. Looks like a nice tool, but not the right tool for my phone and this job. 

Thanks Christophe Versieux for the suggestion of ClockworkMod Tether, as it might do the trick,  and while it IS free, I still had to DL and install g++ to make and compile it, something of a show stopper when you don't have any connections to do an apt-get install. Also, not something everyone would be willing or know how to tackle.  

Oh! About this "superstorm" word. 

This from 

"Hurricane Sandy wasn't a "superstorm." Not because it wasn't a "super" "storm," but because "superstorm" is an imaginary scare-term that exists exclusively for shock value."

And now, I have to go make sure that I don't break my neck to change the time on a clock that was perfectly fine until some bastards (who are now dead, I'm sure) decided that we need to muck around with our timepieces in order to make them make more sense with the orb that we live on, and the one that gives use light and life.  Yea, I'm against changed the time on our clocks twice a year. It no longer serves a purpose. Go AWAY Daylight savings!!