为了测试目的,我使用Xvfb。 今天,我想用wmctrl命令进行一些测试。我在Python中进行了如下测试:
display = ":99"
pXvfb = subprocess.Popen(["Xvfb", display, "-screen", "0", "1024x768x24"])
# wait that xvfb is up
time.sleep(1)
os.environ["DISPLAY"] = display
p = subprocess.Popen( ["wmctrl", "-l" ] )
p.wait()
pXvfb.terminate()
在这个测试中,wmctrl 说:
Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)
我认为这很正常,因为我没有将任何窗口管理器附加到我的Xvfb上。
如何启动一个窗口管理器(对于我的情况,Enlightenment应该是不错的选择
),以便仅管理Xvfb?