FlashGot

I'm likely the last person in the world who heard of FlashGot, but better late than never. FlashGot is a Firefox plugin that lets you integrate with an external download manager program. It also lets you download every link on a page via a single menu command, which is either nice or overkill, depending on what you want to do.

Linux doesn't have many (any?) good download managers. There's D4X, but I never cared much for it. I installed GWGET but FlashGot didn't auto-recognize it, and I'm not going through any trouble to get it working.

However I still find FlashGot incredibly useful, for one reason: You can use a custom downloader executable. FlashGot will then call the executable and pass it the download URL as a command line argument. You can also pass other arguments (read about them all here) but the URL is all I really need.

The downloader I use is a simple Ruby script I wrote myself which calls wget. What's the point of this, you ask? Well, you can do some neat things like:

  • Filter your downloads into directories by filetype, filename, source website, or any criteria at all.
  • Spawn massive numbers of parallel downloads with a single click. (Probably not a good idea to hammer servers too much with this though, it's not nice.)
  • Use all the power of wget, which includes:

  • custom timeout duration* download retrying* download resuming* filename timestamping* download speed throttling* FTP suport* (perhaps my favorite) GOOD filename collision resolution, so if you download a file called 1.png and then download a file called 1.png from a different site, wget will save the second one as 1.png.1. This something I miss from Safari. Firefox by default tends to ask you if you want to overwrite the old file, which gets very annoying very quickly.

  • You could even conceivably crawl a web page or do recursive downloads.

Let's say you want every MP3 you download to go into a "music" folder, every PNG you download to go into a "Pictures" folder, and ignore all other files. You could do something extremely simple like this (which I just wrote in 5 minutes and haven't tested):

#!/usr/bin/ruby

require 'fileutils'

begin
    ARGV.each do |arg|
        dir = ''
        if arg =~ /mp3/i then
            dir = '/home/chester/music'
        elsif arg =~ /png/i then
            dir = '/home/chester/pictures'
        else
            dir = nil
        end
        if dir then
            FileUtils.mkdir(dir) unless File.directory?(dir)
            Dir.chdir(dir) do
                `wget #{arg}`
            end
        end            
    end
rescue Exception => e
    # If you want to see the output
    # when the script crashes, you 
    # could log it here.
    raise e
end

Point FlashGot to this script and when you "FlashGot All", all linked PNGs and MP3s on a site will be downloaded and sorted, and all other links will be ignored. This would be very useful if you want to grab a whole page of wallpapers for example.

April 17, 2006 @ 3:29 AM PDT
Cateogory: Linux

Opera

I tried Opera today (first time in a long while). It's extremely annoying in many ways, but Firefox is even MORE annoying in even MORE ways, nowadays. So I'm going to give Opera a try for a while.

It's really come a long way since last time I tried it. I still fondly remember the early days of Firefox aka Firebird aka Phoenix, and Opera always had tons more options and good stuff than Phoenix back then. Maybe I'll get used to Opera's mouse gestures again, who knows.

April 15, 2006 @ 10:49 AM PDT
Cateogory: Linux
Tags: Firefox, Opera

Printer: part 2

I just got my printer set up in Linux just now (attached to a Mac Mini on my LAN, don't forget). Let's see. First I opened the Gentoo Printing Guide. Then I looked under "Setting Up a Remote Printer". Then I followed the directions word-for-word. I typed

sudo emerge -upv cups
sudo emerge cups</pre>

Then I changed one line in /etc/cups/client.conf to say

ServerName mini

Then I typed

sudo /etc/init.d/cupsd start

And then it worked. Why do people say Linux is hard to configure?

Now I can do things like echo "hello" | lpr.

*wipes away a tear of joy*

April 11, 2006 @ 11:59 AM PDT
Cateogory: Hardware
Tags: Mac, Gentoo, Linux, OS X

Sharing a printer from OS X to Windows XP

So I bought a new printer recently: a Canon PIXMA iP1600. I have a computer running dual-boot Windows XP and Gentoo, and a Mac Mini. Clearly the most logical setup is to put the printer on the Mac, and have my other computer share the printer; I just have to set up Gentoo and XP both to look for the Mac printer. Then I can print from all three operating systems.

In case you haven't guessed at this point, no, this is not going to be pretty.

April 09, 2006 @ 6:53 AM PDT
Cateogory: Hardware

FVWM = bad

I briefly considered playing with FVWM again, but then I realized what a massive waste of time it is. I wish there was something like FVWM that didn't look like 90% of it was transported here from the 80's. It's really great for giving you the ability to change almost anything. The only problem is that in those few cases where you don't have the power to change, the defaults FVWM picks are horrible.

Window handles for example. Approximately 100% of the "less powerful" window managers let you graphically change the window handles and window borders. FVWM lets you either remove them, have a flat colored border, have a nasty "textured" border with a tiled pixmap (ugh) or use the most God-awful 3D-ish borders I've ever seen. If you doubt this, look at some screenshots.

You can't use a non-tiled pixmap for the borders. You can't set per-side border width. You can't do like Openbox and just keep bottom handles. This is something fundamental. Dragging a window border is something I use hundreds of time a day to resize or move windows. And window decorations are present at all times on every single window you open. It should be customizable exactly how I want it.

So my new philosophy on window managers is to pick something that has sensible defaults when it has any defaults at all, and still lets you customize what you actually give a crap about customizing. Openbox is pretty good for that.

April 06, 2006 @ 10:45 AM PDT
Cateogory: Linux

Malware? Reinstall Windows!

Microsoft now confirms that in many cases, the only solution for viruses and malware is to wipe your hard drive and reinstall Windows. This confirms what is common experience for anyone who has used Windows in the past decade. Oh how I'm going to pound people over the head with this article, because my advice to people with a virus is almost always "reinstall Windows" and people think I'm being sarcastic or pessimistic.

I find this all simultaneously hilarious and depressing, of course.

April 04, 2006 @ 3:57 AM PDT
Cateogory: Rants
Tags: Windows

Turn off Spotlight.

If you have a first-generation Mac Mini (as I do) and you haven't dished out money for an extra (faster) hard drive, you're probably suffering with terrible performance. They put some kind of slow laptop hard drive in there to keep the thing small, or whatever.

This is a good tip on how to disable Spotlight (the post by jjccgg, NOT the original post), which should in theory boost performance by stopping the constant hard drive indexing. I've done this and I can indeed immediately see a performance boost. I haven't benchmarked it, but it's noticeable enough that I don't think I need to.

I find Spotlight to be nearly worthless. Searching is not the most efficient way to find files, in my opinion. It's good in the average case, but terrible in the worst case. I define "worst case" here to mean that you don't know the NAME of a file. If I organize things by folder, I only need to know the LOCATION of a file. It's more likely that I forget a file name or description than that I forget a file's general location, in the worst case.

For example, I can think of a bunch of wallpapers that I downloaded, and they likely have names like 1.jpg, 03984.png etc. I know where to get them (some subdir of the wallpaper directory), but searching would not find them easily. I can think of documents I've written, but I don't know the name of them or their titles. The solution to this (and what Spotlight expects, apparently) is for you to tag all your files so the search can find them easier. But in that case, we've fallen back to a pseudo-folder structure, only with greater room for error and lots more fuzzy areas.

That's my problem with desktop search, I guess: it's too fuzzy. You have to rely upon the strength of your search algorithm, and I don't have a heck of a lot of faith in search algorithms.

March 27, 2006 @ 9:21 AM PST
Cateogory: Hardware
Tags: Mac, OS X

Windows Vista - nice.

http://minimsft.blogspot.com/2006/03/vista-2007-fire-leadership-now.html

This is apparently a post full of MS employees discussing how terrible Vista is. Who could possibly say they're surprised? After the 20th MS product you use turns out to be a bug-ridden crash machine, it's hard to expect anything new not to be the same.

One day, after everyone buys new computers that come pre-installed with Vista enough that everyone HAS Vista, those of us who don't will be forced either to upgrade or live with a computer that can't talk to anyone. That's the thing that gets me. Even if you KNOW Windows is crap, your ability to make an informed consumer decision is grossly limited by the consumer decisions of everyone else.

httpundefined

March 26, 2006 @ 3:06 AM PST
Cateogory: Rants
Tags: Vista, Windows

Openbox theme

I uploaded my Openbox theme, get it here. Also included are tangent, trayer, and pypanel configs.

March 25, 2006 @ 3:12 AM PST
Cateogory: Linux

GDM and .xsession

I finally figured out how to get GDM to recognize my ~/.xsession. I had to go read /etc/X11/gdm/Xsession and see what it was doing. It's testing -x for ~/.xsession, which is what I was missing. So

  1. Make a `~/.xsession` and `chmod u+x` it.
  2. When you start GDM, select "Custom Session".

Then it will work. This is necessary because openbox doesn't provide any kind of startup feature. (PS I'm trying openbox now. Screenshots coming soon.)

March 23, 2006 @ 9:47 AM PST
Cateogory: Linux