
Photo by Ilya lix on Unsplash
Configuring X Window input and output devices
Tailor-Made
An X Window System provides several components to allow users to interact with a graphical interface. An X server lets applications, also known as X clients, use a graphical display within windows. The window manager determines the look and feel of such an interface, as well as takes care of how the windows are handled (e.g., enlarging, reducing, or closing them). A desktop manager, which is ultimately responsible for bringing order to this kind of graphical interface, displays icons, menus, panels, and other elements on the desktop.
Even though various graphical tools exist to optimally adapt your existing hardware to the X Window System, you can also do this from a terminal using command-line tools. You simply need to use the right tool to make the setting you need. In this article, I will show how to adjust some typical display settings from the terminal using xandr
and xinput
.
Setting up the Display
One problem that occurs time and time again relates to the correct display resolution. If you use several monitors or also use a projector, it is often difficult to determine the correct order of the devices so that you can use a mouse to easily switch between the windows of the different devices. You may also need to rotate the image shown on a display – for instance, if you have installed a projector upside down on the ceiling or want to use a monitor in portrait mode. To solve all of these problems, you can use the xrandr
tool.
With xrandr
, you can configure the X Window System's Resize and Rotate (RandR) extension to adjust the main window, which the X clients use for display purposes, to suit your needs. Using xrandr --listmonitors
gives you an overview of all the monitors connected to the system and their current configurations:
xrandr --listmonitors Monitors: 3 0: +*eDP-1...
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.
