Labeling Hard Drives In Linux

Recently I got another external USB hard drive for backing up data. I plugged it in and everything was great except for one thing. The drive came up with the name (label) that Seagate put on there by default. So I was looking a drive mounted at “/media/FreeAgent Drive”, ugh, that sucks. So, I did a little digging and came across this awesome article that covers the many different ways to label your drive. It was interesting that it all basically comes down to your file system, but this article has most everything covered. Check it out

Tired of removing ^M by hand?

Moving files from Windows to UNIX or Linux (and now MacOSX) can be a pain if during the process you end up with a text file full of EOL characters thanks to how Microsoft terminates lines of text in Windows.  Yep, that’s the little ^M at the end of every line.  Sometimes, no matter how hard you try, you can’t help but get stuck with them.

Here’s a tip for getting rid of them once and for all.  Use the dos2unix command!  Just like it sounds, it converts text files riddled with ^M’s to nice pretty *nix happy files.

By default, the command will open and read your file, and write it back to it’s original name and location.  Minus the ^M beasties.  So you can simply do this to convert a file:

dos2unix filename

Yes, it’s that easy.  There are other options if you want to get fancy, read the man page it’s full of information.  Do a quick Google search and you’ll find lots of resources about it, but chances are it’s already part of your Linux distro.  Other operating systems may be different.  Have fun!

grsync – a great backup and file sync tool

grsync_maingrsync_aboutGreetings everyone, I am back with more information about backing up your files.  I know, I know, talking about backups might be boring, but one day a good backup will save your butt, I guarantee it.  Previously I posted an article extolling the virtues of rsync, a very powerful command line tool for syncing files both locally and across networks via SSH.  This is great for command line addicts like myself, and especially because you can use it in scripts such that along with shared keys and keychain it becomes a powerful tool in your arsenal of sysadmin goodies.

Now, for folks that aren’t command like geeks, or maybe just want a quick and easy way to backup some files, there is a nifty little tool called grsync.  This is (as you can probably guess from the name) a gui for the command line rsync, making it much more user friendly.  Also, it’s quite nice for pointing and clicking what you want, and then seeing what the command it will use is, a learning tool.

The home of grsync is here:

http://www.opbyte.it/grsync/

For Debian, Ubuntu users you can find it in the repositories.

64-bit Linux Running Google Gears In Firefox

Description and Problem:

Google Gears is a plug-in that extends your browser to create a richer platform for web applications. There are many Web applications that currently make use of Google Gears. Some of these include Google Docs, Google Reader, MySpace, Picasa, Zoho and (the reason for this post) now even WordPress. Google Gears, or simply just Gears as it is now known, not only enables offline browsing of supported sites, but it can also greatly improve the performance of these sites and web applications like WordPress. This makes working with supported web applications much nicer.

Now, my problem (and many others of you out there) has been that I am running 64-bit Ubuntu (8.04 Hardy Heron) and Google has not made a 64-bit version of their Gears software. They cite lack of time and testing resources, but my guess is it’s not that important to them since there probably aren’t too many 64-bit users out there. Luckilly for us, Gears is an open source project. This is now a prime example of the beauty of open source software, in that some really smart people created an “unofficial” patch that allows you to install and run Gears on 64-bit Linux in Firefox. In my case it’s Ubuntu and Firefox 3.x, but I have read folk that have had success with SuSE and others as well. It only took me about five minutes once I found the patch.

Here are the steps I took to get this installed, up and running:

Grab the latest version of the Gears binary that has been patched for 64bit at http://www-personal.umich.edu/~swolchok/gears/, I used this command:

wget http://www-personal.umich.edu/~swolchok/gears/gears-linux-opt-0.4.9.0.xpi

Open Firefox and choose File->Open File and browse to where you saved the file you just downloaded. It should open an install window, you want to press the “Install Now” button to start the install.

Once the install is complete, press the “Restart Firefox” button to restart Firefox and complete the installation.

Summary:

For me, upon the initial restart, I got an error about this addon not being compatible with my architecture. Despite that it seems to work fine, and I haven’t gotten any more errors since then, so I would suggest you simply ignore that error.

Lastly, go to a site that is supported, add it to Gears and enjoy! If you have any questions or comments, post ’em below.