Monday, July 16, 2012

I was trying to get an HP t5565 thin client to open two browser windows fullscreen with one on the primary monitor and one on the secondary monitor.

I ended up using wmctrl and had it manually move one window to the second screen.  My webpages had the word Gelcoat in the title so I could key off that to get the window id.


#!/bin/bash
WID=$( wmctrl -l | grep Gelcoat | cut -f1 -d " " | tail -n 1 )
wmctrl -ir $WID -e 0,1920,0,1920,1080
WID=$( wmctrl -l | grep Gelcoat | cut -f1 -d " " | head -n 1 )
wmctrl -ia $WID


I had to add the last two lines to bring the primary display window to the front to cover the task bar again after moving the other window to the secondary display.


I then setup this script as a 'connection' and set the priority so that it would run after the two browser window connections were started.

No comments: