Advertisment

Unix Through Windows

author-image
PCQ Bureau
New Update

Are you a Windows user who frequently needs to work on Unix? Do you frequently restart

your PC in Windows and Unix? Did you know that you can access and run Unix apps directly

from your Windows desktop?

Advertisment

That’s right! You can work in a good old X Window terminal right alongside your

spreadsheet in Windows. If you have a Unix system on your network, you can make it

accessible to all your Windows users. No Unix installation hassles, no need to configure X

Window on individual machines.

You need a Unix machine running the X Window system on your network, and X Server

software for Windows. Several of these are available on the Net, free. We checked one of

them–MI/X (MicroImages X Server)–and have also put it on this month’s PCQ

CD in \cdrom\featured\mix. We used a Linux system for our experiment, though any Unix

system running X should do.

More about X

Advertisment

Before telling you how to install everything, let me step back a bit and explain the

working of the X Window system. Unlike the monolithic design of Windows, X is based on

client-server architecture. That is, X is split into X Client and X Server. These two

components are usually, but not always, on one

computer. Thus, the X Server can be on one computer and the X Client on another,

communicating with each other over a network.

In the conventional client/server architecture, each computer on the network is either

a client or a server. Servers are powerful computers that run services like file and

print, or other applications. Clients are the computers on the network that access the

services offered by the server. The architecture of X is different from this. In X,

clients are apps running on the Unix machine. The X Server, on the other hand, runs on a

computer on which you want the graphical output. These computers can be PCs, Macs, other

Unix machines and don’t require much in terms of computing power or resources.

X Servers are programs responsible for displaying the output of the X Clients,

which are nothing but various Unix-based X applications. X-Emacs, the powerful graphics

package GIMP, and Xterm are all examples of X Clients. These apps run on a Unix machine

and communicate with the concerned X Servers whenever they need to display their output.

That is, the clients don’t display their own output, instead they rely on X

Servers to do the job for them. The X Server could be running on your Windows machine and

displaying the output of various X Clients running on a Unix machine. However, don’t

forget that this server could also be running on the same system as the clients.

Advertisment

Imagine for a moment that you are playing Space Invaders in X. The game is the X Client

running on the Unix system. When it needs to display something, it sends a request to the

X Server running on your machine. The server processes this request and displays the

output of the game on your display. Every time you fire your laser by pressing the

spacebar, the server sends this keystroke back to the game for processing. You could have

an X Server for Mac and run your Unix apps on it. What happens is that the apps run

remotely on the Unix system, displaying their output on your machine’s X Server. The fun part

Okay, now that we’ve the concepts behind us, let’s get down to the

nitty-gritty of installation. First you need to install the X Server on your Windows

machine. Fire up the setup program for MI/X. Installation is easy, but the MI/X server is

not without its problems. It repeatedly crashed while running big Unix apps, like

WordPerfect and Netscape Navigator. However, it should

suffice for our purpose.

Once installation is over, start MI/X. Next, try pinging the Unix machine to see

whether it’s reachable over the network. If it is, telnet to the Unix machine by

giving the telnet command. The Windows telnet applet should

open up and present you with the login prompt. Once you have logged in, you should get the

Unix shell prompt. You’re now almost ready to run your X applications. But before

that, you need to tell the Unix system where to send the output of its X Clients.

Advertisment

To do this, you must set the DISPLAY environment variable to point to your Windows

machine. The X Clients send their output to the X Server pointed to by the DISPLAY

variable. From your telnet window, run the following commands: SIZE="2" COLOR="#f80080">

For Bash/Bourne shell users



export DISPLAY=’ address>:0.0’



For C Shell users



setenv DISPLAY ‘ address>:0.0’


To find out which shell you are using, type "set | grep –i shell"

Once you have set your DISPLAY variable, fire up

Xterm by giving the xterm& command at the shell prompt. You’ll see the Xterm

window open on your Windows’ desktop. Well, that’s it. Fire up GIMP or any of

your other favorite Unix apps through Xterm and make a few heads turn as you work on Unix

from your Windows’ desktop.

Advertisment