I am using Centos 6.3 with two screens :

screen A : 1280x1024
screen B : 1680x1050

Screen A is the main screen, and screen B an extension. The problem is, screen A should accept a virtual resolution of 1280x1050 instead of 1280x1024.

With only one screen connected to the PC, I run on a terminal :

$ xrandr --fb 1280x1050 --output VGA1 --mode 1280x1024 --panning 1280x1050

And it works, I have my new virtual resolution and I can access the masked parts touching the edge of the screen.

The problem came with two screens. I want like before, to enlarge screen A without touching the resolution of screen B, but the command does not work and I don't know how to do. I tested with

$ xrandr --fb <NEW_RES_WITH_TWO_SCREENS>

but It makes one big same screen on the two monitors. I read that I should modify the xorg.conf file but it seems that this file does not exist on /etc/X11... when I want to create one :

$ Xorg -configure

I have an error..

Fatal server error : Server is already active for display 0, if this server is no longer running, remove /tmp/.X0-lock and start again

context : I have to run on screen A an appli, which man/machine interface resolution is larger than the screen resolution. And I can't modify the code.

Any help would be welcome


When you want to set up more than one monitor you need to get their names and specify their resolution separately:

xrandr --query | while read -r word1 word2 _
    if [ "${word2:-}" = 'connected' ]
        IFS='xi ' read -r width height _
        printf '%s %d %d\n' "$word1" "$width" "$height"
done | while read monitor width height
    count=$(($count + 1))
    printf "monitor%d_name='%s'\n" "$count" "$monitor"
    printf "monitor%d_width='%s'\n" "$count" "$width"
    printf "monitor%d_height='%s'\n" "$count" "$height"

Example output:

  • thanks for your reply. I agree with your post when resolution are known and applicable for the monitor. Correct me if I'm wrong, you suggest this command line : xrandr --output VGA1 --mode 1280x1024 --pos 0x0 --output HDMI1 --mode 1680x1050 --pos 1280x0 What if I want to change the VGA resolution to 1280x1050 instead of 1280x1024 ? – Arthur Aug 27 '14 at 8:07
  • I found a trick to get the 1280x1050 resolution for my VGA monitor with cvt 1280 1050 75 and xrandr --newmode <...>. Then I use it like you said ( @l0b0 ) : xrandr --output VGA1 --mode 1280x1050_75 --pos 0x0 --output HDMI1 --mode 1680x1050 --pos 1280x0 and it works but I don't have the ability to scroll and see the masked part of the virtual resolution.. even if I use the --panning 1280x1050. – Arthur Aug 27 '14 at 8:33

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.