Linux Hotplug development
 help / color / mirror / Atom feed
From: "J. Bakshi" <j.bakshi@unlimitedmail.org>
To: linux-hotplug@vger.kernel.org
Subject: [ solved] Re: udev rules behaves opposite when executing startx
Date: Sat, 06 Nov 2010 14:23:20 +0000	[thread overview]
Message-ID: <201011061411.oA6EB8Pp029011@dcnode-01.unlimitedmail.net> (raw)

On Fri, 5 Nov 2010 10:03:41 +0530
"J. Bakshi" <j.bakshi@unlimitedmail.org> wrote:

> 
>    Any clue please ??
> 
> 
> On Thu, 4 Nov 2010 14:15:01 +0530
> "J. Bakshi" <j.bakshi@unlimitedmail.org> wrote:
> 
> > On Thu, 4 Nov 2010 10:07:41 +0530
> > "J. Bakshi" <j.bakshi@unlimitedmail.org> wrote:
> > 
> > > 
> > > Hello list,
> > > 
> > > Here is my udev rules which disable touchpad when I plug my usb external mouse, and enable it again, when removing the mouse 
> > > 
> > > ```````````````````
> > > ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/user1/.Xauthority"  RUN+="/usr/bin/synclient TouchpadOff=1", RUN+="/bin/su user1 -c 'DISPLAY=:0.0 notify-send %k ' "
> > > 
> > > ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse"  RUN+="/usr/bin/synclient TouchpadOff=0", RUN+="/bin/su user1 -c 'DISPLAY=:0.0 notify-send %k ' "
> > > ``````````````````````````````
> > > 
> > > The rules is running well within X. But only when I start my WM with startx , then the rules behaves opposite. With no mouse attached , the touchpad is still inactive. Though by pluging/unpluging the mouse, the rules start working normally. I don't understand why startx makes the rules behave so. Could anyone give me any clue please ? 
> > > 
> > > Thanks
> > > --
> > 
> > I wonder, if there is any alternative to disable/enable the touchpad, irrespective of DISPLAY ( i.e. ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/user1/.Xauthority" ). Hence the rules will work well whenever it detects the mouse, in X and in console.
> > 
> >
> 

Solved :-)  the hitch is some where else. For those facing the same; actually touchpad driver is loaded twice. 

``````````````````
(**) SynPS/2 Synaptics TouchPad: Applying InputClass "evdev touchpad catchall"
(**) SynPS/2 Synaptics TouchPad: Applying InputClass "touchpad catchall"
``````````````````````

Adding  [  MatchDevicePath "/dev/input/event*" ]  at /usr/share/X11/xorg.conf.d/50-synaptics.conf has solved this. This option ensures the driver loading only once.

Thanks


                 reply	other threads:[~2010-11-06 14:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201011061411.oA6EB8Pp029011@dcnode-01.unlimitedmail.net \
    --to=j.bakshi@unlimitedmail.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox