[xserver: PATCH] config/udev: allow passing arbitrary configuration via 'ENV{x11_options.$opt}'

Peter Hutterer peter.hutterer at who-t.net
Sun Jun 17 19:06:31 PDT 2012


On Mon, Jun 18, 2012 at 01:14:00AM +0300, Sergei Trofimovich wrote:
> It is convenient to play with mouse/touchpad changes at runtime.
> 
>     ENV{ID_INPUT_MOUSE}=="?*", ENV{x11_options.Emulate3Buttons}="True"
>     # replug the revice to see immediate effect
> 
> and consistent with hal's configuration scheme.
> 
> Original-patch: http://lists.debian.org/debian-x/2010/04/msg00320.html
> Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>

no, sorry. it was a conscious decision to not add this option when we merged
udev/xorg.conf.d in 1.8.
http://lists.x.org/archives/xorg-devel/2009-October/002859.html
The main argument is that xorg configuration should be stored in xorg, not
in other projects. When we used HAL we did it that way because we lacked
xorg.conf.d support but it wasn't particularly good idea and we did cop a
lot of flak for it.

for run-time changes you can use xinput, synclient, xsetwacom or other
tools, but persistent storage is in xorg.conf(.d) only.

Cheers,
  Peter

> ---
>  config/udev.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/config/udev.c b/config/udev.c
> index 1995184..35f682f 100644
> --- a/config/udev.c
> +++ b/config/udev.c
> @@ -37,6 +37,8 @@
>  #include "os.h"
>  #include "globals.h"
>  
> +
> +#define UDEV_X11_PROP_KEY "x11_options."
>  #define UDEV_XKB_PROP_KEY "xkb"
>  
>  #define LOG_PROPERTY(path, prop, val)                                   \
> @@ -173,6 +175,10 @@ device_added(struct udev_device *udev_device)
>              else if (!strcasecmp(tmp, "options"))
>                  input_options =
>                      input_option_new(input_options, "xkb_options", value);
> +        } else if (!strncasecmp(key, UDEV_X11_PROP_KEY, sizeof(UDEV_X11_PROP_KEY) - 1)) {
> +            tmp = key + sizeof(UDEV_X11_PROP_KEY) - 1;
> +            input_options =
> +                input_option_new(input_options, tmp, value);
>          }
>          else if (!strcmp(key, "ID_VENDOR")) {
>              LOG_PROPERTY(path, key, value);
> -- 
> 1.7.8.6
> 


More information about the xorg-devel mailing list