Customizing X
Summary:- Color Depth
- Refresh Rate
- Resolution
- Power Saving
- Running Scripts Automatically
- Width Height Position
Color Depth
Settings
In Mandrake 7.0 and later, you can change resolution and color depth settings comfortably via '~DrakConf' (aka Mandrake Control Center). For earlier versions you may either run the 'Xconfigurator' or insert the values by hand in '/etc/X11/XF86Config(-4)' ('Screen Sections', Section 'Screen', 'Subsection Display'), like thisSubsection "Display"<br> Depth 32<br> Modes "1280x1024"<br> ~ViewPort 0 0<br> ~EndSubsection
Pro's and Con's of color depths
- 256 colors (= 8 bits per pixel)
Low memory load. Works with almost all graphic cards. However some programs (like Wordperfect) have problems with color mapping, don't start at all, look ugly or induce annoying color flashes when changing focus. If you use KDE, you should get rid of the icons which eat up a lot of the available colors. Economical, but not nice. - 32.768 or 65536 colors (= 15, 16 bpp)
Moderate memory load (one third less than 24 bpp). Unfortunately, this seems to be the color depth which is most likely to cause problems with some cards. Reduced color precision due to dithering. Goes along well with applications. A good compromise for workstations. The 15 bpp setting is quite uncommon. - 16.777.216 colors (= 24 bpp)
High memory load. An image at 1024x768 with 24 bpp uses more than 2 MB of memory. Top image quality. Problems with some programs (notably Netscape Communicator, which tends to display a black and white user interface at this depth). - 16.777.216 colors (= 32 bpp)
See above. This depth has an 8bit pseudo layer added which is used by some graphics hard- and software. It's of no use in X, though, but some programs which have coloring difficulties with the 24bpp setting work flawlessly with this (again, Netscape Communicator).
If you want to use ~TrueColor, use this mode instead of 24 bpp.
Resolution
Common resolution settings are:- 800x600 for 15'' monitors,
- 1024x768 for 17'' monitors,
- 1280x1024 for 19'' monitors,
- Up to 1800x1440 for bigger monitors.
Higher resolutions allow a smoother display of dithered colors but put a higher load on the graphics card and the monitor. Working comfortably in X requires at least an 17'' monitor (well, in my opinion ;-)), especially if you run desktop environments which come with task bars (like KDE or GNOME). If you feel your screen is too small, you can make it appear larger in two ways : virtual desktops and virtual screen size. Most of the available window managers for X allow you to have several (virtual) X desktops. Remember though that every virtual desktop uses system resources, so turn them off via the manager's configuration utility if you don't need them.
'Virtual screen size' means although your monitor's resolution is set to - let's say - 800x600, the desktop looks like 1024x768. It scrolls on its own accord as soon as the mouse reaches the edge of the real screen. You can set this up via '~DrakConf / Mandrake Control Center', the 'Xconfigurator' in older Mandrake releases or by hand in '/etc/X11/XF86Config(-4)', Screen Sections, Section "Screen", Subsection "Display" like this
Subsection "Display" Depth 32 Modes "800x600" "640x480" Virtual "1024x768" ~ViewPort 0 0 ~EndSubsection
Refresh Rate
The refresh rate determines how often the screen will be redrawn. Low refresh rates lead to the dreaded monitor flicker and are bad for your eyes and no fun to work with. The minimum is 75Hz for screens up to 17'', and 85Hz for bigger screens. So you'll need around 50 kHz horizontal sync frequency for 15'' monitors, 69kHz for 17'', and 95kHz for 19''. Of course, these are hardware values. If your monitor doesn't support them, you'll just have to cope with flicker.The capabilities of your graphics card and the chosen screen resolution have an impact on this rate. You better use a lower resolution at a higher refresh rate than vice versa. If you configure your screen settings via '~DrakConf / Mandrake Control Center' or - in older releases - with 'Xconfigurator' and your monitor is not listed in the database, you might have to choose generic settings which are safe but not as good as they could be.
To get the best out of your hardware, you have to change the appropriate lines in the 'Monitor Section' of '/etc/X11/XF86Config(-4)' by adjusting the values of
~HorizSync
~VertRefresh
Power Saving
This is done via DPMS (Digital Power Management Signaling) and in most cases it is already enabled by an option in '/etc/X11/XF86Config-4'. To check if DPMS is enabled on your machine, run this command: xdpyinfo | grep DPMS If this command returns no output, you'll have to enable DPMS yourself.This can be done in two ways:
- Environments like KDE or GNOME allow to enable and configure DPMS settings via their respective control centers.
- The 'xset' command line utility allows - among many other things - enabling and configuring DPMS settings. The syntax is simple:
xset dpms sec_till_standby sec_till_suspend sec_till_off
Running Scripts Automatically
Most window managers and desktop environment are capable of session management. This however works only for graphical applications, not for scripts. If you start your window manager from the command line, just add the commands to the file '.xinitrc'. Read the article on Starting X for details. KDE and GNOME offer mechanisms to run scripts automatically at the beginning of every session.First create a script. The script has to be executable and must start with this line: ~>
#1.1 /bin/sh
xmodmap ~/.Xmodmap
xmodmap ~/.Xmodmap<br> xterm &<br> exec icewm
If you're using the 'autologin' feature, the procedure is exactly the same, but the name of the file has to be '.xinitrc' again instead of '.Xclients'. section index
Width Height Position
Changing of the width, height and position of the desktop on the screen because of:- black borders
- desktop is cut at one side
- desktop is too big for the screen
su -
enter your password
XFree86 -version Using this version information you have to choose your XF86Config-file. In the case of Mandrake 9 and 10 this is the following, if you have installed XFree version 4:
cp /etc/X11/XF86Config-4 /etc/X11/XF86Config.bak
vi /etc/X11/XF86Config-4 Or if you prefer a gui, you can use the konqueror to open the file /etc/X11/XF86Config-4. Search the Section "Monitor" and change to the parameters to those of you monitor from the handbook of your manufacturer. Do not change the Identifier, if you do not know what you are doing. see Refresh Rate
Section "Monitor" Identifier "monitor1" ~VendorName "Generic" ~ModelName "1024x768 @ 70 Hz" ~HorizSync 30-82 ~VertRefresh 50-120 # Sony Vaio C1(X,XS,VE,VN)? # 1024x480 @ 85.6 Hz, 48 kHz hsync ~ModeLine "1024x480" 65.00 1024 1032 1176 1344 480 488 494 563 -hsync -vsync
Section "Monitor" Identifier "monitor1" ~VendorName "Generic" ~ModelName "1024x768 @ 70 Hz" ~HorizSync 30-82 ~VertRefresh 50-120 ~ModeLine "1024x768" 75.00 1024 1056 1192 1328 768 771 777 806 -hsync -vsync
vi /etc/X11/XF86Config-4 section index
Related Resources:
X Free86 Video Timings HOWTOman xset
man XF86Config Revision / Modified: June 18, 2002
Author: Tom Berger Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.
Customizing X
Version 1.6 last modified by Flink on 21/01/2005 at 19:35
Version 1.6 last modified by Flink on 21/01/2005 at 19:35
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!


