Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between xorg.conf, xset and xinput set?

Tags:

linux

xorg

I don't understand why with xset and xorg.conf there are two things with exactly the same purpose but totally different options? Why are there two and not one? Why can't their parameters have the same names? And even in xorg.conf itself there are multiple options with different names and the same effect. Why is that so chaotic?

For example I can deactivate my mouse acceleration in xorg.conf with

Option "AccelerationProfile" "-1"

or with

xset m 0 0

I use Arch Linux with Gnome 3 and Linux Kernel 3.0.26-1-lts.

like image 812
Konrad Höffner Avatar asked Apr 16 '12 11:04

Konrad Höffner


People also ask

What is xorg conf used for?

The file xorg. conf is a file used for configuring the X.Org Server. While typically located in /etc/X11/xorg. conf, its location may vary across operating system distributions (See manual, "man xorg.

Where is xorg conf d?

These files are found in the following directory: /usr/share/X11/xorg. conf. d The xorg.

What is XORG in Linux?

Description. Xorg is a full-featured X server that was originally designed for Unix and Unix-like operating systems, such as Linux, running on Intel x86 hardware. It now runs on a wider range of platforms.


2 Answers

The xorg.conf file is used to set the configuration that will be in place when you start X. After you start X, changing xorg.conf won't make any difference (unless you restart X, but that requires a log out).

The xset and xinput commands are used to change the configuration after you start X. This means that even though there's a default option inside xorg.conf, you (or your toolkit) can change this default at run-time. You can keep changing your options without the need to log out.

That explained the difference between xorg.conf and the runtime apps (like xset and xinput). The difference between xset and xinput is written in xset's manpage:

The setting is applied to  all  connected  pointing
devices.  xinput(1)  should be used if you need device-specific
settings.

You mention that in xorg.conf there are multiple options with different names and the same effect. I'd like to see an example. I know some options have some "intersection", but they are usually meant for different purposes.

like image 179
pzanoni Avatar answered Oct 10 '22 12:10

pzanoni


xorg.conf is really a legacy configuration system which has been around for ever. The downside of it is that you have to restart X for the settings to take effect. However it's well integrated in the X server and relatively easy to add new settings to.

But current day X developers tend to prefer interfaces that permit changing X settings on the fly while X is running. That generally requires creation of APIs/protocols and X extensions to implement an interface that can be used from userspace. xinput, xrandr, xset, and so on are all examples of this type of on-the-fly customization.

like image 29
bryce Avatar answered Oct 10 '22 11:10

bryce