multiple monitors - Limiting the maximum window size on gnome

07
2014-07
  • Egwor

    I'm using Xming to connect to a redhat box running gnome for development (I found that VNC had issues with all of the various different keystrokes). I have three smallish monitors, so I want to run the X session across all three monitors. To do this I run

    Xming.exe :0 -clipboard -ac -engine 1 -nolisten inet6 -keyhook +xinerama -nodecoration -screen 0 3840x1024_50@1 -multiplemonitors
    

    One of the issues that I have is that this creates one very large session across all of the monitors. That means that when I maximise a window it covers all three screens. Ideally I'd like to make my IDE window maximise to the size of the physical screen (e.g. one monitor) such that I can run multiple IDE windows side by side. Is there a way to limit the size of the window? Is there an equivalent to this

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    ubuntu - How can I make a gnome panel only appear if I have a second monitor hooked up?
  • Jason Baker

    I have a laptop with Ubuntu installed on it and I'm constantly switching from just my laptop to also having a monitor. When I'm using the laptop screen and monitor, I have a panel on each monitor that shows the windows open for that monitor. If I switch to just using the laptop screen, then both panels end up on the same screen. How can I configure one of the panels to only show up if I have two monitors? Or can I at least "suspend" one of the panels somehow so I don't have to set it up the way I like it every time I switch?


  • Related Answers
  • 8088

    Try setting the screen option for this panel via gconf-editor.

    Run gconf-editor and navigate to the panel options at /apps/panel/toplevels/panel_1/ (your panel name may vary slightly). You should see an option screen as shown below. Try configuring this to your liking.

    I'm not sure this will work, as I have a feeling that when you switch to using just the laptop screen, this value is automatically changed to the available screen. It's worth a shot.

    If you use Xinerama, there's also an option to configure the monitor the panel appears on.

    If none of these work, I'd suggest you enable auto-hide, and set a very low auto_hide_size so the panel is barely visible when you switch to one screen.

    I haven't researched this yet, but if there is a command-line way to modify these values, I'd just use a script to tweak these values so the panel is hidden when I want it.

    gconf-editor

  • 8088

    Here's what I did (on Ubuntu 10.04):

    To fully hide the panel, you can set monitor to -1 using gconftool-2. The only caveat is sometimes you have to kill/restart gnome-panel after changing the monitor setting. This should do the job (killall without rerunning gnome-panel doesn't always bring it back):

    gnome-panel --replace
    

    There is a blog post here with a simple script that you can hook onto nvidia-settings or gnome-display-properties:

    http://blog.zoomeren.nl/2010/03/05/a-gnome-panel-for-each-connected-monitor/

    Since I use Nvidia, I did nvidia-settings -tq TwinView to check if TwinView is on, but you might not be able to tell the difference between two and three monitors.

  • 8088

    GConf includes a command line tool, gconftool-2. You can use the gconftool–2 command to perform the following tasks:

    • Set the values of keys.
    • Display the values of keys.
    • Install schemas from schema definition files when you install an application.

    For example, use the following command to display the values of all keys in the /desktop/gnome directory and subdirectories.

    gconftool-2 --recursive-list /desktop/gnome