LINUX.ORG.RU

Как задать разрешение экрана на 2 сессии Х ?


0

0

По цвету нашел -depth ,а по разрешению нет. Есть опция -dpi ,но это не то. Пробовал методом тыка resolution,mode,modes, и подобное - не вышло :-(.
Подкажите,пож. ,какой опцией для startx задать разрешение экрана отличное от прописанного в конфиге иксов ?

anonymous

Все ОЧЕНЬ просто :-) Надо просто подправить /etc/X11/XF86Config

В нем надо прописать несколько разделов Screen, и на каждый из них
навесить раздел Layout. Затем можно выбрать нужный Layout, сказав:

startx -- -layout MyLayout

В общем, RTFM, или пример:

Section "ServerLayout"
        Identifier     "Default Layout"
        Screen      0  "1280x1024x24" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "1024x768-16"
        Screen      0  "1024x768x16" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "1024x768-24"
        Screen      0  "1024x768x24" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "800x600-24"
        Screen      0  "800x600x24" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "800x600-16"
        Screen      0  "800x600x16" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "640x480-24"
        Screen      0  "640x480x24" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "ServerLayout"
        Identifier     "640x480-16"
        Screen      0  "640x480x16" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"


        RgbPath      "/usr/X11R6/lib/X11/rgb"

        FontPath     "unix/:7100"

EndSection

Section "Module"
        Load  "dbe"
        Load  "extmod"
        Load  "glx"
        Load  "record"
        Load  "freetype"
        Load  "type1"
EndSection

Section "InputDevice"


        Identifier  "Keyboard0"
        Driver      "keyboard"
        Option      "XkbRules" "xfree86"
        Option      "XkbModel" "pc105"
        Option      "XkbLayout" "us,ru"
        Option      "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll"
EndSection


Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5"
        Option      "Emulate3Buttons" "no"
EndSection

Section "Monitor"
        Identifier   "Monitor0"
        VendorName   "Monitor Vendor"
        ModelName    "LCD Panel"
        DisplaySize  330        250
        HorizSync    30.0 - 70.0
        VertRefresh  50.0 - 90.0
        Option      "dpms"
EndSection

Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        VendorName  "Well-known vendor NoName :-)"
        BoardName   "RIVA TNT2"

        Option      "NvAGP" "2"
        Option      "NoLogo" "true"
EndSection

Section "Screen"
        Identifier "1280x1024x24"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "1280x1024"
        EndSubSection
EndSection

Section "Screen"
        Identifier "1024x768x24"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "1024x768x16"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     16
        SubSection "Display"
                Depth     16
                Weight   5 6 5
                Modes    "1024x768"
        EndSubSection
EndSection

Section "Screen"
        Identifier "800x600x24"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "800x600"
        EndSubSection
EndSection

Section "Screen"
        Identifier "800x600x16"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     16
        SubSection "Display"
                Depth     16
                Modes    "800x600"
        EndSubSection
EndSection

Section "Screen"
        Identifier "640x480x16"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     16
        SubSection "Display"
                Depth    16
                Weight   5 6 5
                Modes    "640x480"
        EndSubSection
EndSection

Section "Screen"
        Identifier "640x480x24"
        Device     "Videocard0"
        Monitor    "Monitor0"
        DefaultDepth     24
        SubSection "Display"
                Depth     24
                Modes    "640x480"
        EndSubSection
EndSection

Section "DRI"
        Group        0
        Mode         0666
EndSection

no-dashi ★★★★★
()
Ответ на: комментарий от no-dashi

Я использую такой конфиг, чтобы через startx сразу пускать игрушки в полноэкранном режиме на желаемом разрешении. Пока работает :-)

no-dashi ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.