Make Room for Linux Apps

As Linux applications grow in popularity, Windows admins will need to start incorporating them into their networks. Here are five ways to do that.

Linux desktops are gaining in popularity. While it's still not too common to see shops replacing Windows desktops with their Linux counterparts, there is certainly an increased desire to interoperate.

That collaboration takes many forms. You might need to exchange data, such as Microsoft Office documents, with someone using an alternative office productivity suite. Perhaps there's a compelling Linux application you want to run on your Windows desktop. Even if you don't want the application to run on your Windows desktop, you may at least want to run it alongside your Windows desktop.

There are multiple ways to run Linux apps; the five most common are presented here. In most cases, you won't need to deploy all of these strategies. But, depending on your needs, you might need to deploy one or more of them. Here's a rundown of some ways to get Linux applications to your Windows users:

  • Use apps that are built to run on both platforms
  • Run Unix tools and commands on Windows
  • Remotely connect to a Linux machine
  • Emulate a Linux environment
  • Emulate a whole machine and run Linux inside it

Method 1: Use Apps That Call Both Windows and Linux Home
What do you do when other business units or partners are running Linux and you need to exchange files with them? You could save the documents in a common format, like a text file, but the rich features inside the document would be gone. Better to use software that can properly exchange the files you need. On the Windows side of things, you'll usually want to create documents with Office and send them off to share. But Microsoft doesn't make a Linux version of Office, so if you're a Linux user you have to make some choices.

Linux users have two main office suites to choose from: OpenOffice and StarOffice. Both suites have basic compatibility with Microsoft Office, so they can read and write native document files coming from Microsoft Office. However, the key word here is basic. My testing shows serious formatting issues with moderately complex Word docs (like a resume) and moderately complex PowerPoint files. In other words, true file interoperability isn't quite there yet for serious use.

A better option is to simply run OpenOffice or StarOffice on your Windows clients and use the native file formats of these applications. That's right: both OpenOffice and StarOffice have Windows binaries and run just fine on Windows. This may not always be possible, as your company is likely already deeply entrenched in Microsoft Office and not likely to switch anytime soon.

OpenOffice and StarOffice aren't the only popular Linux applications that run under Windows. In fact, the Linux camp has made it very easy for Windows folks to check out a range of popular Linux software, which also happens to run on Windows. It's called the OpenCD Project.

The OpenCD comes as a standard ISO file which can then be burned directly as a CD-ROM by just about all CD burning software. Once you have the final CD in hand, you'll find a little something for everyone: productivity apps (like OpenOffice); design, painting and graphic manipulation apps (like TuxPaint and GIMP); networking, browsing and remote-control tools (like TightVNC and Firefox); multimedia and sound manipulation applications (like Audacity); utilities (like 7-zip); and games (like LBreakout).

In all, it's a potpourri of free stuff that runs on Linux and Windows and is guaranteed to properly exchange native file formats.

Method 2: Run Unix Tools and Commands on Windows
One great thing about Unix and Linux is the abundant availability of command-line tools, often through batch scripts. And, while there is some variance among the different forms of Linux (and a little bit more from Unix to Linux), pretty much all the base command-line tools and their options are the same. This means you can usually take a script that is working today in Mandrake and run it on Gentoo, Red Hat or SuSE.

It turns out that you can also run it on Windows with none, or very few, changes. The magic happens when you load one of two tools that can port the Linux command-line over to Windows. They are Cygwin (pronounced sig-win) and Microsoft's Services for Unix 3.5 (SFU). You can load either (or both, if you so choose) on Windows 2000 or Windows XP clients, or your servers.

SFU 3.5 uses the Korn shell, or ksh shell. While many Linux folks still call ksh home, the Bash shell, which Cygwin relies on, is getting more common among Linux power users.

In Figure 1, you can see both Cygwin and SFU 3.5 displaying man (manual) pages for the ls (list) command.

Figure 1. Cygwin, top, and SFU 3.5 have a similar command set. Here you can see them both displaying the man (manual) pages for the ls (list) command.
Figure 1. Cygwin, top, and SFU 3.5 have a similar command set. Here you can see them both displaying the man (manual) pages for the ls (list) command. (Click image to view larger version.)

Method 3: Remotely Connect to a Linux Machine
Just as you'd use Terminal Services to remotely control a machine in the Windows world, there are ways you can remotely control a Linux machine. The two main ones are VNC and X.

VNC is the closest cousin to Terminal Services. With both VNC and Terminal Services (which uses the RDP protocol), you're really seeing "screens" of information come across, and you can move the mouse and keyboard and have those sent along through the pipe as well. VNC is nice because a) it's free and b) additional services allow it to run on Linux, Windows, Mac and more, making it a great multiplatform remote control and remote computing solution. Because you're just sending over screen, keyboard and mouse information, VNC works with just about every Linux application, with one big exception—those using sound, which isn't supported in VNC yet.

The other way to remotely connect to a Linux machine is via "X". X is the original way to display graphics remotely from "over there" to "over here." The idea was simple: a computer "over there" with a lot of horsepower does all the heavy computing. The computer "over here" doesn't have to have a lot of horsepower; all it needs to do is actually output the display. Because of this, X terminology became a little wacky. The machine you're sitting at is the X server. The machine you're connecting to is called the X client. The client (the machine you're connecting to) is the one telling the server (the machine you're on) what to display. This separation of X server and X client made a lot of sense in the olden days, when buying a Unix machine with enough horsepower to perform both X client and X server functions was very expensive.

But today, buying a PC with enough horsepower isn't beyond most peoples' budgets. That allows the client and server to run on the same machine. The X client can be running "over there" but you can be "over here." To that end, if you can run an X server on your Windows machine "over here," you'll be able to connect to machines "over there." This is handy for apps that have both client and server components.

Microsoft has partnered with StartNet Communications to offer a free version of X server. The constraint with this version, however, is that it only works if the X client application you want to use is on the same box. Cygwin, discussed earlier, also has add-on X server compatibility, and no restrictions as to where the X client is running.

Method 4: Emulate a Linux Environment
One way to get Windows machines to run Linux is to feed it a bunch of Windows executables that simply run Linux. That's the idea behind coLinux.

CoLinux (short for "Cooperative Linux") is a cleverly modified Linux kernel that runs as a Windows application. Once it's running, it produces a display like the one in Figure 2, below. The advantage here is that once coLinux is running, you can use basically any Linux program you like.

Figure 2. CoLinux is an implementation of Linux that runs right within Windows.
Figure 2. CoLinux is an implementation of Linux that runs right within Windows. (Click image to view larger version.)

The drawbacks are that coLinux is fairly clunky to set up, and it's limited to only two specific Linux distributions: Debian or Gentoo. If your application doesn't play well with either of these Linux distributions, coLinux probably isn't a good candidate for you.

CoLinux is an interesting piece of software. By default, it runs GUI-less, but it's possible for coLinux to successfully run a full GUI environment. It also has fairly good networking support, allowing you to use the network card already inside your machine. It also has several tricks up its sleeve, like accessing the C:\ drive of the host machine to pass files back and forth between Windows and coLinux. CoLinux is well worth a look if you need to run the occasional Linux application.

Method 5: Emulate a Whole Machine and Run Linux Inside It
The best way to maintain a true Linux environment inside your Windows machine is to emulate an entire machine, then run Linux inside it. That's how VMware Workstation, VMware's GSX and ESX servers and Microsoft's Virtual PC and Virtual Server work. In Figure 3 (opposite page), VMware Workstation 5.0 is booting up Fedora Core 3 as a guest.

With Virtual Server 2005 SP1 (currently in beta), Microsoft will support Linux guest machines when the host machine runs Virtual Server 2005. While that might help you in the lab with application compatibility testing, it won't help your users directly. That is, Virtual Server 2005 only runs on Windows 2003—and it's unlikely your desktop or laptop users have Windows 2003.

Loading a Linux guest inside Virtual PC 2004 will work, but be aware that it's not supported. And unfortunately, Microsoft's latest announcement about Virtual Server 2005 with SP1 doesn't apply to Virtual PC 2004. So if you're considering running a virtualized Linux guest under Windows, VMware Workstation is really the best choice.

Figure 3. VMware Workstation can run many Linux distributions as a guest within  Windows; in this case, it's running Fedora Core 3.
Figure 3. VMware Workstation can run many Linux distributions as a guest within Windows; in this case, it's running Fedora Core 3. (Click image to view larger version.)

Finding Harmony
You never know when you'll need to start running Linux applications. Sometimes it's easy—just find an application that also runs on Windows, and you're in business. Sometimes, getting there is a bit harder—you'll have to find a way to run that Linux application remotely, or bring that Linux application to you.

However, one thing's for certain: Linux is here to stay, and it's a good thing there are options for Windows and Linux to play nicely together.

comments powered by Disqus

Reader Comments:

Fri, Mar 18, 2011 sjauxeyqufe syfMIe aydsnmqlqbce, [url=]rdisfjapbjdr[/url], [link=]eumpswpmzhgq[/link],

syfMIe DOT , [url=]rdisfjapbjdr[/url], [link=]eumpswpmzhgq[/link],

Mon, Nov 10, 2008 Anonymous Anonymous

m0UbVD hi mebmasters

Tue, Jan 16, 2007 Steven NYC

Enjoyed a lot!

Tue, Dec 12, 2006 bulshit bulshit

I ran coLinux while was at work for 40-50 minutes - it is easy and it is even with NTWRK suppot.All you have todo is toshare the internet connection of your lan card to the virtual one.

Wed, Nov 9, 2005 mellah Algerie

je veut que vous menvoyer un cd

Fri, Aug 26, 2005 dabooch Anonymous

Probably worth a mention of Xen ( as an open source VMWare/Virtual PC alternative to watch. Understood that it doesn't run Windows right now -- but the chip makers are only months from providing the necessary hardware virtualization to allow it to run Windows unmodified -- and based on all the studies I've seen, it's FAST compared to VMWare/Virtual PC.

I'm sure I'm dreaming, because Xen is too strong a competitor to Virtual PC ... but it would be nice to see Redmond support it, in the same sense they do VMWare.

Mon, Aug 22, 2005 Jeremy Moskowitz Anonymous

Thanks for the nice comments, everyone. Simon, I do mention cygwin's X implementation in the article, specifically. But, it's good to emphasise it here. Thanks !

Mon, Aug 22, 2005 Simon Kellett Anonymous

Instead of the "StartNet Communications" X server you can use the open/free xcygwin that does not have any networking restrictions.

Mon, Aug 15, 2005 Igor Serbia

There are two more methods not mentioned in the article:

1. Use Linux from Live CD


2. Create partition for Linux, install it and dual-boot between Windows and Linux when needed

Anyway, after we get dual-core CPUs with Vanderpool virtualization in Q1 2006 (can't remember AMD's code name for that) it will be a lot easier and faster for two or more OS-es to coexist and cooperate.

CoLinux + Gentoo is very good thing to have. Gentoo is IMO the best Linux distro out there at the moment. Not easy to install but certainly worth the effort.

Fri, Jul 29, 2005 mike San Diego

I have found that running XP in VMWare on Ubuntu Linux to be a better solution than running Linux on windows. Linux is a better place to get your email and to surf the web. I'm never afraid of getting a worn, adware or a virus when running this way. I can also protect XP using the much better firewall provided in Linux when I'm attached to a (wireless) network with unknown security. I can also replacate virtual copies of XP to perform tasks that might be suspect. I can also create vertial Linux environments for the same reason.

All in all, it makes more since to protect the more sensitive OS inside the virtual environment. The cost is the same.

The only problem that I have found with this is connecting to USB disks formatted using NTFS. The Linux drivers will only connect to them read only. FAT or FAT32 USB devices work fine. This includes most memory sticks.

VMWare is a fine product. I recomend it highly.


Fri, Jul 29, 2005 Mark Felt Eugene, Oregon, USA

As a person who did method 4, 'Emulate a Linux Environment', I agree with Jeremy's statement that it's 'clunky' to setup, but I did pick it (method 4) over method 5 for one reason, speed.

My system is coLinux with Gentoo. coLinux is basically a modified Linux kernel where VirtualPC emulates a PC at the 'bare metal' level (BIOS start up and all). In speed terms, coLinux does better as it doesn't have to emulate everything in a PC. Also, coLinux doesn't suffer from VirtualPC main problem, clock skew, where the time on the emulated system gets further and further out of sync with the time on the main system (this is because VirtualPC is emulating the clock itself instead of using the main system's clock.)

For Gentoo, the speed advantage is that the entire system can be configured to use the features of your processer rather than using a generic processor level defined by the distribution (and you can tell Gentoo to leave out certain features you'll never use.)

But: As the article states, coLinux & Gentoo are currently 'clunky' to setup, I had to dig through a number of instructional pages on different websites to setup my system correctly (for more details on setting up a system like mine, email me). If you are looking to get started quickly with Linux under Windows, I'd recommmend the VirtualPC & major route.

And on a final note, if Microsoft ever does get into Linux, I'd like them to get into coLinux & Gentoo. They could use the guys from the SFU team to support the coLinux & Gentoo projects (where they, Microsoft, would be 'downstream' of such projects).

Fri, Jul 29, 2005 Anonymous Anonymous

Good article. Two points:

1) OpenOffice has improved its interoperability with MS Office a lot with the latest beta versions. Once OO 2.0 is finally released, it's likely to be an excellent contender for MS Office interoperability.

2) You might also like to consider QEmu as an alternative to Virtual PC et al. It works very well, and although I think (I have not tested it under Windoes) that it might be a little more difficult to set up, it will be worth it. Plus is free (both beer and speech).

Add Your Comment Now:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Please type the letters/numbers you see above

Redmond Tech Watch

Sign up for our newsletter.

I agree to this site's Privacy Policy.