Headless desktop

From Nekochan
Revision as of 15:44, 10 September 2008 by Vp (Talk | contribs) (Step 2: Connecting from your Desktop)

Jump to: navigation, search

As SGI hardware ages you are less and less likely to want to run your systems with the original graphics hardware especially if that hardware is only 8-bit. This page will demonstrate how to get the most out of your SGI by running a full X session from another, better equipped, workstation. I'm using a SGI Indy as my example but most of this will apply to any class of older SGI computer with only minor variations in the setup.

Step 1: Setting up the Indy

The first step is to make sure your SGI computer is ready to be run headless without any startup issues. Generally this means making sure the PROM is configured so that it will boot without a keyboard and without a graphics console. The two variables you want to check are console and nogfxkbd. First get a serial cable [mini-din to 9/25 pin], this is a must if you want to be able to get at the PROM without having to reattach a monitor. A stock Indy will probably stop at the PROM if you try to boot without a keyboard attached. So even if you do not have the right monitor you can get everything set up with just a serial cable. Use your favorite terminal emulator [I use minicom from both Linux and Mac OS X, on Windows I have SecureCRT] to open the PROM when the Indy is booting generally pressing "ESC" is all that is required, or if you do not have a keyboard plugged in you will probably find the console already waiting at the PROM manager. Press 5 to [Select Command Monitor], type "printenv" to print out all the current settings. Use "setenv -p console d" to set the default console to the first serial port, use "setenv -p nogfxkbd 1" to tell the PROM not to worry about not having a keyboard. Type "init" to reset the PROM and let the Indy boot normally.

Next you want to make a small change to how Xsessions are handled so you can get the best experience from your headless computer. You want to edit the file /var/X11/xdm/xdm-config and make 2 changes.

 #DisplayManager*startup:                /var/X11/xdm/Xstartup-remote
 DisplayManager*startup:                 /var/X11/xdm/Xstartup
 #DisplayManager*session:                /var/X11/xdm/Xsession-remote
 DisplayManager*session:                 /var/X11/xdm/Xsession

Comment out, like I did here, the original startup and session lines and add the edited version. All you are doing is telling xdm not to handle remote logins differently than local logins. I also added one extra line to my xdm-config which was:

 DisplayManager.randomFile:              /dev/random

Only because by default it uses /dev/mem and I got errors in /var/adm/SYSLOG that it was unable to read from /dev/mem. HOWEVER make sure you have /dev/random if you do this! My Irix 6.5.22m does have this so this works for me.

You need to restart XDM by doing "/etc/init.d/xdm stop; /etc/init.d/xdm start" also be sure that xdm is setup to start on boot which it really should be but it is easy to check, just type "chkconfig | grep xdm" and make sure it says on.

Step 2: Connecting from your Desktop

This requires that you are running some sort of X Window server. Any Unix will have this, although with Mac OS X you have to install Xcode. Windows will require additional software like Cygwin, Exceed, Xming, etc. I cover the basics for each.

Linux

You have 2 choices: if you want to run the desktop as a window inside your existing desktop then you want to use Xnest, if you want an entire stand alone desktop then you want to use the power of virtual consoles.

Xnest

First you must already have a GUI running locally. Type "xhost +<IP of Indy>" to bless X traffic from the Indy, then type "Xnest :1 -query <IP of Indy>". Assuming everything is set up correctly you will get a GUI window with the Login prompt, and once you login you will get your Irix desktop. The :1 <- of this solution tells Linux which console to attach to, you can have up to 7 of these I believe.

Full Desktop

Do the "xhost +<IP of Indy>" to bless X traffic, then type "X :1 -query <IP of Indy>". Your screen will flicker to black as it changes consoles and attaches to Indy. Login and you have your IRIX desktop. By default F7 is console :0 your Linux desktop and :1 should be F8. You can switch between them by pressing Ctrl-Alt-F8 or Ctrl-Alt-F7, it is possible that the console attached to F9 so check that if seem to have lost your session. As with Xnest the :1 is the a console to attach to and you can have more than one.

Mac OS X

Assuming you have Xcode installed you have the same 2 choices as Linux except that Mac OS X does not have "virtual consoles", instead you get an application window called Xquartz for each X session you run. You can still have more then one and you invoke them exactly the same way you do under Linux. But instead of the CTRL-Alt-F# you just click on the Xquartz session you want to use or click on the Finder to get back to normal.

Quick overview. Start X11, the Installer puts X11.app into /Applications/Utilities, find it and double click on it. Once it is running you should have an Xterm in which to type, from there just type "Xnest :1 -query <IP of Indy>" or "X :1 -query <IP of Indy>" either will startup a Irix desktop session for you. Again you can have more then one simple use the next console via :2 or :3. You may want to start an Xterm for each session so you can kill them with Ctrl-C. Or place them in the background and grep the PID so you can send "kill -TERM <PID>" to shut them down.

Windows

Windows does not ship with the tools you need to do this so you have to decide which 3rd party software you want to use. Cygwin/X is the the most obvious free choice. It gives you a very complete Unix like environment which you can use much like the examples above. This is the software we will use as an example in this section. Other options include X-Deep/32, Exceed and Xming.

You begin by installing the Cygwin package from http://www.cygwin.com, it will prompt you to download packages from the internet. The only packages you will need belong to the xorg tree. Select xorg base and xorg nest, all of the dependencies for both of those pacakges will be automatically downloaded. Finish the install and proceed.

Fire up Cygwin and type "xwin -query <IP of Indy>"

At this point, if you followed all of the instructions correctly, you should be prompted with a login screen for your IRIX box.

End Notes

Using these methods I get a full 1280x1024/24-bit desktop from my old Indy with no visible delays in redrawing or moving. This is way more than the 8-bit video card could ever give me. It allows me to enjoy most of the benefits of IRIX without having yet another keyboard/mouse/monitor setup. I use the same solutions with my Sparc 20 and Ultra 5 hardware and anyone who has every had to run older Sun video cards can understand how having some modern hardware handling the video is a huge blessing.

Links