Setting the default location for opening windows i

2019-07-25 13:22发布

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

I 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

标签: linux window x11
3条回答
贪生不怕死
2楼-- · 2019-07-25 14:10

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.

查看更多
够拽才男人
3楼-- · 2019-07-25 14:17

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.

查看更多
一夜七次
4楼-- · 2019-07-25 14:26

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.

查看更多
登录 后发表回答