LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   runing ./a.out or any file when pen drive is detected to PC in linux (https://www.linuxquestions.org/questions/linux-newbie-8/runing-a-out-or-any-file-when-pen-drive-is-detected-to-pc-in-linux-871277/)

sarangshinde 03-27-2011 09:23 AM

runing ./a.out or any file when pen drive is detected to PC in linux
 
hello,
i want to make a program in c++ in linux, such that when i
attach my pen drive to linux PC it must run any file specified by me.
Just i was searching for this problem i see the udev concept
can u tell me how can do this in c++.

Tinkster 03-27-2011 11:53 AM

Hi, welcome to LQ!

And thank God you can't ... whatever you write, it needs to
be tied in w/ udev on the receiving machine, which you hopefully
won't have access to. autorun is a crime against humanity.



Cheers,
Tink

sarangshinde 03-28-2011 01:19 AM

so,can you tell me how can i run a specific file when my pendrive is attached its needed for my project in which i m trying to provide security in which when pen drive is attached i will ask the user to enter a username and password this is because
i can keep track of users.
so please help me.

sarangshinde 03-29-2011 11:08 AM

please help me i m waiting for your help

Tinkster 03-29-2011 11:50 AM

What are you trying to achieve w/ this? In terms of security, what
do you gain?


Cheers,
Tink

sarangshinde 03-30-2011 10:23 AM

ok can u tell me how can i control the window close event in linux using c++.


All times are GMT -5. The time now is 01:48 AM.