Linux Blog

Fedora Classroom – Go Learn something!

Filed under: General Linux — TheLinuxBlog.com at 11:46 am on Tuesday, July 21, 2009

Want to learn about Linux for free? Well, Fedora has a thing called the Fedora classroom which holds classes that teach a group about related technologies. As a casual Fedora user, I find the classes useful but I’m a little bummed that I’ve missed a couple of lessons that I’ve wanted to take in the past.

However tonight, at 9:00 EST (1:00 UTC) Kevin Fenzi is going to be hosting a class on PreUpgrade which is a pretty neat project. I might try to jump on if I get the time, if not it will be reading the chat logs and documentation for me.

For more information on any upcoming classes, or archives of old classes visit https://fedoraproject.org/wiki/Classroom and be sure to bookmark it for future reference.

I’d love to see video or slides along with the classes. Has anyone taken any of these classes or have any thoughts on them?

Sequences with seq

Filed under: Quick Linux Tutorials,Shell Script Sundays — TheLinuxBlog.com at 9:28 pm on Sunday, July 19, 2009

I’m going to keep this one short since time I’ve had a serious lack of time recently. If you need to free up some time by putting repetitive commands into loops, you can use the command seq.

Basically, you can use any generic loop such as the while or for loop. Here are two examples:

for i in `seq 1 10`; do echo $i; done;
 
seq 1 10 | while read i; do echo $i; done;

These both count and echo from 1 to ten. Replace the echo $i; with whatever it is you want to do. You can use sleep, to sleep for a number of seconds, and any other logic you wish here.

Daily vim, Easier Command Line Editing Hack

Filed under: Quick Linux Tutorials — TheLinuxBlog.com at 2:06 pm on Tuesday, July 7, 2009

I’m a fan of the Daily Vim. While reading, I came across the old long command line edit: http://dailyvim.blogspot.com/2009/06/easier-command-line-editing.html

Since I don’t have emacs installed (fire away) after Pressing CTRL-x CTRL-e to edit the command, this is what I got:

[owen@LinuxBlog ~]$
bash: /usr/bin/emacs: No such file or directory

There is a simple fix for this:

sudo ln -s vim /usr/bin/emacs

I’m sure there is a correct way to do this, but this is what I did and it has worked well for me so far.

Thunderbird localmail Spool

Filed under: Linux Software — TheLinuxBlog.com at 1:13 pm on Friday, July 3, 2009

Thunderbird

I was in a bit of a bind the other day when I learned that an IMAP server I was using was going to dissapear. I wanted to backup all of my mail, but had too many messages hosted on the IMAP server to copy from one to another, so I decided I’d download them all locally first and then deal with them later. I used fetchmail to download all of my messages from the IMAP main folder to my local spool, and copied over all of the sub folders because I was in a rush and needed to copy them quickly.

Once they were in my local mail spool, I wanted to get them into Thunderbird, but learned that the option I had once used to read my localmail had gone. There used to be an option for it in the GUI, but somewhere along the line it got removed. After a bit of Googling, I found: http://lists.freebsd.org/pipermail/freebsd-questions/2003-December/027652.html

This worked for me, and should work for any one that wants to use Thunderbird to read local mail.

Basically, you add a new mail account in Thunderbird as usual, then close it. Get into your local profile directory by using

cd .thunderbird/[tab]
 
then
 
vi prefs.js

find your new mail server, with the bogus name and change the hostname to localhost, change your name to <yourusername>@localhost, the server type to movemail, and change the userName to your username. It should look something like the following:

user_pref("mail.server.server4.hostname", "localhost");
user_pref("mail.server.server4.name", "owen@localhost");
user_pref("mail.server.server4.type", "movemail");
user_pref("mail.server.server4.userName", "owen");

Once thats done, you can restart Thunderbird and fetch your mail as usual. From there you can do as you wish with your messages.

Excellent! My question really is why was the GUI option removed from Thunderbird? Whatever the answer this method still works, so if you need to, use it while you still can!