LinuxCommandLibrary

xsetmode

Control X server video mode settings

SYNOPSIS

xsetmode [-display display_name] screen_number mode_number

PARAMETERS

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

screen_number
    The screen number on the X server to modify. Usually '0'.

mode_number
    The number of the video mode to set or unset. Mode numbers can be determined using other tools like `xrandr` or `xvidtune`.

DESCRIPTION

The xsetmode command is a utility for modifying the video mode of an X server display. It allows you to change the display mode of a specific output device, setting or unsetting a given video mode. This command is particularly useful for adjusting screen resolution, refresh rates, or other video settings outside of a standard desktop environment's graphical tools. It directly manipulates the X server's configuration for the display, providing low-level control over the screen's characteristics. xsetmode is often used in scripts or configurations where precise control over the display mode is required, or when the standard display manager functionalities are insufficient.
The command uses the X Window System Display Manager Control Protocol (DMC).

CAVEATS

xsetmode interacts directly with the X server and improper use can lead to display issues. It's recommended to understand the available video modes before using this command. Incorrect mode settings can result in a blank screen or other display problems. Note that the effects of xsetmode can be temporary, and the display may revert to default settings upon restarting the X server or logging out.

RETURN CODES

xsetmode returns 0 on success and a non-zero value on failure. Failure can occur due to invalid arguments, inability to connect to the X server, or attempting to set an unsupported video mode.

HISTORY

xsetmode has been a part of the X Window System utilities for a long time. It has provided a way to directly interact with the X server's video mode settings. Historically, it was more commonly used before the widespread adoption of graphical display configuration tools. Its purpose was to give users and administrators low-level control over screen resolutions and refresh rates. While GUI tools are more prevalent now, xsetmode remains valuable in environments where precise scripting or configuration of display settings is needed or where a graphical interface is not available.

SEE ALSO

xrandr(1), xvidtune(1), xdpyinfo(1)

Copied to clipboard