Wednesday, February 16, 2011

Synergy : Control multiple computers with one keyboard and mouse

For years, it has been possible to control multiple computers with a single screen, keyboard, and mouse, using a hardware device known as a KVM (Keyboard, Video, Mouse switch).  A KVM switch is a great geek tool in itself, and is a wonderful option if you A) want to buy a piece of hardware, or B) only own one monitor.  The crappy thing about a KVM is that they all claim to work flawlessly with any type of keyboard/mouse combo (yet never do,) and you can only view one desktop at a time on your single monitor.  Most require either tapping a button on the switch itself or hitting a keystroke combination (like scroll lock twice) to switch between computers.  (Mac people, you may notice there's no scroll lock key on your keyboard...)

Enter Synergy-- a free, open-source tool that allows you to use one keyboard and mouse to control multiple computers (Mac, PC, Linux/Unix) on multiple monitors, as though they were seamlessly connected.

Sounds cool, you say, but how exactly does it work?


Requirements
Synergy requires that all computers to be controlled together be on the same local network, i.e. they are all plugged into the same switch or on the same wireless network-- since Synergy sends keyboard and mouse commands over a regular old TCP connection.  (My suggestion is to opt for a wired connection to avoid latency.  A small difference, but a notable difference at times.)  Synergy is installed on all computers that will be part of the group-- including the one with the keyboard and mouse attached, and those without.  The computer with the main keyboard and mouse is the "server," and the other machines are "clients," that receive keyboard and mouse commands (from you) over the network. 
Once Synergy is installed and all computers are talking to one another, the magic happens.

What it Does
As previously mentioned, Synergy allows you to control several computers on several screens, with one keyboard and monitor.  When you move your mouse off the left hand side of your main screen, it pops onto the right hand side of the next monitor, and voila-- you are controlling the next computer.  No pressing of buttons, no key combinations, and you can see what is going on with all computers at once.  The added bonus is that your clipboard contents (i.e. what you are copying and pasting) comes with you as you switch from computer to computer.  So in other words, I can copy the body of an e-mail on my PC, and paste it on my Mac.  Spiffy.

Limitations
The most surprising thing about Synergy is how well it works-- so long as your network connectivity is up, it works like a champ.  (Keep in mind, your internet connection is not required here, just the local network connection between machines.)  The synchronization of clipboard contents can be a bit delayed if you are copying a large body of information, but generally just takes a few seconds
By far the least savory part of using Synergy is just the initial setup.  The Mac version requires a little command line work and super user access.  However, if you know where the Terminal app is located and have used it before, the actual setup is really not that difficult.  Configuring the Mac version is a matter of editing the "synergy.conf" text file.  The config itself is relatively straightforward, but again, it's not something I could describe to my grandma.

Fortunately for most, the setup for the Windows version has a UI that is a bit more straightforward.  I won't get into the particulars here, but fortunately the Synergy folks did-- there is a nice Youtorial-based tutorial to help you through the process, regardless of what OS you are using.  Similarly, automatically starting Synergy on login or startup is relatively straightforward in the Windows version, and a bit more confuddled in the Mac or Unix versions.

If you are that guy with 2 computers and a laptop on your desk, and are looking to quit spinning around in your chair, switching between keyboards, definitely give Synergy a try!

http://synergy-foss.org/

Saturday, February 12, 2011

VMWare Server : Free Virtualization Solution

Another favorite tool of mine, VMWare Server is not new, (the current version, v2.0.2 was released over a year ago) but is a killer option for running multiple operating systems on one system (even simultaneously) for testing or development purposes.

What does it do?
If you aren't familiar with Virtualization, the basic concept is that your "host" machine can use VMWare Server to simulate one or more "guest" operating systems, which stay entirely separate from your current system.  In other words, it's like running "another computer" in a window. 



Applications for Virtualization (Why do I care?)
Why exactly would this be helpful, you might ask?  If you are a web developer, a software tester, or just your run-of-the-mill geek, the ability to host multiple operating systems can let you keep a bevy of browsers at your immediate disposal, or simulate the interaction between separate client and server machines.  Running Windows 7 but wondering what your web site looks like in FireFox 3 in XP?  Fire up your XP VM and find out.  If you need to try your desktop application on various operating systems (Windows XP, Vista, 7, even various Unix/Linuxes), virtualization is where it's at.  You can start with a clean installation of each OS, and take a "snapshot" of the virtual machine before making any changes.  You can install your desktop application, change settings, alter registry settings or otherwise mangle your VM, and roll back to that snapshot at any time.  Awesome!

Virtualization of Data
For a more advanced example, virtualization is an essential tool when performing automated software testing, or developing data-intensive applications.  Like the example above where we destroyed a clean installation of Windows (and then revived it,) we can do the exact same thing with a database server.  (A complete set of data needed for testing is often referred to as a "Golden Database.")  This allows us to minimize data setup time and avoid corruption or data integrity errors when developing or testing on less-than-perfect code.  When using an automated software testing tool (like HP QuickTest Pro, SmartBear TestComplete, or free and open-source Selenium,) consistent test data is essential for achieving reliable automated test results.

Portability
Finally, virtual machines are far more portable than installing test or development systems directly on actual hardware.  It's easy to copy a VM to another machine, or even to host it on the cloud to boot it up from anywhere at any time.

Requirements
As you could probably imagine, VMWare Server (and Virtualization in general) requires some serious hardware... or at least performs significantly better given more resources to do so.  The host machine I use for Virtualization tasks runs VMWare Server under Windows 7 Ultimate (64-bit) and has 8 gigs of RAM.  I can easily run 2-3 VMs at a time on this setup, but this does vary with the task at hand.
Though the added RAM is vital, when running multiple VMs, the bottleneck is often in disk read performance, so running separate hard drives per system, a RAID setup, or even just an SSD drive, can improve performance significantly.  With the 8gb at my disposal, disk contention is the bottleneck when running multiple VMs simultaneously.

Alternatives and Upgrades 
While we've spent most of our time talking about the advantages of Virtualization in general, there are a few different ways to go about implementing it-- only one of which is VMWare Server.  VMWare Server allows you to manage multiple Virtual Machines on your computer, boot them up, pause them, shut them down, let them interact with each other, and manage snapshots.  However, there are a few limitations-- it is free for non-commercial use, it limits you to one snapshot per Virtual Machine, requires a "host" operating system for use (thereby taking a bit of a performance hit), and is not intended for use for production systems.  

VMWare Player is a simplified variant of the VMWare solution, intended for those users that would only need to make use of a VM without added complexity.

VMWare Workstation, on the other hand, is the more powerful (paid-for) end-user solution-- you can read more about it here.

VMWare's main competitor is Microsoft Virtualization-- and a quick visit to their site shows that they are intently aware of that fact.  As always, the degree to which you'll love the Microsoft alternative is directly proportionate to how committed you are to drinking the Microsoft kool-aid.

But for me, the flexibility, shallow learning curve, and free-ness of VMWare Server wins my vote.  Give it a shot!


Footnote:
Various free operating systems:
Fedora (a la RedHat Linux)

Friday, February 11, 2011

First Post... phpBB : Free and Open Source Web Forum!

Hello, World!
I'd like to start off the blog with a good one-- and this one is so good that it amazes me that it's actually free.

What is it?
phpBB is easily my favorite web forum software-- it's free, it's GPL open source, it's well-adopted, feature-rich, easily customizable, and pretty straightforward to install. phpBB is the most widely used open source bulletin board system on Earth, and for good reason.



Hosting and Install
Unlike some other forum systems, phpBB does not offer a SaaS model, but will point you in the direction of several web hosting platforms that cater to those that want simple installation and maintenance for their phpBB forum.

If you choose to go the route of downloading and installing phpBB, any LAMP host will do, as will a Windows/MS SQL or Oracle setup.  I run a phpBB forum on GoDaddy, and it probably took me a grand total of 15 minutes to go from zero to live forum.  phpBB uses a web-based interface for initial setup-- and the process is even smoother than it was a few revisions ago.  Just upload the /phpBB folder to your web site, visit /phpBB/install -- and you're off and running.  For me, the only difficult part was configuring the outgoing mail settings (for member notifications and such)-- but that was mostly due to the fact that GoDaddy tends not to publish this information so readily as I'd recommend. (See footnotes.)

Control Panel
The control panel interface is well-organized and bears just about every feature you'd need when managing a forum-- though the option to monetize your forum through sponsor ads or Google AdSense (or otherwise add static content) is curiously absent.  (A trip to the /phpBB/cache folder reveals a series of template files where you could add this type of information, if desired.)  There are a ton of templates hosted within phpBB's Styles section to choose from-- or of course you have the option to roll your own to fit your existing site's style.

Alternatives, anyone?
One major alternative to phpBB is vBulliten, which is a bit more feature-rich and commercialization-friendly.  A forum license for vBulliten will run you $195, a year of support $80.  The main benefits of vBulliten over phpBB include actual paid support and the option for a built-in Content Management System and Blog-- the latter two available only with the $285 Publishing Package.

As for me, zero dollars for a fully-featured web forum is the clear winner.  Give phpBB v3.0.8 a shot, and let me know what you think.


Footnote:
For those using GoDaddy that want to take notes on the outgoing e-mail settings:
Use SMTP server for e-mail : Yes
SMTP server address : relay-hosting.secureserver.net
SMTP server port : 25
Authentication : Plain
SMTP username : yourusername@yourdomain.com
SMTP password : [blank]