Apple - Inkscape (or other XQuartz) window disappears when using external screen

It seems like the issue is that when I plug the external screen, it messes with the coordinate system of my Mac's screen, effectively shifting the origin of my screen by the resolution of the external screen.

In other words, from the point of view of XQuartz the origin of my Mac's screen changes from 0,0 to 2560,1440 (which is the resolution of my external screen).

This means that if Inkscape is somewhere near origin (0,0) but still associated with my Mac's main screen then it doesn't appear on the external screen nor in my main screen. It is basically in "limbo" between the 2 screens.

The solution is to move the Inkscape window to a new coordinate that takes into account the size of the external screen, and this is where wmctrl comes in useful:

brew install wmctrl
wmctrl -r Inkscape -e 0,2560,1440,1200,700

Of course you need to replace 2560,1440 with your own external screen's resolution and 1200,700 to suit your main screen resolution.

In order to make it more convenient I created 2 alias, to fix the coordinates for my Mac screen and for the external screen, respectively:

alias fixInkscape='wmctrl -r Inkscape -e 0,2560,1440,1200,700'
alias fixInkscapeExt='wmctrl -r Inkscape -e 0,0,0,2560,1300'

Remember that each alias only works for the screen that Inkscape is associated with, you still need to drag-and-drop the window in order to switch screens. wmctrl won't do it automatically, but it certainly helps in "fishing" it from limbo.


This worked for me when working with Inkscape:

  • Close XQuartz (and Inkscape)
  • Change the Mission Control Preferences (unselect Display have separate spaces)
  • Log out
  • Start Inkscape
  • Change the Windows Inkscape preferences (Edit/ Preferences) to "Don't save Windows Geometry"
  • Close Inkscape end XQuartz
  • Reset the Mission Control Preferences (if you like)
  • Log out and back in.

All the credits to:

https://groups.google.com/forum/#!topic/eggbotuser/48RbZ2Pey5A

I have two monitors and OSX Sierra and Inkscape 0.92.2.

Good luck.


There is a far simpler way.

Go to the System Preferences Display panel. Then untick 'Mirror Displays'. You should see the XQuartz window(s). Move them around a bit.

Then tab back to the System Preferences window - the Arrangement may be behind a monitor dialog, but you should be able to move the monitor dialogs out of the way and then un-enable 'Mirror Displays'.

Or if you tick the 'Show Mirroring options in the toolbar' option then you can reach the Display dialog from the toolbar.

If you really wanted to take your time for other occasions - you could set up a keyboard shortcut to toggle the 'Mirror Displays' on and off.

Much easier....