开发者

Setting the default location for opening windows in an Xvfb environment

This problem is driving me crazy. Maybe the experts at Stack Overflow can help.

I 开发者_JAVA技巧want to open an application in Xvfb and to have it always positioned at x,y=0,0 (Top left corner).

The application does not take any parameters, allowing it to reposition the opened window itself. Is there a way to set the default window position in a X-server? (Xvfb).

Best regards Gustaf


I use Xvfb with twm (yum install twm). You need to create a ~/.twmrc file to indicate how windows are displayed.

I just use 'RandomPlacement' but in your case you might want to use 'UsePPosition' (check http://www.xfree86.org/4.4.0/twm.1.html) for more options.


Are you running a window manager? It's up to the window manager to place windows, and it should default to (0,0) already when no window manager is running.


Is there a way to set the default window position in a X-server? (Xvfb).

It's open source, so yes, you could hack it in. But it's normally the window manager's job, so find a light-weight wm that allows window-placement rules. Some can pattern-match on window name to select rules.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜