LinuxCommandLibrary

xgamma

Adjust display gamma, brightness, and contrast

SYNOPSIS

xgamma [options]

PARAMETERS

-gamma float
    Sets the overall gamma correction for all three color channels (red, green, blue) to the specified floating-point value. A value of 1.0 is default (no correction).

-rgamma float
    Sets the gamma correction specifically for the red color channel to the specified floating-point value.

-ggamma float
    Sets the gamma correction specifically for the green color channel to the specified floating-point value.

-bgamma float
    Sets the gamma correction specifically for the blue color channel to the specified floating-point value.

-quiet
    Suppresses the display of the current gamma settings after modification, showing no output unless an error occurs.

-display display
    Specifies the X server to connect to. If not specified, the value of the DISPLAY environment variable is used.

-version
    Prints the xgamma program version and exits.

DESCRIPTION

xgamma is a utility program for the X Window System that allows users to query and modify the gamma correction of a display monitor. Gamma correction adjusts the brightness or luminosity of an image, particularly in the mid-tones, to compensate for the non-linear response of display devices. By using xgamma, users can fine-tune the visual appearance of their screen, making colors appear more accurate or adjusting the overall brightness to suit their preferences or environmental lighting conditions.

It interacts directly with the X server to apply these changes. While useful for quick adjustments, settings applied by xgamma are typically temporary and may be reset upon system reboot, X server restart, or by other display management tools. It's primarily used in X11 environments and does not apply to modern display servers like Wayland.

CAVEATS

Temporary Nature: Settings applied by xgamma are usually temporary and are lost upon X server restart, system reboot, or when another application (like a display manager or compositor) overrides them.

X11 Only: xgamma works exclusively with the X Window System. It has no effect in environments using display servers like Wayland, which use different display protocols.

Hardware Dependency: The actual effect of xgamma depends on the display hardware and its drivers. Not all hardware supports fine-grained gamma control through the X server, and results may vary.

CHECKING CURRENT GAMMA

To check the current gamma settings without making any changes, simply run xgamma without any arguments. It will output the current red, green, and blue gamma values, for example:
-> Red Gamma: 1.000, Green Gamma: 1.000, Blue Gamma: 1.000

MAKING CHANGES PERSISTENT

To make gamma adjustments persistent across reboots or X server restarts, users often add xgamma commands to their X startup scripts. Common locations include ~/.xinitrc, ~/.xprofile, or through the autostart settings of their desktop environment (e.g., KDE, GNOME).

INTERACTION WITH OTHER TOOLS

xgamma may conflict with or be overridden by other display management tools or desktop environment settings that also manage screen calibration or color profiles. Examples include xrandr (which offers more comprehensive display control) or dedicated display calibration software.

HISTORY

xgamma is a legacy utility that has been part of the X Window System's core set of tools for a long time. It provides a simple, direct interface to the X server's gamma correction capabilities, which were essential for calibrating displays in earlier computing environments. Its development has been stable, with most changes being bug fixes or minor enhancements rather than major feature additions. It remains part of the x11-apps or xorg-xgamma package in modern Linux distributions for compatibility with X11 environments.

SEE ALSO

xrandr(1), xbacklight(1), xrdb(1)

Copied to clipboard