Saturday, July 19, 2008

How to change X window configuration (Ubuntu, openSUSE, Fedora)  

Do you know how to modify X window configuration through command line?
That's a easy way to do that.

#X -configure ---> It will generate xorg.conf if you don't have this file yet
#vi /etc/X11/xorg.conf ---> Modify this file fulfill your requirement

# /.../
# SaX generated X11 config file
# Created on: 2008-06-23T13:41:01+0800.
#
# Version: 8.1
# Contact: Marcus Schaefer , 2005
# Contact: SaX-User list
#
# Automatically generated by [ISaX] (8.1)
# PLEASE DO NOT EDIT THIS FILE!
#


Section "ServerLayout"
Identifier "Layout[all]"
Screen 0 "aticonfig-Screen[0]" 0 0
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
Option "Clone" "off"
Option "Xinerama" "off"
EndSection


Section "Files"
InputDevices "/dev/gpmdata"
InputDevices "/dev/input/mice"
FontPath "/usr/share/fonts/misc:unscaled"
FontPath "/usr/share/fonts/local"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/truetype" ---> add truetype font
FontPath "/usr/share/fonts/local"
FontPath "/usr/share/fonts/Type1"
FontPath "/usr/share/fonts/URW"
FontPath "/usr/share/fonts/Speedo"
FontPath "/usr/share/fonts/PEX"
FontPath "/usr/share/fonts/cyrillic"
FontPath "/usr/share/fonts/latin2/misc:unscaled"
FontPath "/usr/share/fonts/latin2/75dpi:unscaled"
FontPath "/usr/share/fonts/latin2/100dpi:unscaled"
FontPath "/usr/share/fonts/latin2/Type1"
FontPath "/usr/share/fonts/latin7/75dpi:unscaled"
FontPath "/usr/share/fonts/baekmuk:unscaled"
FontPath "/usr/share/fonts/japanese:unscaled"
FontPath "/usr/share/fonts/kwintv"
FontPath "/usr/share/fonts/truetype"
FontPath "/usr/share/fonts/uni:unscaled"
FontPath "/usr/share/fonts/CID"
FontPath "/usr/share/fonts/ucs/misc:unscaled"
FontPath "/usr/share/fonts/ucs/75dpi:unscaled"
FontPath "/usr/share/fonts/ucs/100dpi:unscaled"
FontPath "/usr/share/fonts/hellas/misc:unscaled"
FontPath "/usr/share/fonts/hellas/75dpi:unscaled"
FontPath "/usr/share/fonts/hellas/100dpi:unscaled"
FontPath "/usr/share/fonts/hellas/Type1"
FontPath "/usr/share/fonts/misc/sgi:unscaled"
FontPath "/usr/share/fonts/xtest"
FontPath "/opt/kde3/share/fonts"
EndSection


Section "Module"
Load "dbe"
Load "type1"
Load "freetype"
Load "extmod"
Load "glx"
Load "xxx"
---> add something to load module
EndSection


Section "ServerFlags"
Option "AllowMouseOpenFail" "on"
Option "ZapWarning" "on"
EndSection


Section "InputDevice"
Identifier "Keyboard[0]"
Driver "kbd"
Option "Protocol" "Standard"
Option "XkbLayout" "us"
Option "XkbModel" "microsoftpro"
Option "XkbRules" "xfree86"
EndSection


Section "InputDevice"
Identifier "Mouse[1]"
Driver "mouse"
Option "Buttons" "9"
Option "Device" "/dev/input/mice"
Option "Name" "ImExPS/2 Generic Explorer Mouse"
Option "Protocol" "explorerps/2"
Option "Vendor" "Sysp"
Option "ZAxisMapping" "4 5"
EndSection


Section "Monitor"
Identifier "aticonfig-Monitor[0]"
Option "VendorName" "ATI Proprietary Driver"
Option "ModelName" "Generic Autodetecting Monitor"
Option "DPMS" "true"
EndSection


Section "Device"
Identifier "aticonfig-Device[0]"
Driver "fglrx"
EndSection


Section "Screen"
Identifier "aticonfig-Screen[0]"
Device "aticonfig-Device[0]"
Monitor "aticonfig-Monitor[0]"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x1024" ---> modify here for your resolution
EndSubSection
EndSection


Section "DRI"
Group "video"
Mode 0660
EndSection

Stumble Upon Toolbar Digg! diigo it

Related Posts by Categories



1 comments: to “ How to change X window configuration (Ubuntu, openSUSE, Fedora)

  • Gary Saunders

     

    Hi Bryan,

    First thanks for the help you provide via your pages (I'm new to Ubuntu and found this helpful)

    I found you via a link you left at
    http://forums.opensuse.org/hardware/395185-resolution-resets-each-boot-up.html

    In your example above in Section "Screen" you have a line:
    Modes "1280x1024"
    But you don't have modes defined anywhere else in your xorg.conf file. I found to make it work I had to add a section
    Section "Modes"
    Identifier "Modes[0]"
    ModeLine "1024x768" 94.4 1024 1088 1200 1376 768 769 772 807
    EndSection

    This seems to be backed up by the manpages for xorg.conf which say the Mode described in the Screen section must match one of the modes defined (lines 1229 onward in the manpages)

    You may want to update your very helpful post (as the first time I tried it without the mode defined and my Xwindows could only boot into low graphics version)

    PS. The problem I was trying to fix (resolution keeps resetting every logon) is now fixed thanks to you. Cheers (been working on this for a few hours now).