7. Having Cosmos Manage a Second Local Desktop on Your Local Unix Box by Using a Local VNC Server


On a Unix box running X-Windows, the traditional way to make use of software running on a remote server such as Cosmos is to run X Windows locally (in conjunction with a local window-manager) and have applications running on the remote machine display in individual windows on the local screen. Usually such applications are started by use of the command line within a telnet (or SSH) session, or an xterm.

One can arrange for Cosmos (or other remote X-server) to manage a local desktop on a MS Windows machine --- can one have Cosmos do the same on a local Unix box? Yes --- in two ways. One can either start the local X-server without a local window-manager and have Cosmos manage the local (main) deskop --- this would mean that you would not have access to your local GUI environment, so is not to be recommended --- or one can have Cosmos manage a second X-desktop which appears as one large window on the first (cf. using XFree86 to do this on a MS Windows box, above).

The upshot is that, menus, drag-and-drop and other GUI functionality will be available, just as if you were sat at the remote server's console. This is in addition to your own, local WIMP envionment --- see figure (click to enlarge). In particular one can have Cosmos manage a Gnome Session on your local X-desktop.


A Cosmos-managed, second local X-desktop (showing two xterms --- one local, one logged into Cosmos --- and xv displaying a picture) running running within a VNC viewer running in a large window on the first local X-desktop (on a Linux box).

The scenario illustrated in the figure was achieved by using VNC:

  1. Ensure that a VNC Server and VNC viewer are both installed on the local machine.

  2. Start the server, for example:
        prompt> vncserver -depth 16
    
        Warning: talby.csu.umist.ac.uk:1 is taken because of /tmp/.X11-unix/X1
        Remove this file if there is no X server talby.csu.umist.ac.uk:1
    
        Warning: talby.csu.umist.ac.uk:2 is taken because of /tmp/.X11-unix/X2
        Remove this file if there is no X server talby.csu.umist.ac.uk:2
    
        New 'X' desktop is talby.csu.umist.ac.uk:3
    
        Starting applications specified in /home/simonh/.vnc/xstartup
        Log file is /home/simonh/.vnc/talby.csu.umist.ac.uk:3.log
    
        prompt>
        
    N.B. The default depth is 8 bits which will deliver poor-looking graphics.

  3. Start the vncviewer:
        vncviewer talby.csu.umist.ac.uk:3
        
    A window corresponding to the new desktop (in this case, 3) should open and in this applications specified in the VNC xstartup file will appear (this is usually located in ~/.vnc/) --- these should include an xterm. Ensure the remote server (e.g., Cosmos) has permission to access your local X-desktop: within the xterm type xhost cosmos.umist.ac.uk.

    N.B. If your VNC xstartup file includes a window-manager (it probably will) you'll need to edit this out before starting the VNC viewer, or kill the window-manager after starting the viewer --- you cannot have two window-managers running on the same display.

  4. On the remote server (e.g., Cosmos), set the DISPLAY environment variable to correspond to this new desktop (in this case, talby.csu.umist.ac.uk:3) and start a graphical session --- here we start an xterm and TWM, a lightweight/minimal window-manager:
            cosmos> export DISPLAY=talby.csu.umist.ac.uk:3
            cosmos> /usr/openwin/bin/xterm &
            cosmos> /usr/openwin/bin/twm &
            
    Graphical functionality in this desktop, including menus, are now those for Cosmos.


...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_cosmeric/_accessing_cosmos/_reml_grp/index.reml
On: 5/7/2004 at 13:45:40
Options: reml2 -i noindex -l long -o html -p multiple