Sep 05

FreeBSD On The Desktop (Part IV: A New Hope)

Due to my recent bad luck with electricity, I was using my home server as a desktop all last week. As a result, I have some more notes to add about using FreeBSD as a Desktop machine, which I hope others may find useful.

Read on for more about Printing, Firefox and Thunderbird interoperability, mounting a USB mass storage device, CD burning with K3B, and Video playback.

Continue reading

Sep 04

Magical Exploding Laptop

So a week ago I had a rather nasty shock. I was watching a TV show that I was playing on my laptop, which was hooked up to my DVD Recorder via S-Video and composite audio cables. Nothing I hadn’t done a few dozen times before. The difference was: I realized that I had not plugged in the laptop’s power cord. When I proceeded to plug in the laptop — *poof* — sparks flew and smoke rolled out of the laptop from under the headphone jacks. It’s an Acer not a Dell so this was truly a surprise :)

After some minor panicing, I found that the laptop would still boot (thankfully) but the audio was dead. I presume the S-Video port was also dead, but I was not about to test it. Sadly, my DirecTivo was also fried (also connected to the DVD Recorder via S-Video) but the DVD recorder is just fine. The jolt also fried a segment of coax cable between the Tivo and the Satellite dish: Specifically it was the segment that goes from the inside of the house to the grounding block outside.

Read on for all of the gruesome details…
Continue reading

May 11

Key Bindings in Bash and Vi

So I was typing away in an ssh window today when for the billionth time I had hit the END key expecting the cursor to jump to the end of the line, and it just printed a ~. As always, I just erased the character and then held down the arrow until I was at the end of the line. However, seeing as it was the billionth time I decided to figure out how to make it actually do what I want.

Not that I didn’t really know how to make it do what I want, I’ve just always been too lazy to actually look up the escape codes and such for the home and end keys, and then actually create the entries to fix it. So for the benefit of any other fellow lazy people, here’s what you need to do:

Create ~/.inputrc and put this in it:

“\e[1~”: beginning-of-line
“\e[4~”: end-of-line
“\eOH”: beginning-of-line
“\eOF”: end-of-line
“\e[H”: beginning-of-line
“\e[F”: end-of-line
That should cover most of the bases terminal-wise.

And to make sure that home/end work in Vi, this is what I added to .exrc:
map [CTRL-V] [HOME] ^
map [CTRL-V] [END] $

When I say [CTRL-V] I mean actually press the keys ctrl and v, not type that out, of course.

There are probably better ways to accomplish this, but this worked for me. Feel free to suggest a more elegant solution.

Apr 02

The Horrors of Daylight Saving Time

So as a resident of Indiana, today is my first day of Daylight Saving Time and I am not happy at all. In addition to having to reset all of the clocks, I also had to change the time zones on all of the computers — Easy enough on Windows, you can just change the time zone to Eastern. However, all my FreeBSD servers required a download and recompile of new time zone definitions. Not just that, but most programs that were started before the time zone switch will not pick up the change until they are restarted. In some cases, it’s safer to just reboot the whole server to make sure everything is running on the same clock. And I hate having to reboot servers.

The reasoning behind the FreeBSD time zone updates is explained in this link. The gist of it is that past file dates can be miscomputed if the time zone is simply switched to Eastern.

Many users of calendaring programs will be bitten by similar problems, causing appointments set before the change to exhibit all kinds of odd behavior.

Personally, I have not seen enough compelling evidence to show that the clock changing business actually saves any energy. It does, however, mess with people’s internal clocks and cause many traffic accidents. Most of the figures done showing that it saves energy seem to be from the 1970’s. I doubt the governer thought about the thousands of man-hours lost in actually changing the clocks, on computers and servers especially – but he sure was sympathetic about the possible loss of an hours worth of drinking at bars!

The only positive effect is that the Indiana legislature will now debate over things that actually matter, instead of over DST.

I’m sure that come Monday I will have to deal with quite a few calls from people who, rather than changing the time zone on their PC, have simply run the clock ahead an hour – only to find out that the clock resets when the Internet Time function resyncs.

Mar 25

FreeBSD on the Desktop (Part III)

I spent a week booted into only FreeBSD, and met with a lot of problems. Many of them could be overcome, but the fact of the matter is that I was simply less productive under FreeBSD than I was under Windows, mainly because of little issues. Things such as keyboard bindings and interface issues that were not consistent between applications, the file associations mechanism was almost working as it should, but it wasn’t obeyed by all applications.

As much as I love, it was simply not able to properly handle all of our work-related doucments. It will take some more investigating as to why, but on Windows formatted the documents properly, most of the time, but on FreeBSD they were mangled.

I’m going to try putting together another PC and retasking an unused KVM so that I might have a FreeBSD box and Windows box at my desk. Perhaps that way I can have the best of both worlds, and do some more experimenting while not losing any productivity…

Feb 21

FreeBSD on the Desktop (Part II)

I made a few updates to my page on Desktop FreeBSD. I have been attempting to switch my desktop at work completely over. So far there are only a few hitches. I haven’t booted into Windows in nearly a week.

The biggest problem has been printing, but it is more of a hardware compatibility issue than anything.

Dec 23

Merits of RBLs?

A couple weeks ago, the SORBS spamtrap list picked up a few Hotmail and Gmail servers, and a Yahoo mailing list server. This lead to me getting complaints that legitimate mail was bouncing. I’m all for letting the mail get blocked, because it’s the only way that large companies like Google and Microsoft will be forced to fix problems. Unfortunately, the end users don’t see it this way. They think because Hotmail user A can’t get mail to our user B, it’s a problem with our system and we need to fix it. Ignoring the fact that thousands of other ISPs who use the same RBL are also blocking mail from those people. Long story short, I was forced to remove the spamtrap RBL (by using all of the separate SORBS RBLs instead of the composite list) — the mail started flowing again and the complaints stopped.

This is leading to conversations on the general merit of RBLs in general, and whether or not we should use them because it’s allowing someone else to control whether or not mail gets to our users. Of course the people raising these questions do not have to listen to the end user complaints. People want all their mail and no spam, which of course is impossible.

Currently, between several different RBLs, we reject about 130,000 messages per day (~80% of the total daily mail volume) at the MTA level. Should we turn them off, everybody would notice. There are no other spam filtering techniques that have done as much to reduce our spam overall as RBLs. Sure, we could throw a million content filters at it, but that takes a lot of horsepower to run, and probably would not be as effective. I put more stock in RBLs than I do in content filtering. The only legitimate alternative to using RBLs at the MTA level is using them in SpamAssassin where they are ranked with scores based on the RBL’s reliability and such. However, performing the RBL checks in SpamAssassin also introduces a lot more delays in message delivery (and of course, if someone sends an e-mail and the other person doesn’t have it in less than a minute people call and complain too!)

Life would be so much easier if there was a secure and spam-resistant alternative to SMTP, but that won’t be happening anytime soon.

Dec 11

Ruby on Rails

So it’s been quite some time since I posted anything, mainly because I’ve been rather busy on a project at work. It’s a fairly complex system that we used Ruby on Rails for. I had never used Rails before (or Ruby for that matter!) but it was easy to pick up (I suppose having coded in a dozen languages or so at one time or another makes picking up new ones easier…) Rails really excels at taking care of the grunt work (db access/mapping especially) and lets you focus on what you’re trying to accomplish.

I did all of my coding using Eclipse, with Ruby Develpment Tools, Subclipse (for Subversion access), and most importantly the RadRails plugin. For the most part is was a good experience. There were a few times when renaming a file or performing miscellaneous actions that Eclipse locked up on me (at home and at work) but restarting Eclipse worked ok. The only feature missing that would have been nice is Rails debugging. It’s in the works in RadRails, but it’s a ways off.

More about Ruby on Rails can be found elsewhere.

I found the book Agile Web Development with Rails invaluable during the entire process. (Programming Ruby is another fine choice, too!)

Sep 06

FreeBSD on the Desktop

Try as I might, it seems I can’t get away from Windows as my primary desktop both at work and at home. My unix-a-like OS of choice is FreeBSD, and I use it on many servers as well as a couple “pseudo desktop” systems (low-task servers that I can run X and a few apps on) I am going to start a page keeping track of all the “show stoppers” keeping me from running it as my primary desktop, and happily check off items as they are found.

Part of me would love to just take the plunge and go the full immersion route, but due to some of the work-related windows-only issues, I don’t see that going as well as I’d like.

EDIT: Sep 08 2005 – I forgot a link to the page. It’s a work in progress…

Jun 23

Spammers Faking Received Headers (duh)

Recently I was perplexed by the number of spam messages that were getting through my SpamAssassin setup. A coworker forwarded a couple obvious spams the other day and he was wondering too. So I decided to do a little digging. Out of a random sample of spam coming through when I checked, about 85% or more were using a particular tactic trying to bypass filters.

All of them had a faked received header at the “beginning” of the message’s path. The faked header matched up with the faked from address as well. Of course this was not a big shock. I’ve seen faked headers before, but not on this scale and so similar. An unusual number of them were pushing stocks instead of pills, too.

Continue reading