- Multiple meta screens on one monitor

Troubleshooting and support
Virtual window manager

Show version changes

# Multiple meta screens on one monitor

Most of the example configurations combine multiple screens to a contiguous meta screen. However, the XmetaX proxy may also display multiple meta screens on one monitor.

This example does not use one single configuration file, but each meta screen and screen is configured by its own configuration file. Thus, a certain screen configuration file can be used in three ways:

Definition of a screen of the initial XmetaX configuration,

Later definition of an additional screen during runtime,

Modification of the screen configuration.

Four meta screens have to be displayed on one monitor. The meta screens are exactly as large as the monitor and arranged in a 2×2 matrix:

    # /etc/opt/XSOXmetaX/meta0
    metaScreen meta0
    width 1278 height 1022

    # /etc/opt/XSOXmetaX/meta1
    metaScreen meta1
    width 1278 height 1022
    eastOf meta0

    # /etc/opt/XSOXmetaX/meta2
    metaScreen meta2
    width 1278 height 1022
    southOf meta0

    # /etc/opt/XSOXmetaX/meta3
    metaScreen meta3
    width 1278 height 1022
    southOf meta1

A meta screen can be in one of three states, which are expressed through the configuration of the associated screen.

Fullscreen means that the meta screen covers the whole display area:

    # /etc/opt/XSOXmetaX/fullscreen0
    /etc/opt/XSOXmetaX/meta0
    window fullscreenPanning0 display :1.0
    ofMetaScreen meta0
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 1278 displayHeight 1022
    displayX 0 displayY 0
    borderWidth 0

    # /etc/opt/XSOXmetaX/fullscreen1
    /etc/opt/XSOXmetaX/meta1
    window fullscreenPanning1 display :1.0
    ofMetaScreen meta1
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 1278 displayHeight 1022
    displayX 0 displayY 0
    borderWidth 0

    # /etc/opt/XSOXmetaX/fullscreen2
    /etc/opt/XSOXmetaX/meta2
    window fullscreenPanning2 display :1.0
    ofMetaScreen meta2
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 1278 displayHeight 1022
    displayX 0 displayY 0
    borderWidth 0

    # /etc/opt/XSOXmetaX/fullscreen3
    /etc/opt/XSOXmetaX/meta3
    window fullscreenPanning3 display :1.0
    ofMetaScreen meta3
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 1278 displayHeight 1022
    displayX 0 displayY 0
    borderWidth 0

Each configuration file includes the definition of the associated meta screen (Configuration file).

In the case of a panning meta screen only a part of the meta screen is displayed in the corresponding quadrant of the monitor:

    # /etc/opt/XSOXmetaX/panning0
    /etc/opt/XSOXmetaX/meta0
    window fullscreenPanning0 display :1.0
    ofMetaScreen meta0
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    displayX 4 displayY 4
    borderWidth 4
    followPointerX 16 followPointerRestrict control

    # /etc/opt/XSOXmetaX/panning1
    /etc/opt/XSOXmetaX/meta1
    window fullscreenPanning1 display :1.0
    ofMetaScreen meta1
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    displayX 644 displayY 4
    borderWidth 4
    followPointerX 16 followPointerRestrict control

    # /etc/opt/XSOXmetaX/panning2
    /etc/opt/XSOXmetaX/meta2
    window fullscreenPanning2 display :1.0
    ofMetaScreen meta2
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    displayX 4 displayY 516
    borderWidth 4
    followPointerX 16 followPointerRestrict control

    # /etc/opt/XSOXmetaX/panning3
    /etc/opt/XSOXmetaX/meta3
    window fullscreenPanning3 display :1.0
    ofMetaScreen meta3
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    displayX 644 displayY 516
    borderWidth 4
    followPointerX 16 followPointerRestrict control

These configurations differ from the fullscreen configurations in the screen border (Border width of a screen), in the dimensions and positions of the screen on the corresponding quadrant of the monitor (Dimensions of a screen), and in the dynamic position of the displayed part of the meta screen (Dynamic position of a screen). The same window type screen is used for both the fullscreen and the panning display.

A zoomed meta screen is totally displayed, but scaled down to fit into the corresponding quadrant of the monitor (Zooming a screen):

    # /etc/opt/XSOXmetaX/zoomed0
    /etc/opt/XSOXmetaX/meta0
    window zoomed0 display :1.0
    ofMetaScreen meta0
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    clipWidth 1278 clipHeight 1022
    minimumTextSize 9
    displayX 4 displayY 4
    borderWidth 4

    # /etc/opt/XSOXmetaX/zoomed1
    /etc/opt/XSOXmetaX/meta1
    window zoomed1 display :1.0
    ofMetaScreen meta1
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    clipWidth 1278 clipHeight 1022
    minimumTextSize 9
    displayX 644 displayY 4
    borderWidth 4

    # /etc/opt/XSOXmetaX/zoomed2
    /etc/opt/XSOXmetaX/meta2
    window zoomed2 display :1.0
    ofMetaScreen meta2
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    clipWidth 1278 clipHeight 1022
    minimumTextSize 9
    displayX 4 displayY 516
    borderWidth 4

    # /etc/opt/XSOXmetaX/zoomed3
    /etc/opt/XSOXmetaX/meta3
    window zoomed3 display :1.0
    ofMetaScreen meta3
    clipX 0 clipY 0
    tags notManaged onTop displayWidth 632 displayHeight 504
    clipWidth 1278 clipHeight 1022
    minimumTextSize 9
    displayX 644 displayY 516
    borderWidth 4

Since the zooming factors of a screen cannot be dynamically changed, a zoomed meta screen needs its own window type screen. As soon as the state of a meta screen goes from fullScreen or panning to zoomed or vice versa two screens are configured. Only the screen of a meta screen which was least recently raised using the screen tag onTop (Screen tags) is actually visible.

The screen configuration files are used when starting the XmetaX proxy. Each of the following files configure all meta screens in a certain state:

    # /etc/opt/XSOXmetaX/fullscreen.conf
    options +DynamicServer +InWindow +Vario
    maximumNumberOfScreens 8
    /etc/opt/XSOXmetaX/fullscreen0
    /etc/opt/XSOXmetaX/fullscreen1
    /etc/opt/XSOXmetaX/fullscreen2
    /etc/opt/XSOXmetaX/fullscreen3
    serverCommand /usr/bin/X11/X :1

    # /etc/opt/XSOXmetaX/panning.conf
    options +DynamicServer +InWindow +Vario
    maximumNumberOfScreens 8
    /etc/opt/XSOXmetaX/panning0
    /etc/opt/XSOXmetaX/panning1
    /etc/opt/XSOXmetaX/panning2
    /etc/opt/XSOXmetaX/panning3
    serverCommand /usr/bin/X11/X :1

    # /etc/opt/XSOXmetaX/zoomed.conf
    options +DynamicServer +InWindow +Vario
    maximumNumberOfScreens 8
    /etc/opt/XSOXmetaX/zoomed0
    /etc/opt/XSOXmetaX/zoomed1
    /etc/opt/XSOXmetaX/zoomed2
    /etc/opt/XSOXmetaX/zoomed3
    serverCommand /usr/bin/X11/X :1

The following shell script modifies the state of a meta screen:

    #!/bin/sh
    # /etc/opt/XSOXmetaX/shiftState

    usage="Usage: $0 fullscreen|panning|zoomed"
    if [ $# != 1 ]
    then
        echo $usage 1>&2; exit 1
    fi
    state=$1
    number=`echo $DISPLAY | sed s/.*\.\([0-9][0-9]*\)/\1/``
    if [ $number = "" ]
    then
        number=0
    fi
    if [ $state = zoomed ]
    then
        /opt/XSOXmetaX/bin/xmetaxtool -nogui /etc/opt/XSOXmetaX/
    panning$number
    fi
    /opt/XSOXmetaX/bin/xmetaxtool -nogui /etc/opt/XSOXmetaX/$state$number

The state transition from fullscreen to zoomed must go through the panning state, because otherwise the corresponding fullscreen meta screen would obscure the meta screens on the other quadrants. The shell script may be bound to window manager actions like hot keys:

    Ctrl<Key>F10 root|icon|window f.exec \
        "/etc/opt/XSOXmetaX/shiftState fullscreen&"
    Ctrl<Key>F11 root|icon|window f.exec \
        "/etc/opt/XSOXmetaX/shiftState panning&"
    Ctrl<Key>F12 root|icon|window f.exec \
        "/etc/opt/XSOXmetaX/shiftState zoomed&"

The regular structure of the configuration files points to their automatic generation using a shell script:

    #!/bin/sh
    # /etc/opt/XSOXmetaX/createConfigurations

    usage="Usage: $0 width height borderWidth serverCommand"
    if [ $# != 4 ]
    then
        echo $usage 1>&2; exit 1
    fi
    width=$1
    height=$2
    borderWidth=$3
    serverCommand="$4"
    width2=`expr $width / 2`
    offsetX=`expr $width2 + $borderWidth`
    width2=`expr $width2 - 2 \* $borderWidth`
    width=`expr $width - 2`
    height2=`expr $height / 2`
    offsetY=`expr $height2 + $borderWidth`
    height2=`expr $height2 - 2 \* $borderWidth`
    height=`expr $height - 2`

    for number in 0 1 2 3
    do
        echo \# \/etc/opt/XSOXmetaX/meta$number > meta$number
        echo metaScreen meta$number >> meta$number
        echo width $width height $height >> meta$number
        case $number
        in 0)
            positionX=$borderWidth
            positionY=$borderWidth
        ;; 1)
            positionX=$offsetX
            positionY=$borderWidth
            echo eastOf meta0 \
                >> meta$number
        ;; 2)
            positionX=$borderWidth
            positionY=$offsetY
            echo southOf meta0 \
                >> meta$number
        ;; 3)
            positionX=$offsetX
            positionY=$offsetY
            echo southOf meta1 \
                >> meta$number
        ;; esac
        for state in fullscreen panning zoomed
        do (
            echo \# \/etc/opt/XSOXmetaX/$state$number
            echo \/etc/opt/XSOXmetaX/meta$number
            case $state
            in fullscreen | panning)
                window=fullscreenPanning$number
            ;; zoomed)
                window=zoomed$number
            ;; esac
            echo window $window display :1.0
            echo ofMetaScreen meta$number
            echo clipX 0 clipY 0
            echo tags notManaged onTop
            case $state
            in fullscreen)
                echo displayWidth $width displayHeight $height
                echo displayX 0 displayY 0
                echo borderWidth 0
            ;; panning)
                echo displayWidth $width2 displayHeight $height2
                echo displayX $positionX \
    		displayY $positionY
                echo borderWidth $borderWidth
                echo followPointerX 16 \
    		followPointerRestrict control
            ;; zoomed)
                echo displayWidth $width2 displayHeight $height2
                echo clipWidth $width clipHeight $height
                echo minimumTextSize 9
                echo displayX $positionX \
    		displayY $positionY
                echo borderWidth $borderWidth
            ;; esac
            ) > $state$number
        done
    done

    for state in fullscreen panning zoomed
    do (
        echo \# \/etc/opt/XSOXmetaX/$state.conf
        echo options +DynamicServer +InWindow +Vario
        echo maximumNumberOfScreens 8
        for number in 0 1 2 3
        do
            echo \/etc/opt/XSOXmetaX/${state}$number
        done
        echo serverCommand "$serverCommand"
        ) > $state.conf
    done

The configuration files above were generated using the commands

    cd /etc/opt/XSOXmetaX
    ./createConfigurations 1280 1024 4 "/usr/X11/bin/X :1"

top
Troubleshooting and support
Virtual window manager

Copyright © 2016 X-Software GmbH
info@x-software.com
2009-07-30 14:44:05 +0200