Launch a program to run on a specific display

  • I have two displays on my PC, say Display1 & Display2.
  • Display2 is configured as an extension to Display1.
  • Being on Display1 I wish to launch (from a terminal emulator), an application say xcalc, which should pop up on Display2.

    Is it possible somehow ?

Solution 1:

  • Some programs are smart enough to remember the last window position.

  • Many programs written for the X Window System accept a -geometry option; for example, xcalc -geometry +500+750 will start xcalc placing the window 500 pixels to right and 750 pixels down from the logical upper-left corner (which is +0+0). Other programs call this option --geometry (note then two hyphens). Read the documentation of the specific program.

  • Another option is to install wmctrl (sudo apt-get install wmctrl). wmctrl (Window Manager Control) allows sending requests to the window manager to perform certain actions, such as resizing or moving windows. You could then write a small script which starts the program and then uses wmctrl to move it where you want it to appear.