LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   xorg.conf : Explanation of "Viewport" and "Virtual" (http://www.linuxquestions.org/questions/linux-newbie-8/xorg-conf-explanation-of-viewport-and-virtual-858373/)

uncle-c 01-24-2011 11:53 AM

xorg.conf : Explanation of "Viewport" and "Virtual"
 
Afternoon all.
In order to get my X display working correctly I've been tinkering with the settings in my xorg.conf file. I've got everything to work correctly and below is a snippet from my xorg.conf file :

Code:

Section "Screen"
        Identifier        "Default Screen"
        Monitor                "Configured Monitor"
        Device                "Configured Video Device"
        DefaultDepth        24
        SubSection        "Display"
                Depth        24
                Virtual 1024 768
                Modes  "1280x1024" "1024x786" "800x600" "640x480"
        EndSubSection

In some example xorg.conf files I have often seen Virtual 1024 768 replace by Viewport 0 0. What, in simple terms, do these lines purport to, what is their function and when & why is it appropriate to use one and not the other ?


Thanks.

stress_junkie 01-24-2011 12:04 PM

Code:

man xorg.conf
Quote:

Virtual xdim ydim
This optional entry specifies the virtual screen resolution to
be used. xdim must be a multiple of either 8 or 16 for most
drivers, and a multiple of 32 when running in monochrome mode.
The given value will be rounded down if this is not the case.
Video modes which are too large for the specified virtual size
will be rejected. If this entry is not present, the virtual
screen resolution will be set to accommodate all the valid video
modes given in the Modes entry. Some drivers/hardware combina‐
tions do not support virtual screens. Refer to the appropriate
driver-specific documentation for details.

ViewPort x0 y0
This optional entry sets the upper left corner of the initial
display. This is only relevant when the virtual screen resolu‐
tion is different from the resolution of the initial video mode.
If this entry is not given, then the initial display will be
centered in the virtual display area.
I haven't used this in a while. As I recall "Virtual" can be used to make the desktop larger than the monitor's resolution. You would not be able to see the entire desktop since some part of it would always be off the screen. You can drag the desktop around to see the parts that are not visible.

Within that context the definition of "Viewport" seems obvious. It sets the starting position of the desktop.


All times are GMT -5. The time now is 08:43 PM.