Sunday, June 21, 2009

Virtualbox


What if you want to evaluate or work with multiple operating systems, or different versions or configurations of the same operating system without each affecting the other? One simple way is to set up multiple partitions on a hard disk, and install the different operating systems or versions on different partitions, then select which operating system you want to use at boot time.

While that’s the time honored way to do it, it’s become more common to run different “guest” operating systems under different “virtual machines”, running under a “host” operating system. The virtualization application intercepts the guest OS accesses to and from its “hardware”, translating them on the fly to use services of the host OS. Each guest thinks it has exclusive rights to hardware, when it fact, the hardware of the guest is a creation of the virtualization application.

There are several advantages to doing this. You can save snapshots of the guest before you make a major change or test unstable software. If it doesn’t work out, the entire virtual machine can be rewound to a previous state. You can back up the entire virtual machine, and delete it from the host’s hard disk at will. Another advantage is that you can have the best of both worlds. Run a beta version of Windows, without risking your stable version. Run different Linux applications without having to reboot to Windows, or vice versa.

Virtualbox (virtualbox.org) is a free (Open source, or with more features for personal use or evaluation only) program from Sun Microsystems which does a great job. Simply have it create a “virtual disk” of the desired type and size, give access to your CDROM or ISO image to the guest, and install. You can map or share the host’s peripherals, including its network with the guest, and, with the personal use version, you can even share the host’s USB peripherals with the guest. Hardware video acceleration and remote desktop to the quest is also provided.

You can run the virtual machine in a host window, but it’s usually easiest to give it its own desktop. You can then simply switch between host and guest desktops. You can even merge the two operating systems on the same desktop (which can be a bit confusing). The guest application windows then can run alongside host application windows, each retaining the look and feel of the parent OS.

Applications running on the guest often run as fast as they would natively. But you do have to divvy up and allocate the hosts RAM between the host and guest(s), so it works best if the host has a lot of RAM. You’ll also need enough real disk space to hold all the guest’s virtual disks.

I use it to continue to use some Windows applications in a stripped down virtualized version of XP home. Those are the Windows applications I can’t do without (flight planning, Quicken, RSS readers), but running from with Ubuntu (Linux) host. Having a stable host OS is also a good idea, because if the host goes down, the guests crash. I have yet to find a Windows app which doesn’t work well into the virtualized XP environment.

Highly recommended.

Saturday, June 20, 2009

Puppy on a stick


Wouldn't it be nice if you could carry around not only your files and portable applications, but an entire operating system on a USB stick? Just stick it into any Intel based machine which allows booting from a USB device (most post Windows 95 machines do), and away you go. When you're finished, everything is updated on your stick and nothing is done to, or left behind, on the host's drive. Yet, you can still access the host's drive, if you want to. Which makes it a great tool for rescuing files from a hard disk which won't boot.

There are several Linux versions which can do this, but Puppy Linux is perhaps the best. It gives you an amazing array of capabilities and programs, using only about 100 MB of space on your stick, and loads entirely in RAM on a machine with as little as 256 MB of RAM. Being small and running completely from RAM makes this operating system fly, even on old machines. And since it boots faster and shuts down much faster than Windows, less of your time is wasted waiting for that over-bloated dinosaur to come up and go away each time. Write documents, burn disks, listen to music, watch videos, surf the web, get your mail, and be done fast.

Saturday, November 1, 2008

Online Backup - Mozy


Local backup is great, as long as your backup is independent of your PC, is at least as reliable, and is portable. Backing up your files on the same drive as the operating system is a poor choice, since it’s that drive which will most likely fail. Backing up to a separate disk on the same PC is still asking for losing it to a system-wide failure (such as a power surge from lightning). Network backup between different PCs is a good choice, as long as the other machine is always on.

Until recently, I relied on automatic periodic backups to external USB drives. For compatibility, I used the Winzip jobs function to produce scheduled full and incremental backups in plain vanilla zip format with date and time stamps embedded in the file name to the external drives. In case of emergency, the USB drives are small enough to wrap in plastic, take along, and access with a laptop on the road.

Great idea, but that means you have to leave the USB drive plugged in all the time, as there is no way to put them asleep and to wake them up on schedule with Windows XP. Meanwhile, the disks on the PCs themselves can be powered down during periods of inactivity, extending their lives compared with the hot/small drive enclosures, which cook drives quickly.

After having several IDE drives in USB drive enclosures fail much quicker than the drives on the PCs they were supposed to back up, I finally decided on going to on-line backup. The free accounts are great for a few GB of files, but they’re not enough for all the photos, music, and E-mail I’ve accumulated over the years.

So I expanded my free Mozy account to unlimited backup for $4.95/month. It took several days to do the initial backup of 22 GB, during which the performance of the PC took a hit. But after that, the incremental backups were scheduled for off-hours, and the bandwidth used was limited. After the initial backup, the incremental backups have been painless and I don’t have to think about them. The on-line backup shows up a drive so you can see what’s backed up. All I do is to periodically check to make sure everything I care about is being uploaded. If not, it’s been easy to expand the file types and directories in the configuration program. The files can be accessed from the web and restored to another PC, if needed.

Recommended.

Saturday, October 25, 2008

Code::Blocks and MinGW


As part of my job, I write embedded software and write a lot of simple console applications to process data. I’m not a GUI kind of guy, and tend to stick with simple portable ANSI “C”. Stuff I can port painlessly between a PC, a workstation, and various embedded microprocessors and DSPs. I’m not an object oriented kind of guy, and you might say I have no “class”. I work close to bare metal, and I want to know where every byte is going. “C” being a universal assembly level language is a complement from someone who’s written and still writes a lot of assembly code. As you can guess, I’m not a software engineer.

I’ve been through every combination of Microsoft and Borland compilers, along with dozens of different and funky microprocessor and DSP compilers. And I’ve paid a lot of money for most of them. I used to use command line tools because I had to, but I’ve been spoiled by integrated editors, debuggers, project, and build tools. Yeah, there is free alternatives like GCC for many processors, but I don’t like having to learn the quirks of yet another command line compiler and linker.

How about having it both ways: Free and friendly. I was looking for more portable applications (ones which don’t need to be installed and can be run from a USB stick on the road), and I came across Code::Blocks (codeblocks.org). A nice middle of the road IDE with a decent editor, debugger, and project organization tools. Better yet, downloadable with the MinGW version of GCC already integrated. Or it will recognize and can your off the shelf Microsoft or Boland tools, if you like.

Best yet, the combination of Code::Blocks and MinGW works great from a stick, without installation on a PC. Good compiler/linker warnings, and it seems to output decent code. For the road, I can now carry my source code with me in an encrypted folder, and can modify and rebuild it on any PC, leaving nothing behind on the host.

Cool, eh?

Why Linux?


In one of my first posts, I ranted about how Windows is buggy, unstable, and hard to maintain. There has to be something better out there for those of us who don’t have Apple hardware and yearn to be free from expensive proprietary software and operating systems.

A solution exists. It’s called Linux. Yes, it’s derived from the Unix operating system, and that legacy is still there for you to play with, if you want. But most people today would be horrified by the terse (albeit powerful) Unix command set and the tools used with it back in the bad old days. DOS copied many of the commands and structures, and most people don’t realize that the present Apple operating system has deep roots in a Unix derivative.

Linux gets its name from Linus Torvalds, who as a college student, wrote a non-commercial alternative of a Unix derivative. Since then, it’s become an Open Source world wide phenomena with programmers from all over the world contributing toward its future.

It is constantly updated and renewed, becoming more powerful, stable, and easier to use. It’s broken out of the nerd elite and they’re coming after you, the average user by making the experience more like that of Windows, without all the bugs, high prices, and frustrations.

Have old hardware that can’t run the latest software? How about a new operating system that’s only 50MB and runs completely in RAM on an old machine without much memory? Or one that can boot and run from a USB stick or a CD without altering the machine it’s running on? Or one that can be run or installed from within Windows, or booted as a choice alongside Windows, if you can’t yet bear to do completely without Microsoft. Or, gasp, can run Windows from within Linux simultaneously. How about more bells, whistles, and eye candy than Windows could ever dream of. Something more “Mac like”, perhaps. Stable as a rock and just keeps working. How about something which can live along side Windows, read and write its files, and can rescue those files when Windows crashes, all without having to be installed itself.

Want choice? That super small efficient version that flies on old hardware, or a version which takes advantage of all the CPU cores, memory, and fancy video hardware, packed with a huge suite of applications ready to run? Linux is all about choice. Small/efficient like DSL (Damn Small Linux) or cute as a Puppy (Linux). Commercial support on big servers or across the Enterprise (Red Hat). Or a refuge for the average Windows user on recent hardware (Ubuntu). Choose your size and look and feel, all with a familiar core that constantly improves and scales up and down to all the variants. Try it with no obligation by just booting from CD. Try one, try another. Freedom that’s free.

You won’t miss defragging (you won’t be fragmenting), worrying about viruses and spyware (they can’t get a foothold), fixing broken registries (there isn’t one), and keeping up with updates (you’ll be notified and the operating system and applications can be updated together easily at one time, most of the time, without rebooting). Many of the applications are also trying to win you over also. Substitutable for and compatible with Microsoft Office applications, and substitutes for or better than substitutes for other common expensive software applications. For free!

OK, it’s still a bit techy, and sometimes you still have to roll up your sleeves and get under the hood a bit on some of the more challenging applications, but it beats keeping buggy Windows stuff going that you paid good money for.

More along the way.

Newsreaders (RSS) and FeedDemon

A newsreader is a program which allows you to read and organize “feeds” from news sources, magazines, blogs and other sources, including podcasts and videocasts. Think of it as a headline service, which presents you with just the headlines, or just the headlines and a synopsis of the feed, allowing you to pick and choose which ones you’ll drill into.

You can collect the feeds all at once, or you can simply have the program collect the feeds in the background at predetermined intervals. The program doesn’t download the detailed information unless you request it. The detailed information is usually displayed in a brower window and doesn’t clutter up your hard drive. A good program can keep track of what you’ve seen and what you haven’t, can easily mark all unwanted feeds as read, and can retain only a certain number of items in each folder or can delete all feeds older than a certain date.

I’ve played around with several different newreaders, but by far the best has been feedDemon. It wasn’t free when I started to use it, and even though it is now, it’s been worth every penny I’ve spent on it. Great browser integration, a nice “panic button” for clearing out old items, and very good automatic handling and downloading of podcasts.

It was bought out by NewGator (newsgator.com) and became free software. The best part about the integration with NewsGator is that FeedDemon synchronizes with their web service so you have all your feeds available via the web when you’re away from home, and their service remembers which feeds you’ve read and which you haven’t with the FeedDemon client. And as a bonus, if you have FeedDemon on multiple machines, they stay synchronized so you aren’t presented as unread old feeds you’ve read on your other machines.

Only two things on the wish list to make it perfect. First, make it portable or put out a portable version so we can take it around with us on a USB stick. OK… you can always go to the NewGator web site (free account) to read your feeds, but using the reader is so much nicer. And please either make a Linux version, or make it so it can be run under WINE (to be explained in another post).

FeedDemon is one of my last reasons to still be using Windows. I use Liferea with Linux, but it’s not nearly as slick and the synchronization capability of FeedDemon has no rival. Good stuff.

Portable Applications

One of the biggest problems with most software written for the PC is they aren’t designed to be stand alone. They use a tangled web of resources from windows and other programs, and often make complicated registry entries. The registry becomes all too easily corrupted by botched installs or removals, viruses, spyware, and by just plain badly written software. Wrong, missing, corrupted, or incompatible DLLs further complicate the process. Clueless, careless, or simply desperate users often give up and simply erase unused software, leaving a real mess behind. We pay good money for expensive and often obsolete software only to have it become the “living dead” when it’s updated, removed, or whacked by some other badly behaved software.

Solution: Open Source (free) software which doesn’t “install”. Remember when life was simple and all you had to do was to copy the executables and support files to your hard disk, and click on it to use it? No installation and no registry entries to get messed up. It doesn’t depend on anything outside of itself other than basic operating system services, and it won’t get tangled with your other software. If you don’t like what you’ve download, simply erase the whole directory. To update it, simply overwrite the old files with the new ones. And the updates, like the original, don’t cost you a dime. Want to share it with someone else or have it on another machine, simply copy the folder over to the new machine and you’re in business.

Why Open Source? First, it’s written by people who care and aren’t just out there to make a buck, and the code is out there for other people to find the bugs and improve it. It can either be designed to be to be “portable” as described above, or someone might be able to create a “portable” version of it.

And as a bonus, properly written portable software will run fine on any type of portable storage, such as a USB keychain drive, without changing the target machine it’s running on. Pull the stick out when you’re done, and nothing’s changed and no personal files are left behind.

Where to you find these jewels? The best source is portableapps.com. They’ve created portable versions of many different and popular Open Source programs, including heavyweight programs like Firefox, Thunderbird, and the OpenOffice alternative to the expensive and bloated Microsoft Office suite. Look also under “portable application” on Wikipedia for a list of other programs which were designed to be, or simply work, as portable apps.

I’ll report on some of these applications in the future.