LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2011, 09:23 AM   #1
sarangshinde
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Question 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++.
 
Old 03-27-2011, 11:53 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 03-28-2011, 01:19 AM   #3
sarangshinde
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 03-29-2011, 11:08 AM   #4
sarangshinde
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
please help me i m waiting for your help
 
Old 03-29-2011, 11:50 AM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

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


Cheers,
Tink
 
Old 03-30-2011, 10:23 AM   #6
sarangshinde
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
ok can u tell me how can i control the window close event in linux using c++.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Pen Drive not detected in Linux (suse & Ubuntu) working fine in windows XP Ayyappan Linux - Newbie 9 02-22-2012 09:43 AM
[SOLVED] Pen Drive not detected in RHEL 5?? ashok.g Linux - Hardware 3 02-02-2010 02:07 AM
Pen drive not detected ubuntu gauravdott Debian 10 05-11-2009 02:35 AM
pen drive not detected in centos karthik.c Linux - Hardware 1 05-09-2009 04:00 AM
Pen Drive is not detected PankajDS Linux - General 1 02-16-2008 10:53 PM


All times are GMT -5. The time now is 08:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration