Because I include my autodmx.conf file, which is based of the autodmx.conf file included in the Chromium distribution. I include the license it is covered under.
I use Chromium to add OpenGL support to my Xdmx display wall. I thought I would post a few things I did to make it work. This is a copy of the autodmx.conf file that I used
# Copyright (c) 2001, Stanford University # All rights reserved # # See the file LICENSE.txt for information on redistributing this software. # # This configuration file is meant to be used with DMX. # When everything's set up correctly, you can just type type name of your # OpenGL app and Chromium will work automatically on your DMX display. # This is far nicer than manually starting crservers! # # Prerequisites: # 1. Your ~/.crconfigs file needs to be setup. Specifically, it needs a # line like this: # * /usr/local/Chromium/cr/mothership/configs/autodmx.conf %m %p # This tells Chromium's libcrfaker to use the autodmx.conf config file # when running any application (indicated by *). The %m is replaced by # a random mothership port. The %p is replaced by the program name. # # 2. libGL.so and libGL.so.1 must be symlink to libcrfaker.so # # 3. The back-end/cluster machines must have the crserver binary in the # search path (typically /usr/local/bin or /usr/bin) and a properly # set LD_LIBRARY_PATH (you can tweak it below). # # 4. rsh to the back-end/cluster machines must work. # # How it works: # 1. When the app starts, libcrfaker will fail to find the mothership on # its first try. That'll signal it to search the .crconfigs file for # a mothership config to spawn. libcrfaker will choose a random port # number for the mothership. # # 2. The mothership is spawned with autodmx.conf. In turn, it uses rsh # to start up the crservers on the back-end machines. Another random # port number is used for the crservers. # # 3. Control returns to libcrfaker where it proceeds to load the client-side # SPU chain (tilesort). Then, control returns to the application. # # Notes: # 1. We use random port numbers (within a reasonable range) so that multiple # GL apps can use DMX/Chromium simultaneously. If we don't use random # numbers we'd need some sort of port broker (complicated). # # 2. You will need to tweak 'crdir' here: # Change this line to the location of your Chromium installation. #crdir = "/home/sourceforge/Chromium-dmx/cr" #crdir = "/g/g16/ahern/work/Chromium/trunk/cr" crdir = "/opt/cr" import random import sys #from random import * sys.path.append( crdir + "/mothership/server" ) from mothership import * if len(sys.argv) < 3: print "Chromium mothership error: no program specified to run!" sys.exit(1) mothershipPort = int(sys.argv) program = sys.argv cr = CR() cr.MTU( 10*1024*1024 ) # Call dmx_config to get information about the DMX tile layout. import os dmx = os.popen("%s/dmx_config 2>/dev/null"%crbindir).read() if not dmx: print "Chromium mothership error: Chromium does not appear to have" print "Chromium mothership error: been compiled with DMX support." sys.exit(1) dmx = eval(dmx) if not dmx: print "Chromium mothership error: DMX does not appear to be running." sys.exit(1) localHostname = os.uname() # choose random port for server communication serverPort = random.randint(7000, 7100) AUTOSTART = 1 # These values don't really matter! TILE_WIDTH = 550 TILE_HEIGHT = 550 tilesortspu = SPU('tilesort') tilesortspu.Conf('use_dmx', 1) tilesortspu.Conf('retile_on_resize', 1) # the default tilesortspu.Conf('bucket_mode', 'Non-Uniform Grid') clientnode = CRApplicationNode( ) clientnode.SetApplication( program ) clientnode.AddSPU( tilesortspu ) clientnode.Conf('track_window_size', 1) clientnode.Conf('track_window_position', 1) itr=0 alpha=0 for tile in dmx: renderspu = SPU( 'render' ) host = tile['display'].split(':') dsp = tile['display'].split(':') renderspu.Conf('display_string', tile['display']) renderspu.Conf('render_to_app_window', 1) servernode = CRNetworkNode( host ) servernode.AddTile( 0, 0, tile['width'], tile['height']) servernode.AddSPU( renderspu ) # optimize_bucket is of no use w/ DMX. servernode.Conf('optimize_bucket', 0) servernode.Conf('use_dmx', 1) cr.AddNode( servernode ) if AUTOSTART: servernode.AutoStart( ["/usr/bin/ssh", host, "/bin/sh -c 'DISPLAY=:%s LD_LIBRARY_PATH=%s %s/crserver -mothership %s:%d'" % (dsp, crlibdir, crbindir, localHostname, mothershipPort) ] ) tilesortspu.AddServer( servernode, protocol='tcpip', port=serverPort+itr) itr=itr+1 cr.AddNode( clientnode ) cr.Go( mothershipPort )
I made two primary changes, first I altered the way the script got the value for DISPLAY used for servernode.AutoStart, this is because I have one server node that has two screens (0.0 and 0.1). The standard config file wouldn't work with grids for which some hosts had two screens on a display. My version should work for any type of DMX configuration (any number of screens on any number of hosts in any configurations). Secondly, I changed it so that it would use ssh rather than rsh.
I followed the instructions in the Chromium Documentation to setup auto-start and auto-config with Xdmx. One thing I had to do was set LD_PRELOAD to the symlink to my libcrfaker.so in order to get it to work with middle-ware packages. Just following the instructions got my Chromium installation working with programs that used libGL directly, but I had to setup LD_PRELOAD to get programs that used middlware (such as crystalspace and ogre) to work with Chromium.