LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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-09-2015, 04:28 AM   #1
KansaiRobot
Member
 
Registered: Dec 2013
Location: Japan
Distribution: Debian...very few times Ubuntu
Posts: 51

Rep: Reputation: 0
programs to be run on boot (and other events)


Hello everybody and thanks always for the help

I think the question I am about to ask is very beginners like, so I would appreciate the help.

I know (although I don't remember right now) there is a way to run a program on boot. I think it involves rc.local (correct me if I am wrong) I think you can put there the processes that you want to be run everytime linux is rebooted.

My question is, what should I do if I want a program to be run everytime some other event happen? For example (and in concrete) I am using a camera connected to my linux system and I want a program to run everytime I unplug and replug the camera through the USB port.

Can someone share his/her knowledge with me on this point

Thanks a thousand
 
Old 03-09-2015, 04:38 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
In udev using systems each plug/unplug of camera produces a kernel event and udev is notified and it takes whatever action it is configured to do.

So you have to configure udev rules in /lib/udev/rules.d or /etc/udev/rules.d appropriately. Rean man pages of udev.conf, udevadm.

Questions like this have been previously posted; search keywords 'udev.conf', 'rules.d', 'event'. Do a search of LQ.
 
  


Reply



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
several issues, sound not working, gslapt won't run, need to execute programs on boot nerdman978 Slackware 6 06-01-2008 07:07 PM
Adding programs to run during boot time JonnyW247 Linux - Software 1 02-05-2006 03:52 PM
Run Programs at System Boot Mephator Slackware 2 01-23-2006 08:29 PM
Boot liveCD run hda2's programs e.g. firefox sword suguru Linux - Software 0 08-21-2004 04:47 PM
Controlling what programs run after boot.. Linux~Powered Linux - Software 1 02-16-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:44 AM.

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
Open Source Consulting | Domain Registration