Take your tunes anywhere with Music Browser

Date June 30, 2008

Music Browser

After searching a bit for a worthwhile flash MP3 player suitable for a large collection, I finally came across something that works well. The problem with most of the freely available players is that most require a playlist to be created in XML or .pls format beforehand. That’s not what I wanted. I want to be able to browse my sizable collection and pick and choose what to listen to on a whim.

Music Browser allows you to do just that. The only thing you need to do, after setting up a PHP capable web browser of course, is edit index.php and add the path to your collection. That’s it. You now have a browseable player for your home collection.

My Setup:

  • Lighttpd
  • PHP 5.2 FastCGI
  • MusicBrowser

With some home connections, it’s necessary to run on an alternate port as many ISPs traditionally block incoming port 80.  I chose 8080, forwarded via my router, leading to a password protected root.  Just drop musicplayer in place, edit index.php with your collection’s location, and you’re good to go.

Groove on!

What pisses me off: DNS “miss” results pages

Date June 17, 2008

I switched back to my ISP’s nameservers after getting fed up with OpenDNS. I love the idea of OpenDNS and thought I would like the service a lot. Turns out that it ended up pissing me off far more than any generic service, but that rant is for another post. One thing OpenDNS does have in common with my ISP (and apparently many others), is its helpful results page served to you when a domain is not resolved.

Cox Results Page

For a varying definition of helpful, that is. According to what has been standard practice and is indeed in the DNS RFCs, when a DNS server is queried for a non-existent domain, it should return a “not found” response.

mshade@gobot:~$ ping idontexist.com
ping: unknown host idontexist.com

It’s quickly becoming common practice to instead redirect these unsuccessful queries to a landing page with search results of the keywords in the hostname or the hostname itself.  What’s wrong with this?  I can think of a few problems off the top of my head. Some are simply a matter of convention and expectations, while others are technical.  Here is a short list:

  • Standard tools break when an unresolved hostname would normally be detected, instead receiving the IP of the web proxy used to display these helpful results.
  • Troubleshooting DNS problems becomes harder.
  • When I enter an invalid domain, the error is obvious.  I don’t want to click your search results, or have my entry auto-corrected transparently.  I want to see that error.
  • Modern browsers already suggest solutions to common errors when entering URLs, even suggesting addresses previously visited.
  • The landing pages are usually ad-filled and contain irrelevant search results anyway.
  • The internet is not only for browsers.  Though the majority of traffic may be browser driven, DNS servers are supposed to be application neutral.

I’m sure there are others that I’m missing at the moment, and I’m sure there will be arguments as to the benefits of this behavior.  When it comes down to it though, this just feels like yet another bastardization of the internet and another piece of useless hand-holding designed to dumb down the net and make money off ads served by users’ mistakes.

Editing Remote Files with VIM and SCP

Date June 8, 2008

Two weeks ago, a good friend and I were chatting about what features would make life easier in our day to day jobs of web design and system administration.  Among what we discussed was the ability to edit remote files in VIM without having to open a remote shell to the system in question.  We were thinking of things like the FUSE system and Fish protocol, but weren’t aware anything was out there already.  Folks on GNOME or KDE can just open a fish://, sftp://, or scp:// session in their file browser and edit directly with a GUI editor.  Those of us who work mainly in command line, however, are left with simple SSH.  Not that SSH is much of a hassle — It’s not.  But for those times when a quick edit is all that’s necessary, wouldn’t it be nice to just reference the file directly?

As luck would have it, serendipity reared its head a couple of days ago while I was chatting with a coworker.  It turns out that recent version of VIM already include this functionality!  Here’s all you need to do:

$ vim scp://hostname.example.com//path/to/file.txt

Or, if you need to connect as a different user:

$ vim scp://user@hostname.example.com//path/to/file.txt

If you need to specify an alternate port, use the familiar colon (:) syntax:

$ vim scp://user@hostname.example.com:5757//path/to/file.txt

That’s all there is to it!  The file is read into VIM from the remote system, if it exists.  Then, you are free to make changes.  When you save, changes are written to the remote system.  This helps cut down on bandwidth and lag on slow connections.  For more information, see the posting at vim.org.

Disturbing Ad

Date June 8, 2008

I was heading over to IMDB to check out the listing for This Film Is Not Yet Rated when I spied an advertisement for anti-wrinkle cream.  The first frame was a very old, very, very wrinkled lady.  I had an idea of what was coming next, but didn’t want to believe it.

face1

Bravely, I rolled over the image to confirm my fears…

face2

You can’t be serious!  The best cosmetic surgeons on Earth couldn’t turn that first lady into what you see here.

What’s worse, however, is if this stuff really works — no man is safe from the cougars in the back alleys and bars…

Hard Drive Recovery Primer

Date May 12, 2008

Slashdot posted “A Walk Through the Hard Drive Recovery Process” today.  It was essentially an advertisement for the data recovery service used in the article with little to no real information.  This is typically known as a slashvertisement to those familiar with Slashdot.

Hidden in the comments, however, was a gem — a link to Defcon 14’s Hard Drive Recovery presentation which is excellent.  Diagrams, graphs, and raw how-to knowledge are presented in a 5 part YouTube series that is seriously worth watching.

The presenter talks about each part of the drive and what to do when presented with failures in any one or combination of parts.  He even addresses the often repeated technique of freezing your drive (hint — not the best first course of action, according to this speaker).

Real techniques from a real tech:

Part 1

Part 2

Part 3

Part 4

Part 5

LMMS: Fruity Loops for Linux

Date May 7, 2008

I had a lot of fun with Linux Multi Media System.  As far as I have been able to find, it’s the closest thing to Fruity Loops that I’ve been able to find for linux.  It doesn’t take a whole lot of learning and is just an apt-get away on Ubuntu.

Here’s a little tune I did with it in a couple of hours:

Terminator: A Kick-ass Terminal

Date May 7, 2008

I thought tabs were great.  In reality, they’re useful for some things — web browsing and file managing come to mind.  But when it comes to working in a terminal, it’s really tedious to have to flip back and forth between tabs in your terminal emulator.  Things get lost, you forget which machine is which, and on and on.

One thing I always liked about GNU Screen is that you could split the window up, however rarely I used that feature.  But Terminator brings that functionality in a clean way to Gnome-Terminal, and you’ll never believe how much it boosts your productivity!  These days, with large displays and dual-monitor setups more common, it just makes sense to be able to divide your terminal any way you see fit.  Comparing output of commands, working with multiple machines, whatever your task might be — it’s easier than ever with this little add-on app.

Terminator is built off Gnome-Terminal, which means you still manage your terminal preferences through its interface.  The options you’ll find in Terminator itself are pretty bare-bones — but I like it that way.  Right clicking on the main window gives you a few succinct options:

  • Copy / Paste
  • Show Scrollbar
  • Split Horizontally
  • Split Vertically
  • Close

There’s not much more to ask for once you have the look and feel right.  It might be nice to be able to edit preferences directly from Terminal, but I don’t find myself digging around in terminal emulator options too much anyway once I have my main look and feel set up the way I like (white text on black blackground, please).

On Ubuntu, it’s an apt-get install terminator away.  For other distros, see its home page, here.

Slow downloads with apt-get? Change repos with Select Best Server

Date May 7, 2008

Ubuntu 8.04 (Hardy Heron) came out at the tail end of last month and since upgrading, any operation with apt-get or Synaptics has been excruciatingly slow.  For a time, probably the first 24 hours after having upgraded, apt-get update commands were even timing out!  At that point, I manually changed my mirrors in /etc/apt/sources.list to a UK mirror just to get off the ground.

When the US mirrors began working again, I changed it back.  However, they’ve remained incredibly slow for me, even with my 15mbit connection.  Luckily, Ubuntu includes a handy utility to choose the best mirror and get you back up to speed.

Selecting a Better Mirror

  1. Select System > Administration > Software Sources
  2. Select Other… from the Download from: dropdown menu
  3. Click Select Best Server and wait for the tests to finish
  4. Click Close and allow the app to update the sources

After performing this, you’ll be installing software at better speeds in no time.  I jumped from an average of 4-20KB/s to 800+KB/s.

Slim Aluminum Apple Keyboard with Ubuntu Hardy Heron

Date April 30, 2008

Apple Slim Aluminum Keyboard

I use the new Apple Slim USB Keyboard with my linux box because I love the way it feels.  The new version of Ubuntu isn’t as fond of it as I am.

Number Pad

If you press the ‘clear’ button on the Apple keyboard, it functions as the NumLock button would on a regular PC keyboard.  It turns NumLock on, but then part of the alpha portion of the keyboard works like the number pad — as it would on a compact laptop or PowerBook keyboard.  Once engaged, pressing ‘clear’ again does not switch it off!  Since Gnome stores the state of NumLock between sessions, rebooting doesn’t help.  You’re able to log in, but once your session is loaded, NumLock is turned right back on.

If it’s stuck in the on position, you can tap the F6 key twice to turn it back off — when the layout is changed by the ‘clear’ key, F6 becomes the new NumLock.  It does this because it assumes you are using a PowerBook style keyboard with no dedicated number pad.  This is a kernel bug introduced by a recent patch to the Mac keyboard driver.

To get your number pad working normally, you can set a couple of compatibility options.

  1. Select System > Preferences > Keyboard
  2. Go to the Layouts tab
  3. Click Layout Options…
  4. Under Miscellaneous compatibility options, select both Default numeric keypad keys and Numeric keypad keys work as with Mac

Unfortunately, ‘clear’ will still cause the funky behavior described above.  Until this bug is patched, just remember you can tap F6 twice if NumLock is stuck on.

Function Keys

Another issue is that the function keys no longer work normally.  With Ubuntu Gutsy, you were able to use the function keys just like a PC keyboard.  With the newer kernel, you need to hold the ‘fn’ key and then hit the desired function key.

The NumLock / keypad bug is logged here on launchpad, as well as a lengthy discussion about this particular keyboard’s issues with Ubuntu at this time.  Check it out for more details and geekery.

Connect to Windows VPN Server (pptp) with Ubuntu Hardy Heron

Date April 29, 2008

Ubuntu Hardy Heron 8.04 came out last week, and I thought I’d take a moment to do a new post about connecting to a workplace VPN that uses Windows Server’s built in PPTP ability.  Not a lot has changed, so you can also refer to the older article here.

The process is simple, but oftentimes discovering the necessary steps is the hard part.

Install PPTP plugin for Network Manager

  1. Open Add/Remove from the Applications menu
  2. Select All available applications from the show dropdown menu
  3. Enter pptp in the search box
  4. Select VPN Connection Manager
  5. Apply Changes to install.

Reboot or Restart the dbus Service

Next, you can either reboot your machine or restart the dbus service and log out and back in.  If you’d rather not reboot, follow these instructions:

  1. Open a terminal and restart the dbus service with: sudo /etc/init.d/dbus restart
  2. Log out of GNOME, or hit control-alt-backspace
  3. Log back in

VPN Setup

Entering the details of your VPN is relatively straightforward, with one caveat and a few advanced options.

  1. Click on the Network Manager applet in your system tray, and select VPN Connections > Configure VPN…
  2. Click Add and follow the wizard to begin configuration.  Enter a name for the connection, and the address of the VPN server.
  3. IMPORTANT - Switch to the Authentication tab and select Refuse CHAP.  This is necessary to connect to a server using the default configuration of the Microsoft PPTP VPN service.

If you have special requirements, or prefer not to tunnel all your traffic through the company VPN while connected, you can specify some advanced options that allow you to customize the connection

  • DNS - Deselect Use Peer DNS under the PPP Options tab and Peer DNS through tunnel under the Routing tab if you’d prefer to use your local DNS server for queries.
  • Routing - Select Only use VPN connection for these addresses if you know the address or subnet of the machine you’d like to connect to.  This is specified using slash (or CIDR) notation.  For example, if your workplace network uses addresses on the 10.10.1.0 network, you would specifiy 10.10.1.0/24 to only route those addresses over the VPN.

Connect!

All that’s left now is to connect.  Click the Network Manager applet once more, and select the profile you defined in the last step from VPN Connections.  Enter your credentials in the authentication screen that pops up, and wait for it to connect.  Once connected, Network Manager will display a lock on your connection, signifying that your secure tunnel is in place.

Kubuntu PPTP VPN

Unfortunately, there is a standing bug in KNetworkManager (network-manager-kde) that prevents configuration of the PPTP client with the error message:

There is no configuration interface for the VPN service ppp installed. Please check your installation.

However, if it has been configured via the Gnome NetworkManager plugin, you are still able to connect.

  1. Right click the KNetworkManager icon in the tray
  2. Select VPN Connections > Connect to Your Network and go.

After connecting with KNetworkManager, you are able to browse shares with Konqueror and access any other services on the remote network normally.