Take Your Desktop Application to the Web in 15 Minutes

RedditFacebookTwitterGoogle+Hacker NewsLinkedInEmailPinterestShare

Any desktop application can be quickly turned into a secure Web server using standard, well-tested open-source components. While others have probably experimented with this technique, which requires only a conventional browser with no plugins, it apparently has never been documented publicly before. This article includes all the code you need for your own installation.

You have a crucial application that’s quietly done its job for years. Maybe it’s a game, played by tens of thousands of people around the world. Or it’s an oven control that ensures the crackers in one specific factory are perfectly crispy. Now someone wants—needs—that desktop (or tractor-top or command-center-top) application to run on the Web. ASAP. You’ve got a problem.

You’ve also got a solution. From our company’s experience, you can probably prototype a Web version of that application in 15 minutes.

Re-purpose Remoting

Seriously: We’ve done this over and over, with more successes than we frankly expected. You can, too.

First, understand clearly where we’re shining the spotlight. The original application might be on Windows NT, or even Windows 3.1; it could be ’80s-vintage Unix, or OpenVMS, MPE/iX, green-screen 3270, curses-based, or any of several more modern operating systems (OSs). At some point, someone probably invented “remoting” software for that platform, and you can likely re-purpose that remoting protocol to display within a Web page.

The value of a Web-based replacement for a desktop or “client-server” application is outside the scope of this article. There are plenty of good reasons to prefer Web applications, and at least a few badly confused ones are popular, too. What we prefer to do is move an organization beyond cycles of meetings and analysis on whether a Web application is feasible. We make it real, then leave to them the longer-term, strategic questions about what to do with it. Meanwhile, they have a working web app.

A 15-minute “Webification” isn’t necessarily ideal from an engineering standpoint. Expect it to lack polish in its security, coordination of concurrent users, or performance. To have some sort of Web-based application makes for a far better starting point, though, than just to speculate about whether a Web application is possible.

The Tools You Already Have

For common modern OSs—MacOS, all varieties of Linux, and any Windows from the last decade—a typical Webification demonstration involves the following:

  • The original, unchanged desktop application
  • A VNC server running on the desktop
  • A small auxiliary web server, and
  • A couple of pieces of web content served up by the latter.

The desktop application is what the organization has already. VNC (virtual network computing), for this purpose, is well-seasoned software that’s available both in no-charge and fee-supported versions for all the platforms of interest. Any web server will do in the auxiliary role, including any that might have already been established as organizational standards. Most simply, some of the VNC servers also supply web service.

Finally, the Web content is just enough to display a “click here for the Web form of the OOO application” hyperlink to a Java-coded VNC viewer. Several of the latter are available at no charge, and we’ve also written our own variations.

At that point, you’ve hit your target! With the pieces properly configured, you can go to any network-connected web browser, point to the right page, and select the hyperlink. You’ll see a copy of the original desktop, complete with a running copy of the application. Your remote mouse can control the application just as you normally would on a desktop, you can type characters where appropriate, and so on.

That’s how it goes in principle, and, as already mentioned above, surprisingly often in practice.

[caption id=”attachment_605″ align=”aligncenter” width=”500″ caption=”Screen shot of a Freecell game. The game was executed on a slow, old Windows Vista system. The display was “Webified,” though, so that it was visible through a Web browser on an even older Mac OS 10.4, where the human player made clicks and drags to play the game. In practice, this kind of Webification is most valuable for more proprietary legacy applications, including management of locomotive switching yards, point-of-sale operations, seaport facilities, and so on.”

webification example

There are limits to this approach, of course; the ones we most often encounter include:

  • Passage through network translation, proxies, and firewalls might demand another 15 minutes  of configuration, sometimes more. Firewalls have never defeated us in Webification, but sometimes they do require a little care and adjustment.
  • Cut-and-paste might not work as expected in the first implementation.
  • Performance sometimes is more-than-adequate, and sometimes unacceptable, at least initially. While we’ve always been able to configure our Webifications so that ultimate performance is good enough, it won’t be a surprise when we run into an application that simply doesn’t “remote” well.

We used to have issues with fonts and 3D applications, but those seem to have worked themselves out in recent years. It takes a little more effort to “productize” such a solution, often with attention to screen dimensions and how to restart the legacy application. The basic technology for this model of Webification is about 15 years old; it’s only in the last decade, though, that browsers’ JVMs (Java Virtual Machines) have been strong enough to make it practical.

You can do this! Start with an important legacy application, layer on a little VNC and Java, and enjoy what pops up in a Web browser. Help focus product meetings on real business issues rather than fantasies about what might or might not work. Show ‘em that Webification is real.


  1. fabrizio says:

    very interesting article!  
    (some background info) 
    I have been asked to convert, as part of a bigger project, some games. these games (slot machines of sort) are written in C, I have no access to source code, and I am in the process of rewriting them in Flash. (I’ve been a programmer, mostly VB of various flavors, for the last 15 years or so, but never worked with Flash). 
    In the meantime, I was thinking about a simple solution to “publish” some of the games I am rewriting, so the customer realizes I have not been idle while struggling with that perverse Flash thing.  
    some points I’d like to clarify: 
    -I have to webify just an application, not a whole desktop (I think VNC should take care of this) 
    -how many concurrent users can access the web page with the link to the application? just one? 
    -the part “Finally, the Web content is just enough to display a “click here for the Web form of the OOO application” hyperlink to a Java-coded VNC viewer.”  
    How do I implement it? some sample lines of code would be greatly appreciated. 

  2. For your first Flash experience to be a commercial game … Fabrizio, you are ambitious. If you ever decide to re-do any of your work in  
    HTML5, let me know how I can help. 
    The number of concurrent users with VNC is under your control, in a number of regards: first, most available VNC servers expose a choice between exactly-one and one-or-more as part of the built-in configuration. Moreover, VNC sources are readily available, and you can always go in and rewrite to customize the functionality. The best answer to “How many concurrent users …?” therefore is, “It’s up to you.”  
    Fabrizio, I’m unsure what source code you want to see. Did you follow the hyperlink to the VNC viewer applet?

  3. That’s cheating, we need to put a real app online.

  4. Is this supposed to be serious? Please.

    • Yes: yes, Abdul, this has been my real-world experience. As cheesy–as sub-optimal and mishapen–as we all see this passage-through-VNC to be, it’s helped me more than a handful of times already. I can understand it’s unlikely to be satisfying in the long term; I just want to make sure that more architects and programmers are aware of the possibility for the quick results this article describes.

  5. Very interesting article. Can you please show an example of the whole thing, including a parent page with a link that leads to the webified application (freecell is fine)?

    Also, there is some typo before ‘The game was executed on a slow, old Windows Vista system’. You may want to put the caption next to the picture.

    Thanks very much for the article.

  6. Natalie Euley says:

    Is there a way you can give a little more detail? I have never worked with servers much, except to edit a few php/js files, so I know very little about them. I hardly have a concept of what one actually is and does XD. But my boss wants me to execute a desktop program from our website, and he said something about using a command line. Is there a way you could give some code, some downloads, anything? Just a little more guidance than “throw these things in the pot and you’re done!”? Or is there some kind of Dummies tutorial I can get help from? Anything more than what you have provided is much appreciated.

  7. If you’re ok with using a Windows server, here’s an article that shows you how to do this in a vastly more performant way, and still free for two sessions.


Speak Your Mind