Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

The relevant output of my xrandr configuration:

xrandr -q
Screen 0: minimum 320 x 200, current 2304 x 1024, maximum 8192 x 8192
LVDS1 connected 1024x768+0+0 (normal left inverted right x axis y axis)      

VGA1 connected 1280x1024+1024+0 (normal left inverted right x axis y axis) 

Just as an examle; let's say I would launch gvim from the commandline, how could I force the application window to be displayed on output VGA1?

As a desktop environment I am using Unity with compiz enabled. Maybe there's a way to do this within compiz if I can't do it straight from the cli (which I would prefer)?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can set the position and size of the Gvim window through the -geometry command line option. This is common to a lot of X11 applications. The syntax of the geometry specification is ${width}x${height}+${x}+${y}, and you can omit the size or position if you want to only set one.

gvim -geometry +1024+0
share|improve this answer
    
Thx for your reply. I should have made it clearer in my question. Using gvim as an application was just an example. The solution should be agnostic to a certain applications implementation of its window placements. E.g. when using feh to display an image, your approach would not work. Also feh just being an application chosen for the sake of example –  jottr Feb 27 '12 at 2:11
    
@elementz A lot of X applications support -geometry. With feh, you need to pass --geometry. You need application support or window manager support, you can't do this fully reliably from a third-party tool (the best you could do from a third-party tool is detect new windows and reposition them after the fact). –  Gilles Feb 27 '12 at 2:17
    
Just checked, the --geometry switch is actually available in feh, but it does not allow to control the placement of a fullscreen window when using -F. Either way, an application agnostic approach would be what I am looking for. –  jottr Feb 27 '12 at 2:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.