You are not logged in.

#1 2013-08-23 09:56:24

Ruli
Member
Registered: 2011-10-08
Posts: 14

Commands in .xinitrc sometimes not called

Hello all,

I am trying to configure my Thinkpad trackpoint for scrolling as described at http://www.thinkwiki.org/wiki/How_to_co … TrackPoint, so I have edited my .xinitrc file as follows:

#!/bin/sh

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources

# Trackpoint scrolling
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Timeout" 200
xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Axes" 6 7 4 5

exec i3

However, I notice that sometimes the xinput set-prop commands work, sometimes they don't, and I have to manually call xinput set-prop from a terminal. I estimate for every 10 times I boot into my laptop, it happens around twice.

Any ideas on why this is happening, and what I could do to solve this issue?

Thanks in advance!

Offline

#2 2013-08-23 10:29:19

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Commands in .xinitrc sometimes not called

Sounds like a race condition. I would use instead:

( sleep 10 && /home/myusername/bin/setmouse) &

And put those xinput lines into that new script (don't forget to chmod +x).

I would also add to the top:

export DISPLAY=":0.0"

Offline

#3 2013-08-30 04:08:00

Ruli
Member
Registered: 2011-10-08
Posts: 14

Re: Commands in .xinitrc sometimes not called

Dear brebs,

Many thanks for the suggestion, I have added it to my .xinitrc and it seems to have done the trick so far!!

Thanks again.

Offline

Board footer

Powered by FluxBB