0

Running my automation suite with following command

/usr/bin/xvfb-run -a /usr/share/maven/bin/mvn -e clean install -gs ~/.m2/settings.xml test -Dsuite=checktest -Dbrowser=firefox -Dplatform=linux

However browser gets opened but closed after few seconds, and command line errors are following:

/usr/bin/xvfb-run: line 181: 10208 Killed DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1

Line 181 from xvfb-run file: DISPLAY=:$SERVERNUM XAUTHORITY=$AUTHFILE "$@" 2>&1

Settings that are done for xvfb on my machine are:

export DISPLAY=:99

nohup Xvfb :99 -screen 0 1920x1920x24 &

ps -ef |grep Xvfb shows that xvfb process is running

vish
  • 901
  • 1
  • 7
  • 20
  • Possible duplicate of [How to keep environment variables when using sudo](https://stackoverflow.com/q/8633461/608639) – jww Sep 14 '18 at 22:11

1 Answers1

0

removing -S switch has worked. sudo -s runs a shell with root privileges

/usr/bin/xvfb-run -a /usr/maven/bin/mvn -e clean install -gs ~/.m2/settings.xml test -Dsuite=checktest -Dbrowser=firefox -Dplatform=linux

vish
  • 901
  • 1
  • 7
  • 20