XMing screen size and changing multiple monitors

This post is also available at my personal web site: http://milosophical.me/blog/2009/02/20/xming-screen-size.html


My work’s notebook (Windows XP) is running Xming as it’s X11 server, and it travels between work, home and on the train.

My work office has a docking station and a rotating second display. Typically if I start Xming with this display plugged in, Xming will adjust it’s screen size to use both displays, but if I start it without the screen plugged in, it’ll size to just the notebook screen. If I later add the 2nd screen (by docking the notebook), Xming won’t use it without a restart. Also if I rotate the screen, only the top 1200 pixels will be used by Xming.

The solution is to specify a screen size to begin with that is as wide and tall as both of the screens. On my docked notebook the two displays are the notebook’s display (1920×1200 pixels)  and 2nd display (1600×1200 pixels, which rotates to 1200×1600). So that means the combined screen width is 3520 pixels, and the tallest screen hight is 1600 pixels. Specify this to Xming when it starts:

path\to\xming.exe :0 -clipboard -multiwindow -screen 0 3520x1600

Now I can add/remove/rotate the second screen and still use all of it without restarting Xming.

Advertisements

3 thoughts on “XMing screen size and changing multiple monitors

  1. Thank you! I have a very similar setup and your solution works well. The only remaining snag it seems is that some X11 apps (e.g., Eclipse) seem to ‘remember’ their window location and if I closed an app when on a remote display, it gets brought back up on it – even when the display is not actually connected at that time. So I can’t access the window at all and don’t know of a way to yank it back to my main display. You run into this problem?

  2. Hi Rob,
    I get this a lot with native Windows apps – as well as X11 clients – which remember their screen positions. The Windows apps that happen to have been on a display that has been removed will sometimes not migrate to the remaining display(s).

    For the X11 clients, I assume you’ve tried the Athena generics switches (-geometry and so on)? Not all clients understand the old switches though. GNOME apps have similar (different) switches to set their positions at start-up, and I think Eclipse behaves like GNOME app. Maybe try .Xdefaults settings too?

    For the Windows apps I find I have to move them (especially annoying when an app appears to hang because it’s opened a dialog on the other screen). This is difficult to do with a mouse, when you can’t see it! Pressing Alt-Space, Down, Enter will select “Move” from the Window’s System menu, then use cursor keys to move left or right as appropriate. If this doesn’t seem to take effect, try pressing Esc a few times to cancel any potentially active dialogs. You can also right-click the window’s button on the task-bar, to get the system menu for it.

    I am investigating tiling window managers for Windows because of this issue, but it’s very low on my list 🙂 YMMV

  3. Thanks, but I couldn’t figure out any of those ways to force Eclipse to always open in a specific location. So for now, I sometimes (but not always) need to restart Xming without the -screen option when I’m just working off of my laptop.

    Related but separate: with Xming, only the main Eclipse window is resizable (Windows 7). None of the dialog boxes are resizable (but they were under Cygwin/X). Have you also seen this? Any fix/workaround? Thanks!

Comments are closed.