5

It used to be that you could make a file ~/.xinput.d/en_US and put xinput commands in there, such as enabling drag lock. Now, for some reason, in 13.04 this does not work. Anyone know why this changed, and how to set these? I suppose I could just put the xinput commands in a script file and have it execute upon login. I'm just wondering why the old method stopped working.

EDIT:

Current file /etc/X11/xinit/xinput.d/en_US:

xinput set-prop 17 316 1
xinput set-prop 17 317 350

But I've realized that for some reason, the touchpad ID changes. Right now it's 15. Also, the actual properties such as "Drag Lock" can change. So this method doesn't work.

Braiam
  • 66,947
  • 30
  • 177
  • 264
CaptSaltyJack
  • 1,304
  • 3
  • 14
  • 26

2 Answers2

2

It should work if you put the file in /etc/X11/xinit/xinput.d

I guess the default xinput.d no longer sources the ~/xinput.d.

Seth
  • 57,282
  • 43
  • 144
  • 200
Kevin
  • 961
  • 8
  • 15
  • That doesn't work either. Does this have to do with the move away from Xorg and to whatever X manager Ubuntu uses now? – CaptSaltyJack Aug 12 '13 at 20:19
  • Many packages place files there, but im not sure how `xinput.d` is called. I assume you have the default _lightdm_ display manager instaled? Perhaps it has something to do with it. Furthermore, you could try `/etc/X11/xinit/xinitrc.d/xinput.sh` – Kevin Aug 13 '13 at 02:42
1

The /etc/X11/xinit/xinput.d directory is used by im-config since im-config is:

set up input method configuration for X Window System

This allows you to select an input method, by running the scripts saved in /etc/X11/xinit/xinputrc . Hence it should be installed for it to work. Then you can configure system wide or user preferences using the /etc/X11/xinit/xinputrc or ~/.xinputrc. For the xinput.d replacement, I would go for the system wide /etc/X11/xinit/xinput.d/ since it's already there.

I don't see any relevant change in any of the sources for xorg or im-config that suggest that ~/.xinput.d won't work. You should also check that the xinput package is installed, so xinput set-props can work.

Braiam
  • 66,947
  • 30
  • 177
  • 264
  • ARGH. The ID# for the touchpad keeps changing every time I reboot, so this method won't work anymore. I'll have to write a shell script that runs, figures out the proper IDs, and runs xinput. – CaptSaltyJack Aug 13 '13 at 18:16
  • 1
    @CaptSaltyJack `xinput set-prop $(xinput list | grep MOUSE | awk '{print $6}' | sed s/id=//) 316 1` ? – Braiam Aug 13 '13 at 18:24
  • Well, the prop ID 316 also changes. But yes, another call to "xinput list-props" would work too. – CaptSaltyJack Aug 13 '13 at 18:29
  • Not quite the solution I was hoping for, but awarding the bounty since you've put the time/effort into this. Thanks! – CaptSaltyJack Aug 13 '13 at 18:30
  • Oh wait, one more Q. Where do I put the xinput script so that it executes when Ubuntu boots and X11 is running? I only know about ~/.bashrc and ~/.profile. – CaptSaltyJack Aug 13 '13 at 18:32
  • Ah ok, so im-config just invokes ~/.xinputrc as a shell script call. Got it, thanks! :) – CaptSaltyJack Aug 13 '13 at 20:06