Archive

Archive for November, 2008

How To View .chm Files In Ubuntu 8.10

November 20th, 2008 Christer Edwards 23 comments

Yesterday I ran into a file format I had not seen before.  Microsoft .chm (Compiled HTML).  Turns out there are plenty of solutions for Linux.  I have to admit I really wondered why the publications I found were in .chm and not in a more standard .pdf format.  Really makes me appreciate common standards.  I’ll outline some of the solutions I found here.

.chm Viewers

I ran into a number of .chm viewers for Linux, all available within the Ubuntu repositories.

If you are a Gnome user you may like gnochm:

sudo aptitude install gnochm

If you are a KDE user you may prefer kchmviewer:

sudo aptitude install kchmviewer

There are also some conversion tools, which I’ve had varying success with:

sudo aptitude install chm2pdf

There are more solutions listed on the link at the top of this article.  You may check that out for more information.

Categories: Ubuntu Tags: , ,

Hacking Perl

November 18th, 2008 Christer Edwards 2 comments

As I mentioned in yesterdays post, I have begun studying perl.  I’m actually enjoying it quite a bit, and picking things up fairly quickly I think.  I’m sure my familiarity with bash scripting helps quite a bit.

This morning I hacked together an irssi script for origami users that will let you display your current work unit progress percentage within irssi chat.  I’d like some feedback on it.

If you are using irssi and have origami running on the same machine please check out my plugin and let me know what can be improved.

Download origami.pl v0.2

Instructions:

download and save the above script into ~/.irssi/scripts

To load the script:

/script load origami.pl

To get the origami work unit status:

/origami

To unload the script:

/script unload origami

Categories: c0de Tags: ,

Regex Challenge

November 17th, 2008 Christer Edwards 26 comments

Over the weekend I started studying Perl and quickly realized I was going to be better off if I reviewed regular expressions before I got too far into things.  I went back and found my copy of “Mastering Regular Expressions” and dove right in.  Now, maybe its just me, but I find that I really enjoy the problem solving aspect of regular expressions.  I thought it might be fun to put up a regular challenge on the blog that needs to be solved via regular expressions.

(Obligatory xkcd reference)

So, I figure I’d start off with one that caught me today.  Here is the situation:

You’ve got a regular text file filled with usernames.  You want to be able to read this file into a program to populate an array, but there are random blank lines throughout the file.  What regex would you use to find and remove all empty lines in the file?

For consistency sake, I’ve populated just such a file and made it available here.

Rules: Use any tool you want (perl, sed, vim, etc)  The file must contain all original usernames (total of 15), one per line, with no blank lines start to finish.  Please share your solution in the comments!

Categories: c0de Tags: ,

Install Skype 2.0 on Ubuntu 8.10 “Intrepid Ibex”

November 16th, 2008 Christer Edwards 28 comments

The past few days have been all about installing third-party applications.  Yes I know some of these are “non-free”, but it does seem like a lot of these are those apps that many of us just can’t do without.  So, to continue the series here we have Installing Skype 2.0 on Ubuntu 8.10.

Download The Package

The people behind Skype have provided packages for many Linux distributions.  The package that they include for Ubuntu is listed as “Ubuntu 7.04+”, which seems a bit outdated to me.  Yes, the package should work properly on Ubuntu 8.04 or 8.10, but I think they should update the listing to something more current. (hint hint)

In any event, to install Skype 2.0 on Ubuntu 8.10 simply head to the Skype Download Page and click the Ubuntu 7.04+ listing.  This should provide you with a package to save to your Desktop.  Once the download is finished simply double-click the file and the installation will take off.

I haven’t used Skype very much outside of close family and friends.  Is this something I should start using more?  What are your thoughts on Skype as a regular communication tool?

Categories: Ubuntu Tags: , ,

How Many People Does It Take To Remove A Wireless Network From Windows Vista?

November 15th, 2008 Christer Edwards 23 comments

So its a little after noon today and I just woke up.  No, I’m not a lazy late sleeper, I got home from work last nite about 4:45am.  We had a huge server room rebuild consolidating ~40 servers, rebuilding two racks, and going to the data center.  Loads of fun, let me tell you.  Anyway, that information is incidental.  I just woke up because my Dad called and woke me up asking for a favor.  The conversation goes a little like this…

Dad: I need a favor from you and you’re not going to like it

Me: I’m not going to like it?

Dad: Your Uncle is here with his computer running Vista–

Me: You’re right, I’m not going to like it.

Dad: I’ve been on this stupid thing for hours and I can get it to connect to the wireless!

Me: I don’t support Vista, you know that.

Dad: Will you just look on one of your technical sites and find some answer?

Me: <quickly google “remove wireless network vista“>

Dad: Why did they have to move everything around?  XP worked just fine and now they moved things and changed things I can’t even find what I’m trying to do!

Me: I’m upset that you woke me up, but I’m loving how much you’re hating Vista.

Dad: It’s a peice of crap!

Me: <giving instructions based on google search results>

Dad: Thank you.

I just thought I’d share that quick story with everyone.  And here I spent months trying to convince them to switch to Linux.  I guess all I needed to do was give him a copy of Vista for the morning.  Mr. Ballmer, sir, you’re doing a fantastic job.  Keep up the good work! ;)

Categories: Randomness Tags: ,

Install Adobe Reader 8.1.3 on Ubuntu 8.10 “Intrepid Ibex”

November 15th, 2008 Christer Edwards 15 comments

UPDATE: Install Adobe Reader 9 on Ubuntu 9.10

For those of you that run blogs, are you ever surprised at the content that ends up being the most popular?  I get surprised all the time, particularly that my previous post regarding installation of adobe reader on Ubuntu 8.04 is near the top of the list.

Well, now that 8.10 has been released and Adobe has updated the reader to 8.1.3, it seemed like a good time to update the post.

Install Adobe Reader 8.1.3

If you want the latest version of Adobe Reader you’ll need to download it from the Adobe website directly.  They are nice enough to provide us with a package, so the installation is pretty quick and painless.  You can head directly to the download page at the link below:

Adobe Reader – All Versions

You’ll want to select “Linux” as the operating system, “Linux – x86 (.deb)” for the installer and your language.  This will then provide you with a download link, which you can go ahead and “Open With..” the “GDebi Package Installer (default)”, or save to disk and double-click for auto-installation.

note: for those looking for the English version, I have a direct download link here.

You should now be able to find Adobe Reader 8 listed under Applications > Office.  Enjoy.

Categories: Ubuntu Tags: , ,

Install Google Earth on Ubuntu 8.10 “Intrepid Ibex”

November 14th, 2008 Christer Edwards 38 comments

Recently I blogged about “What Do You Do Post-Install?” to find out what little tweaks everyone applies to their systems on a fresh machine.  It appears that a lot of you enable the Medibuntu repository right away and take advantage of that for media and codecs.  Did you know there are also other applications available, like Google Earth?

This post is an update to a previous article I wrote, this time specific to Ubuntu 8.10 “Intrepid Ibex”.

Configure the Medibuntu Repository

As mentioned above, the first thing that you’ll need to configure is the addition of the Medibuntu repositories.  Setting up this third-party repository can be done by way of a few quick commands:

sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list -O /etc/apt/sources.list.d/medibuntu.list

sudo aptitude update && sudo aptitude install medibuntu-keyring && sudo aptitude update

This will add the Medibuntu repository, import the Medibuntu GPG key and make the new packages available.

Install Google Earth

To then install Google Earth simply use:

sudo aptitude install googleearth-4.3

You should now have Google Earth added to your “Applications > Internet” menu and, assuming your video card supports the requirements, you’re ready to virtually travel the planet!

Depending on your video card you may want to disable the atmospheric rendering, which can greatly increase performance. This can be done by unchecking the following setting:

View > Atmosphere

If, for some reason, Google Earth doesn’t load properly or crashes on your machine you could try to revert to an older version which seems to have less issues. To do that remove the 4.3 version and try the 4.2:

sudo aptitude remove googleearth-4.3 && sudo aptitude install googleearth-4.2

Categories: Ubuntu Tags: ,

Monitor System Logs With Logwatch

November 13th, 2008 Christer Edwards 3 comments

I mentioned in a recent post regarding postfix smtp via Gmail that I use the logwatch utility for monitoring my systems.  Ever since I found this utility I have really enjoyed the daily snapshot that it gives me of each of my systems, whether local or remote.  Everything from package installed and removed, to security notifications regarding unsuccessful login attempts.  Here’s how to install and configure Logwatch.

Install The Package

sudo aptitude install logwatch

Configuration

The default configuration can be found in /usr/share/logwatch/default.conf/logwatch.conf.  Take a look around the file, but the main thing you might want to update:

MailTo = root updates to MailTo = user.name@domain.tld

I have my systems email me daily at my gmail address, so each morning I get an overview of the previous days logs.

If you have problems with the mail actually getting out you might want to check out my post regarding Postfix smtp via Gmail.

Categories: Server Tags: , ,

Origami 0.6.9 Released

November 12th, 2008 Christer Edwards No comments

After quite the hiatus from coding I have released Origami 0.6.9.  Thanks go to Martin Zuther for his bug and feature request submissions on Launchpad.  This release should resolve a long standing bug and also added two new features.

Origami now supports definition of BIGPACKETS, which can be very important depending on your hardware.  I’ve also added support for the new PASSKEY feature, which allows you to basically secure your submission results by way of a secret assigned passkey.

To find out more about the PASSKEY system check out:

passkey-FAQ

New Installation

If you’re new to Origami you might want to check it out.  It is a wrapper around Stanford’s Folding @ Home distributed computing client.  I think its a much cleaner way to run Folding @ Home on Linux systems.  If you’re interested you can install the latest trunk (stable) via:

bzr branch lp:origami
sudo origami/origami install [ -u USERNAME -t 45104 -b {small, normal, big} -j PASSKEY]

If you’d prefer to use the PPA you can add the following to your /etc/apt/sources.list file:

## origami
deb http://ppa.launchpad.net/christer.edwards/ubuntu intrepid main

Note: Origami 0.6.8.3 is available in the Intrepid repository, but this lacks these two new features.  You can use that package if you prefer not to use “outside” repositories / bzr, and follow the manual upgrade options below.  If you run into any bugs please let me know on Launchpad.

Upgrade Installation

If you’ve previously been running Origami you can update the package as available from the Launchpad PPA.

Currently you’ll have to manually update your config to define BIGPACKETS and PASSKEY (unless you want to re-install completely).

To add these two new features manually follow these steps:

gksudo gedit /var/lib/origami/foldingathome/CPU*/client.cfg

Within the [settings] section you’ll want to add the new directives.  Example:

[settings]
...
bigpackets={small, normal, big}
passkey=PASSKEY

Again, any issues please let me know as a bug on Launchpad or come find me in #ubuntu-folding on irc.freenode.net

Categories: origami Tags: , , ,

Wiki Editing With Your Favorite Editor

November 12th, 2008 Christer Edwards 5 comments

Recently I was tasked with doing a bunch of documentation work here at the office, and I decided to put together a wiki for the job.  After a few hours of editing directly into the browser I was about to blow my brains out.  I quickly decided that if I’m going to be working with a lot of text I need a real editor, like vim.

I set out to find some solutions and quickly ran into a Firefox addon that allows you to edit most forms, including wiki pages, with your editor of choice.

You can install the addon directly from Mozilla or you can get it from the Ubuntu repository.  Links for each below:

It’s All Text!

sudo aptitude install itsalltext

Once you have it installed you’ll need to, of course, restart the browser and then you can configure it.  You can configure it via Tools > It’s All Text > Preferences, or from within your Addons Management Window.

It's All Text Preferences Window

As you see here my prefered editor is gvim, which I can select using the “Browse” button.  Note: if you don’t have gvim installed you’ll want to add the vim-full package:

sudo aptitude install vim-full

Now that you have this configured you can simply edit most forms on the web by right-clicking within the form and selecting “It’s All Text”, or by clicking the “Edit” button that you’ll now see to the lower right (based on my configuration) of the input field.

For all of you that spend hours and hours editing wikis and other online forms I hope this helps out.  I know it saved me from wanting to throw myself out the window!