* false udev event
@ 2010-11-20 18:22 J. Bakshi
2010-11-21 14:27 ` Phillip Susi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: J. Bakshi @ 2010-11-20 18:22 UTC (permalink / raw)
To: linux-hotplug
Hello list,
I have a strange problem of triggering false udev event !!
Here is my rule sets to active/in-active touchpad based on the presence of usb mouse
````````````````````````````````````
ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/joy/.Xauthority" RUN+="/usr/bin/synclient TouchpadOff=1", RUN+="/bin/su joy -c 'DISPLAY=:0.0 notify-send %k; killall syndaemon ' "
ACTION="remove", SUBSYSTEM="input", ENV{ID_CLASS}="mouse" RUN+="/usr/bin/synclient TouchpadOff=0", RUN+="/bin/su joy -c 'DISPLAY=:0.0 notify-send %k ; syndaemon -t -k -i 3 -d' "
````````````````````````````
But when I start my machine, the rules actually behaves opposite. i.e. it disable touchpad and with *no mouse attached* !!! I face the same when the PC alive from hibernation. How to fix this false event ?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: false udev event
2010-11-20 18:22 false udev event J. Bakshi
@ 2010-11-21 14:27 ` Phillip Susi
2010-11-21 15:53 ` J. Bakshi
2010-11-21 19:12 ` Phillip Susi
2 siblings, 0 replies; 4+ messages in thread
From: Phillip Susi @ 2010-11-21 14:27 UTC (permalink / raw)
To: linux-hotplug
On 11/20/2010 01:10 PM, J. Bakshi wrote:
> ````````````````````````````````````
> ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/joy/.Xauthority" RUN+="/usr/bin/synclient TouchpadOff=1", RUN+="/bin/su joy -c 'DISPLAY=:0.0 notify-send %k; killall syndaemon ' "
This rule is fundamentally broken. You are explicitly setting the
environment to point to your .Xauthority file and the first instance of
an X server, which of course, assumes that you are logged into that X
instance at the time. When this rule is processed, that is almost
certainly not going to be true.
It also will run repeatedly for every input device in the system. Maybe
you meant ENV{ID_CLASS}="mouse" instead of ENV{ID_CLASS}="mouse"?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: false udev event
2010-11-20 18:22 false udev event J. Bakshi
2010-11-21 14:27 ` Phillip Susi
@ 2010-11-21 15:53 ` J. Bakshi
2010-11-21 19:12 ` Phillip Susi
2 siblings, 0 replies; 4+ messages in thread
From: J. Bakshi @ 2010-11-21 15:53 UTC (permalink / raw)
To: linux-hotplug
On Sun, 21 Nov 2010 09:27:21 -0500
Phillip Susi <psusi@cfl.rr.com> wrote:
> On 11/20/2010 01:10 PM, J. Bakshi wrote:
> > ````````````````````````````````````
> > ACTION="add", SUBSYSTEM="input", ENV{ID_CLASS}="mouse", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/joy/.Xauthority" RUN+="/usr/bin/synclient TouchpadOff=1", RUN+="/bin/su joy -c 'DISPLAY=:0.0 notify-send %k; killall syndaemon ' "
>
> This rule is fundamentally broken. You are explicitly setting the
> environment to point to your .Xauthority file and the first instance of
> an X server, which of course, assumes that you are logged into that X
> instance at the time. When this rule is processed, that is almost
> certainly not going to be true.
>
> It also will run repeatedly for every input device in the system. Maybe
> you meant ENV{ID_CLASS}="mouse" instead of ENV{ID_CLASS}="mouse"?
>
OH! Now I get the point. Thanks a lot for pointing it out. many many thanks. Can you suggest any modification ?
yes it is ENV{ID_CLASS}="mouse"
Thanks
--
_____________________________________________________________________________
"Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs and the universe trying to produce
bigger and\better idiots. So far, the universe is winning."
::::::Richard Cook
_____________________________________________________________________________
***************************************************************************************
Disclaimer : The information contained in this Message is confidential and
intended only for the use of the individual or entity identified. If the
reader of this message is not the intended recipient, any dissemination,
distribution or copying of the information contained in this message is
strictly prohibited. If you received this message in error, please notify the
sender immediately
***************************************************************************************
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: false udev event
2010-11-20 18:22 false udev event J. Bakshi
2010-11-21 14:27 ` Phillip Susi
2010-11-21 15:53 ` J. Bakshi
@ 2010-11-21 19:12 ` Phillip Susi
2 siblings, 0 replies; 4+ messages in thread
From: Phillip Susi @ 2010-11-21 19:12 UTC (permalink / raw)
To: linux-hotplug
On 11/21/2010 10:53 AM, J. Bakshi wrote:
> OH! Now I get the point. Thanks a lot for pointing it out. many many thanks. Can you suggest any modification ?
This is not a job for udev at all. You might try using your .xinitrc or
something.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-21 19:12 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-20 18:22 false udev event J. Bakshi
2010-11-21 14:27 ` Phillip Susi
2010-11-21 15:53 ` J. Bakshi
2010-11-21 19:12 ` Phillip Susi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).