Running Linux software on your OS/2 system via Xfree86/OS2

From EDM2
Jump to: navigation, search

By Darrell Spice Jr.

Please note that this is an article originally written in 2000 that has been re-published here under the Attribution-Share Alike 3.0 licence with permission from the author, it has not been changed since its original publication and will therefore contain outdated references and information.

XWindows and OS/2

Overview

I've started experimenting with XFree86/OS2 to provide an X Window System environment under OS/2. I've also been experimenting with a Linux box. One of the features of XWindows is the ability for a program's output (and keyboard/mouse input) to be handled by a system other than the one executing the program. I have Civilization:Call To Power installed on my Linux box. It's currently limited to a 640x480 screen (it's an old 14" fixed-frequency monitor). By using XWindows, I'm able to run Civilization on the OS/2 system where the display uses a 1280x1024 screen(on the new 19" Sony). I can even run XWindows programs under OS/2 where the display is the Linux box(the XFree86/OS2 site links quite a few XWindows executables that run under OS/2).

My Systems
Name OS IP
Ruth OS/2 Warp 4.0 192.168.0.10
Smaug Red Hat Linux 6.2 192.168.0.111
Spyro (Thinkpad) Win98, OS/2, Red Hat Linux 6.2 192.168.0.2

I've a rather large dragon collection, and as such decided to name my systems after dragons. Smaug is from The Hobbit, Ruth is from The Dragon Riders of Pern, and Spyro is from the Playstation game that forced me to purchase a Playstation :-)

I've updated the hostname tables on all systems so that I can use ping ruth instead of ping 192.168.0.10.

Assumptions About You

  • OS/2 system
  • Linux system (separate boxes, a dual booting system won't work for this)
  • Systems are networked
  • XFree86/OS2 has been installed and works

Setup

You'll need to have telnet, and telnetd (the daemon) running on both systems. My Linux system installed both and telnetd was already enabled. The OS/2 system also has them installed, but it needs to have telnetd configured. Also telnet will not run under XFree86/OS2. You can still use telnet by switching to the PM, or you can install an XWindows compatible telnet such as X3270. To configure OS/2's telnetd do the following:

  1. go to System Setup(right-click on your desktop)
  2. run TCP/IP Configuration
  3. select the Autostart tab
  4. Select telnetd
  5. enable Autostart Service
  6. Select the Security tab
  7. Enter a password for telnet access(you'll need to reboot - it's stored in config.sys for some odd reason)

Next you'll need to tell XWindows that it's OK to show output from other systems. You can do this by using the xhost command while running XWindows. On Ruth use the command xhost +smaug to allow Smaug to display windows on Ruth. On Smaug use xhost +ruth. The only problem with this is that you have to enter this command every time you start up XWindows. The best thing to do is to create a file on all systems which contains a list of valid hosts. The file is called X0.hosts (that's X followed by the number zero). The files on my systems contain the following three lines:

inet:smaug
inet:ruth
inet:spyro
Location of X0.hosts
System path
OS/2 d:\XFree86\lib\X11\X0.hosts
Linux /etc/X0.hosts

Usage

Linux XWindows software Displayed on OS/2

This is probably the most useful as, after all, the XWindows software that's compiled as an OS/2 executable is already available for Linux.

  1. Start up XFree86/OS2 using startx
  2. enter the command xhost to confirm that the Linux system is authorized. If it's not listed, then your X0.hosts file may not be correct, or be in the wrong location. Either fix it, or use the command xhost +smaug for temporary authorization.
  3. telnet to the Linux system, either by changing back to the WPS, or by running an XWindows compatible telnet program such as X3270.(hint - run X3270 by entering the command start x3270. This starts x3270 as a separate process and does not tie up your command prompt. If you just use x3270, your command prompt will be disabled until you quit X3270.)
  4. log onto the Linux system with a valid user ID and password. You should not use your root ID(it's probably disabled for remote login anyway).
  5. enter the command export DISPLAY=RUTH:0 (replacing RUTH with your own system name or IP address). This command is what tells XWindows to open the window on another system
  6. run a XWindows based program(such as same-gnome).

OS/2 XWindows software Displayed on Linux

  1. If you're not already in XWindows, start it up using startx
  2. start a XTerm session
  3. enter the command xhosts to confirm that the OS/2 system is authorized. If it's not listed, then your X0.hosts file may not be correct, or be in the wrong location. Either fix it, or use the command xhost +ruth for temporary authorization.
  4. Telnet to the OS/2 system. As OS/2 is single user there is no user ID, just the password you choose during while configuring TCP/IP.
  5. enter the command set DISPLAY=SMAUG:0. The command is slightly different than what you used while telnetted into the Linux box.
  6. run a XWindows based program.