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/ppaOr Download ConkyForecast 2.24 for Linux from launchpad yourself.
sudo apt-get update
sudo apt-get install conkyforecast
Built packages
- conkyforecast Weather forecast script with support for language files, for use in Conky
Package files
- conkyforecast_2.24.dsc (1.1 KiB)
- conkyforecast_2.24.tar.gz (10.8 MiB)
- conkyforecast_2.24_all.deb (3.2 MiB)
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.configI 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.
#=============================================#
# EXPERT SETTINGS, NOT REQUIRED TO BE ALTERED #
#=============================================#
BASE_XOAP_URL = http://xoap.weather.com/weather/local/<LOCATION>?cc=*&dayf=5&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=i
BASE_XOAP_URL = http://xml.weather.com/weather/local/<LOCATION>?cc=*&dayf=10&link=xoap&prod=xoap&par=<XOAP_PARTNER_ID>&key=<XOAP_LICENCE_KEY>&unit=i
MAXIMUM_DAYS_FORECAST = 4
#===============================================#
# USER SETTINGS, EDIT BASED ON DOCUMENTED SETUP #
#===============================================#
CACHE_FOLDERPATH = /tmp/
CONNECTION_TIMEOUT = 5
EXPIRY_MINUTES = 30
TIME_FORMAT = %H:%M
DATE_FORMAT = %Y-%m-%d
LOCALE = en
XOAP_PARTNER_ID =
XOAP_LICENCE_KEY =
DEFAULT_LOCATION = UKXX0103
AUTO_NIGHT = False
PROXY_HOST =
PROXY_PORT = 8080
PROXY_USERNAME =
PROXY_PASSWORD =
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 #
# satya164.deviantart.com #
# 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
TEXT
${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 weather.com 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:https://bbs.archlinux.org/viewtopic.php?id=139962http://ashu-geek.blogspot.com/2012/03/conkyforecast-224-current-weather.htmlhttp://ubuntuforums.org/showthread.php?t=869328http://satya164.deviantart.com/ He's also here: http://funsurf-blog.blogspot.com/
No comments:
Post a Comment
Thanks for the Comments.