Setting Up Conky on Ubuntu

Conky is a pretty cool desktop app that displays system monitoring information.  I began using it months ago and recently had to go through setting it up again when I did a fresh install of Ubuntu 9.04 on my laptop.  Yes, 9.04.  For some reason 9.10 just didn’t seem to agree with me.  Anyway, the following steps are specific to Ubuntu 9.04.  You may need to do some tweaking to use it on your version of Ubuntu.  Steps for installation and set-up on distros based on anything other than Ubuntu will vary.

First, install Conky either through Synaptic (simply look up “conky”) or via command line with the following:

sudo apt-get –assume-yes install conky

Second, make a configuration file in your home directory. This is where you will put the code for what you want displayed on your conky desktop.

gedit /home/your_user_name/.conkyrc

Third, insert the code for your conky display. There are many options made available online by more knowledgeable minds than mine, but the following is what I use.  I adapted it from something I found on the Ubuntu forums (see here)  You can copy and paste it into the conkyrc file you should still have open. Once you’ve done this, save and close the file.

Code:
# UBUNTU-CONKY
# A comprehensive conky script, configured for use on
# Ubuntu / Debian Gnome, without the need for any external scripts.
#
# Based on conky-jc and the default .conkyrc.
# INCLUDES:
# - tail of /var/log/messages
# - netstat shows number of connections from your computer and application/PID making it.

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer right

# Use Xft?
use_xft yes
xftfont DejaVu Sans:size=8
xftalpha 0.8
text_buffer_size 2048

# Update interval in seconds
update_interval 1.0

# Minimum size of text area
# minimum_size 250 5

# Draw shades?
draw_shades no

# Text stuff
draw_outline no # amplifies text if yes
draw_borders no
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color grey

own_window_colour brown
own_window_transparent yes

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 40

# stuff after 'TEXT' will be formatted on screen

TEXT
$color
${color blue}SYSTEM ${hr 2}$color
$nodename $sysname $kernel on $machine

${color red}CPU ${hr 2}$color
${freq}MHz Load: ${loadavg} Temp: ${acpitemp}
$cpubar
${cpugraph 000000 ffffff}
NAME PID CPU% MEM%
${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}

${color green}MEMORY / DISK ${hr 2}$color
RAM: $memperc% ${membar 6}$color
Swap: $swapperc% ${swapbar 6}$color

Root: ${fs_free_perc /}% ${fs_bar 6 /}$color
hda1: ${fs_free_perc /media/sda1}% ${fs_bar 6 /media/sda1}$color

${color grey}NETWORK (${addr eth0}) ${hr 2}$color
Down: $color${downspeed eth0} k/s ${alignr}Up: ${upspeed eth0} k/s
${downspeedgraph eth0 25,140 000000 ff0000} ${alignr}${upspeedgraph eth0
25,140 000000 00ff00}$color
Total: ${totaldown eth0} ${alignr}Total: ${totalup eth0}
${execi 30 netstat -ept | grep ESTAB | awk '{print $9}' | cut -d: -f1 | sort | uniq -c | sort -nr}
${color orange}LOGGING ${hr 2}$color
${execi 30 tail -n3 /var/log/messages | awk '{print " ",$5,$6,$7,$8,$9,$10}' | fold -w50}

Fourth, create a bash script for starting Conky when the computer boots up.

gedit .conky_start.sh

Place the following code in the new file you have created, then save and close.


#!/bin/bash

sleep 2 && conky;

Do the following to ensure that the file is executable:


chmod a+x .conky_start.sh

Fifth, add the conky start script to “Startup Applications” (System > Preferences > Startup Applications).

The command is located at /home/your_user_name/.conky_start.sh

Sixth, restart your computer and enjoy Conky.  Play around with the config file if you want to change colors or other settings.  As I mentioned above, there are other codes mashed together out there on the Internet that you can use for a different look.  Mine isn’t definitive, by any stretch.

Advertisements

Automated Social Media (for Free)

Note: There have been reports of some difficulty between Twitterfeed and Ping.fm. If the following solution doesn’t work as I describe it, you can at least automate your feed to Twitter using Twitterfeed.


Originally published on IgneousQuill.net

June 2, 2010


Here’s a very simple way to get your website/blog broadcast out into multiple social networks every time it’s updated.  This will work for anyone who utilizes an RSS feed in a website or blog, but since it’s free may be especially attractive to marketing teams for small companies as well as for non-profits operating on a shoestring.

Step One: Set up an account on Ping.fm.  This is a service that allows you to update all of your social networks at once, from one place.

Step Two: Once you have an account with Ping.fm, go through the list of services which can be updated through it and sign up for as many of them as you can.

Step Three: Link/authorize the accounts to be updated from Ping.fm.

Step Four: Set up an account with Twitterfeed.

Step Five: Copy the RSS feed address from any and all websites you want to publish to social social networks and set each one up on Twitterfeed.  You will need to opt for “Ping.fm” instead of Twitter in the publishing option.  You can get your authentication key, if you are logged in to Ping.fm, by going to http://ping.fm/key.  I suggest you have it only publish the title of the post and a link, although if there are tags that should always appear, certainly include them.

Step Six: Post as usual and watch Twitter to make sure you can see the posts coming through.  Be aware that it may take a few hours at most for each new post to appear.

These steps are not deeply detailed, telling you how to do each step.  You should be able to log in and figure it out on your own.  If not, feel free to ask any questions in the comments on this post.

If you do this and set up your RSS feeds to broadcast to many social networks you are increasing your visibility in a number of ways and making it automatic as well.  No pressure and no cost to you.

Mobile Blogging with Tumblr for Blackberry

If you have a Blackberry and are into blogging, Tumblr offers an app to allow you to use the former to do the latter.

The Tumblr app for Blackberry is free and it allows you to post text, photos and more to your Tumblr blog.  Of course, you need to have a blog hosted by Tumblr first for this to work.

Assuming you have a Tumblr blog, once you download and install the app to your Blackberry you just have to provide your login info for Tumblr.  One clear drawback I see with this app is that, so far as I have found, it isn’t possible to write a post and then insert a photo. However, an extended commentary can be included with photos.  Also, there isn’t much in the way of formatting options either (italics, bold, etc).

Since it is possible for the device or upload process to fail, I recommend writing your blog post as a note on your Blackberry first, saving it regularly, and then copying and pasting it to the Tumblr app for upload.

The rss feed from my Tumblr blog is imported into my Facebook notes, so this might be an option you want to look into as well.

Folks on the train into Manhattan might wonder why I’m tapping away so intently on my Blackberry when I have no signal (underground tunnel), but once I’m out on the street and have a connection, I upload my post.

Click here from your Blackberry to install.

Dealing With Brazil’s Sex Trade

Adult (over 18) prostitution is not a crime in Brazil.  Law books I read on the topic while living in Brazil tend to agree that this can be considered a moral problem, but it is not a crime in a strict, legal sense.  The difficulty with this position is that what plays out in reality is not always a straightforward business transaction between consenting adults.

While teaching English in Brazil one of my students explained that a former classmate was a “garota de programa."  The rough translation of that would be "program girl,” I suppose.  Sexual services are described as a “program."  He talked about how she had a boyfriend and he was perfectly okay with what she did, going on to explain that she was a "high class” prostitute who could command top money and pick-and-choose her clients.  To my student’s mind it was all fine.

Although I agree (brace yourselves) that prostitution in and of itself should not be considered a crime before human law, it is very clearly a violation of the will of God.  People were made for committed, on-going heterosexual relationships.  Doing otherwise not only goes against what God has revealed to humanity, but is harmful to the well-being of the individual.

“Shun fornication! Every sin that a person commits is outside the body; but the fornicator sins against the body itself.” 1 Corinthians 6:18 NRSV

What damage “consenting adults” do to the detriment of themselves and, by extension, their families through engaging in illicit sex is ultimately in their hands to resolve.  Things become more complicated when underage children enter the sex trade.

As I shared recently on this blog, child prostitution is a serious problem in parts of Brazil.  In a permissive and even promiscuous culture that glorifies sex in every way, situated in a climate that encourages wearing less rather than more, young girls from poor backgrounds in particular can easily be tempted into making quick money in exchange for sex acts.  For some it is an addiction to drugs that drives them, even at an early age.  For others it may represent the possibility of meeting a well-to-do man (perhaps even from another country) who will take care of her.  Whatever the specifics, in the eyes of many girls the best opportunity they can see around themselves involves sex.

What can be done to address and resolve the enormous challenge children in the Brazilian sex trade represents?  I can think of a few steps to begin:

  • The Good News that the crucified and resurrected Jesus is Lord, and that through him complete forgiveness, redemption and restoration can be provided to anyone.
  • Technical and vocational education, both in the schools and in extra-curricular academic programs, perhaps arranged in partnership with local schools and/or community groups, as well as programs that focus on preparing underprivileged students for the governmental college entrance exams that can afford them free admittance and tuition to a public university.
  • Counseling, especially from a Christian perspective, focused on rebuilding the family (the family being recognized as the most basic unit of society) as well as restoring individual dignity after the image of God.

“So if the Son sets you free, you will be free indeed.” – John 8:36 ESV

YouVersion for Blackberry

LifeChurch.tv has developed a website and app for use on various mobile devices.  It’s called “YouVersion,” and it allows the user to read the Bible online and on a smartphone.  Since I use a Blackberry, that’s the app version I’ll be commenting on here.

YouVersion is obviously first and foremost about reading the Bible.  Numerous translations are available, though it can be difficult to decipher which ones they are going through the “settings” on the app.    Most people won’t have a clue what “BG1940” or “VI1934” stand for.  I simply set mine to “ESV” (English Standard Version) as this is my second favorite English-language translation of the Bible, after the New Revised Standard Version (which isn’t currently available on YouVersion).  The New International Version (NIV), a translation very popular among American evangelicals, is also available.

One drawback to this app is that an Internet connection needs to be available for it to work.  In other words, if you are going through a train tunnel (as I do going into Manhattan every workday), are on a plane or in any area without service, the app won’t work.  The Bible, other than the last chapter you loaded, is not stored locally on the handheld device.  This is good in that it doesn’t take up space, but not great if you want to read the Bible but have no cell service.

The application provides access to “Contribs,” which are user-submitted commentaries connected to certain passages.  What seems really odd to me is that though commentary can be contributed through a traditional desktop or laptop browser, the Blackberry app offers no means to comment.  There have been times I’ve read a passage on my Blackberry and wanted to write up some thoughts to contribute, but had no way to do it.  I hope this functionality will be added in the future.

Aside from reading the Bible through this app, at least one key element of social media functionality is included.  Twitter.  Any verse can be tweeted with a link back to the full verse.  If the verse is longer than 140 characters, the verse cuts off and the rest can be seen through the link.  If you use both Twitter and Facebook, I’d like to suggest you add the “Selective Tweets” app to your Facebook.  This will allow you to simply add the #fb tag to the end of any verse you are tweeting (assuming there’s still room available) and the verse will also be sent to your Facebook status.

YouVersion doesn’t have everything I could hope for in a mobile Bible app, but it’s completely free and easy to use.  It’s also available on a number of platforms other than Blackberry, so check it out.

Mission Internship 1997

During the summer of 1997 I went on a “mission internship” through Christian Missionary Fellowship.  Most, if not all, Bible colleges of the independent Christian Churches/Churches of Christ require an internship for graduation.  Not all such internships are international in nature.  Normally young people spend a summer working with a preacher or in a Christian non-profit to fulfill the requirement.  The funny thing is that I had no such “requirement."  I was then enrolled only in a community college.  In any case, going to Brazil that summer marked a major turning point in my life.

I went into my internship expecting only to gain an awareness of missions and to deepen my ministry experience.  For some reason I always imagined that if I ever did any "full-time” mission work it would be someplace like Lithuania.  Don’t ask me why.  I don’t know.

Even the choice of Brazil as my destination that summer was mere process of elimination.  I didn’t like any of the other options on the list the mission organization provided me, so I put Brazil as my first preference.  I think Chile was number two.  One of the professors during my brief stint in Bible college had mentioned in passing a “revival” taking place in Brazil, with hordes of people (my words, not his) converting to evangelical Christianity.  That sounded interesting.

A few months of support-raising and organizing later and I was in Brazil.  I had little notion of Portuguese and nothing in the way of previous international travel.  By the end of that summer I could speak basic Portuguese and was convinced I had to devote my life to mission work in Brazil.  A year later I returned to Brazil with a team from Harding University, where I was studying in earnest for a ministry degree.  Two years later, after graduation, I met my beautiful wife.  After all that I spent slightly less than three years in full-time mission work.  I hope to return to it someday, with a fresh perspective and improved outlook.

Today marks the 13 year anniversary of the day I made my commitment to Brazil.  I still hope to fulfill that promise.


See Also:
Doing It Wrong

HTML5 is the Future (and the Future is Now)

HTML5 is likely the future of document sharing on websites.  Why?

  1. PDF and video displays on websites have long depended on Flash, requiring a separate “thing” to be present on a webpage.  This can cause headaches, because this “thing” is in many ways independent of the webpage itself.  An example would be in the case of printing documents from flash.  A print option separate from the browser’s native print option is required.  not so with HTML5
  2. So long as you have an up-to-date browser you won’t need any special plug-ins or other software to view documents and videos in this format.  It will just work.
  3. Writing and maintaining HTML5 is much, much easier for developers than trying to deal with Flash.
Those are the three reasons that come to mind for me when I think about the benefits of HTML5 over Flash.  Can you think of any more?

Scribd in HTML5 http://d1.scribdassets.com/ScribdViewer.swf?document_id=30964170&access_key=key-1ar9e5ms2364hpdfeixn&page=1&viewMode=list
Ready to learn HTML5?  Click here for an online tutorial.