On Mon, Sep 17, 2012 at 3:22 PM, Arun Khan <knu...@gmail.com> wrote: > On Sun, Sep 16, 2012 at 8:47 PM, Saurabh Shandilya > <saurabhshandilya.1...@gmail.com> wrote: > > hello experts, > > I am been no means an expert on udev stuff. > > > I am kindof stuck at a point, and really need your help. > > > > I wrote a simple rule for my udev, which is as follows, > > KERNEL=="sd?", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="xxxx", > > ATTRS{serial}=="-----", SYMLINK+="mydrive", RUN+="/home/beyond/runn.sh" > > > > & > > > > runn.sh is as follows: > > #!/bin/sh > > echo "it is being executed" > > echo "writing to file" > /home/beyond/Downloads/abc.txt > > /home/beyond/myfile > > echo "done" > > > > > > Whenever I inserts my pandrive, I got the abc.txt file in my folder, but > > not able to get the display of the echo lines and also I am not able to > > execute any other C program using this script. > > > > The udev stuff happens in the background (daemon) so the std out/err > goes to the log (if configured). Try for each echo line: > > echo "blahh" 1> /some/file > > echo'ng data to a file is working.
> > Kindly tell and help me out, > > Udev is an user space process, so it executes the rules with super user > > rights?? > > Yes. > > > when the abc. txt file is executed, then why the echo commands are not > > displayed & actually where are they expected to be displayed? I mean what > > is the standard output of the echo command when such a file is executed? > > See above. > > > Also, the C program executable binary is not executed, ((myfile is a > simple > > opengl based green coloured window pop up)) > > Have you checked it's perms? > > You can also check the KDE code for the USB pop up window. > > its basically a opengl based simple window pop up only created using C and opengl libraries, Yes I have checked the perms. other programs like 'notify-send' are not working . I simply want to execute my C executable program. The problem was that the standard output is vague in this case so we have to log it, so I decided to execute some file on Usb event, any simple C or Qt based program, but nothing is being executed.. Is it something with the authorities of demon processes ?? > -- Arun Khan > > -- Arun > > _______________________________________ > Pune GNU/Linux Users Group Mailing List > -- Regards, saurabh shandilya http://about.me/shandilyasaurabh www.beyondszine.wordpress.com 9910118292 _______________________________________ Pune GNU/Linux Users Group Mailing List