nysus has asked for the wisdom of the Perl Monks concerning the following question:
I have a box with 4 X11 servers running on it with the following designations: :3.0, :2.0, :1.0, :0.0
I have a Moose class that launches an application (a Firefox browser) and then uses the X11::GUITest module to perform some operations on the application. I can change which display the application runs on and which display X11::GUITest operations are sent to by setting the $ENV{'DISPLAY} system variable like so:
package FFMech; $ENV{'DISPLAY'} = ':3.0'; # open app in display #3 and send X11::GUITe +st operations to it use X11::GUITest qw(SendKeys ClickWindow); use Moose;
Instead of hard coding the DISPLAY variable, I'd like my FFMech object to be able to set this variable. How do I achieve this?
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to set $ENV{'DISPLAY'} variable programatically?
by LanX (Saint) on Apr 20, 2016 at 21:16 UTC | |
by nysus (Parson) on Apr 20, 2016 at 23:34 UTC | |
by LanX (Saint) on Apr 20, 2016 at 23:43 UTC | |
by nysus (Parson) on Apr 20, 2016 at 23:52 UTC | |
by Anonymous Monk on Apr 21, 2016 at 01:30 UTC | |
| |
by Anonymous Monk on Apr 21, 2016 at 01:23 UTC | |
|