19

Is there a way to split a single monitor in two, so that the two halves will be treated as separate monitors? This means that windows should fill half the screen when maximized. Also, gnome panels should fill half the screen.

12

It seems compiz has support for this. Under "General Options" in CompizConfig, on the "Display Settings" tab, it is possible to manually specify the "monitors" to use for maximizing windows. There is an issue with Adobe Flash and fullscreen, but overall it works quite well.

Since my graphics card merges three monitors into a single large one, this is very useful

Step by step instructions:

  1. Open a terminal by pressing Ctrl+Alt+T.
  2. Enter sudo apt-get install compizconfig-settings-manager and press enter. Fill out your password when requested. No asterisks will be displayed when entering the password.
  3. When the installation is done, launch the application "CompizConfig Settings Manager".
  4. Click "General Options" under the section "General".
  5. Select the tab "Display Settings".
  6. Uncheck "Detect Outputs".
  7. Edit the list of outputs as desired. Each line is one monitor. The syntax is WIDTHxHEIGHT+X+Y.
  8. See if works right away. You might need to log in and log out again.

Sample configuration for three classic 19-inch monitors in a horizontal row:

1280x1024+0+0
1280x1024+1280+0
1280x1024+2560+0
  • For flash and fullscreen see al.robotfuzz.com/… – Alistair Buxton Jul 20 '12 at 19:09
  • Do you have any further details about how to do this? My graphics card merges two of my three monitors. – Tom Busby Mar 22 '17 at 21:54
  • I've edited my answer and added detailed instructions. – Kalle Elmér Apr 4 '17 at 20:22
  • Interestingly, while fiddling with CompizConfig my setup broke and the settings had no effect. Doing everything in this answer helped: askubuntu.com/questions/705414/… – Kalle Elmér Apr 4 '17 at 20:59
  • This works but it seems now my screen blanks after like 20 seconds of inactivity - which is suboptimal for reading anything. Any ideas how to prevent that? Also, I made a script to automate this - my usecase is actually merging two monitors into one virtual. Sometimes it works without restsarting compiz, sometimes it needs to be restarted, not sure which is when. – sup Sep 29 '19 at 9:38
6

The accepted answer did not work for me. What has worked though was adding virtual monitors in XRandR 1.5.

To split the monitor do the following:

  1. Enter xrandr into the terminal to check the output name and current resolution of the display you want to split.
    On my system the result was:

    Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 32767 x 32767
    HDMI1 disconnected (normal left inverted right x axis y axis)
    HDMI2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 509mm x 286mm
       1920x1080     60.00*+  50.00    59.94
       1920x1080i    60.00    50.00    59.94  
       1600x900      60.00  
       1280x1024     75.02    60.02  
       1152x864      75.00  
       1280x720      60.00    50.00    59.94  
       1024x768      75.08    60.00  
       800x600       75.00    60.32  
       720x576       50.00  
       720x576i      50.00
       720x480       60.00    59.94
       720x480i      60.00    59.94
       640x480       75.00    60.00    59.94
       720x400       70.08
    VGA1 disconnected (normal left inverted right x axis y axis)
    VIRTUAL1 disconnected (normal left inverted right x axis y axis)
    

    We can see that my monitor is connected to HDMI2 and the resolution is set to 1920x1080.

  2. Add 2 virtual monitors with the xrandr --setmonitor command ensuring that they overlap with your physical display and are placed next to each other. The syntax of the command is (without quotes):

    xrandr --setmonitor "monitor_name" "width_px"/"width_mm"x"height_px"/"height_mm"+"x_offset_px"+"y_offset_px" "output_name" 
    

    For my system it was:

    xrandr --setmonitor HDMI2~1 960/254x1080/286+0+0 HDMI2
    xrandr --setmonitor HDMI2~2 960/255x1080/286+960+0 none
    
  3. While the above has already configured the virtual monitors on my system the changes haven't been applied until I have executed (it seems to refresh xrandr):

    xrandr --fb 1921x1080
    xrandr --fb 1920x1080
    

To persist the changes after reboot you would want to execute these commands when you login. You can do so by appending the commands at the end of your ~/.profile file.

  • 3
    Want to +1 b/c would be a window-manager-agnostic way to simulate a multi-monitor setup, but is there a missing step? Using Kubuntu, the commands execute successfully. Both xrandr --listmonitors and xrandr --listactivemonitors show the added monitors, but kwin doesn't see them and everything behaves the same as before. – xiota Jun 7 '18 at 18:26
  • 1
    @xiota Unfortunately I can't help you as these steps were enough on my Xubuntu - I have executed them again as they are in the answer and the screen has correctly split into 2 parts. In Xfce's display settings I still see only 1 monitor but the screen is split and when I, for example, maximize a window it takes only half of screen. Ensure that in first command on step 3 you enter different resolution than is already set on your display otherwise the command will be ignored and nothing will happen. – Strachu Aug 11 '18 at 20:38
  • @xiota kwin does not respect xrandr's monitor settings. I use openbox kde session. It works. (No need to running xrandr --fb.) Though, the KDE taskbar still does not repect xrandr's monitor settings, which I consider as a feature. – weakish Apr 13 '19 at 10:26
4

This is fundamentally impossible in X11 architecture unless you rewrite the video drivers. I know this from bitter experience.

The only way you could do is by running multiple windowed virtual desktops (ie vnc or xnest/xephyr) in borderless windows. You'll then lose all graphics acceleration.

1

You might try using a tiling window manager.

KDE supports limited tiling out of the box. It will allow you to split you screen into two halves, though.

On the other end of the spectrum are Xmonad and Awesome. These are more difficult to set up, but some people swear by them. I used Xmonad for a long time and you get very adept at keyboard navigation. Reducing mouse usage, is the reason most people switch in the first place. I now use KDE because a few programs I use regularly don't tile very well and were a pain to use in Xmonad.

A happy medium might be to replace Gnome's window manager with Xmonad if you are a Gnome user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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