How to make Xvfb display visible?

前端 未结 4 1442
面向向阳花
面向向阳花 2020-12-01 00:56

I am running selenium through Xvfb on display number :99 like this:

/usr/bin/Xvfb :99 -ac -screen 0 1024x768x8 & export DISPLAY=\":99\" &&

4条回答
  •  广开言路
    2020-12-01 01:29

    A simple solution is also to constantly take screenshots of the program like this:

    while /bin/true; do
        DISPLAY=:99 import -window root ~/Pictures/xvfb_screenshot.png
        sleep 0.1
    done &
    PID=$!
    feh --reload 0.1 ~/Pictures/xvfb_screenshot.png 2>/dev/null
    kill $PID
    

    Note: requires to install imagemagick and feh

提交回复
热议问题