LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
LinkBack Search this Thread
Old 10-24-2011, 04:04 AM   #1
indiajoe
Member
 
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84

Rep: Reputation: 21
Red face How to find which process started a daemon process in autostart?


Hi,
When I installed dropbox it installed a proprietary daemon software. Now each time I login, it automatically starts. (I can see it running by the ps -ef command)
Is there any way to find out how it is starting up at each login? So that i can prevent it from starting automatically.
I used KDE 3.5 (recently forked as Trinity).
This daemon is not in my .bashrc, nor in .kde3/Autostart directory.
But I know it is started by some script in my home directory. Because I installed the software as user.
I can try manual kill of the daemon, but i would like to get a better solution to prevent this proprietary software from auto starting without my permission.
Thanking you,
indiajoe
 
Old 10-24-2011, 04:58 AM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 206Reputation: 206Reputation: 206
How about this:

Code:
pid=$(pgrep proprietary-daemon)
# get the PPID and then name for PPID
ps -o comm= -p $(awk '{ print $4 }' /proc/$pid/stat)

Last edited by jhwilliams; 10-24-2011 at 05:10 AM.
 
1 members found this post helpful.
Old 10-24-2011, 03:48 PM   #3
indiajoe
Member
 
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84

Original Poster
Rep: Reputation: 21
@jhwilliams: Thankyou verymuch, I didn't know every PID has a stat file in /proc

In this case of dropbox your commands gave me 'init' as output.
So does it mean the dropbox is getting started by init itself when i boot?
I am really surprised how a software installed as user can modify the things init does.

-cheers
indiajoe
 
Old 10-24-2011, 05:16 PM   #4
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 206Reputation: 206Reputation: 206
I would guess there is an initrc script in /etc/init.rc ?

Are you sure you didn't install with sudo?
 
Old 10-25-2011, 02:19 AM   #5
indiajoe
Member
 
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84

Original Poster
Rep: Reputation: 21
I monitored 'ps -ef' as another user just after booting up. Then the dropbox daemon was not running. So it is getting started when i login as myself.
The user id of the command which started it was my id only, not root.
From the PID of the process, I can see that it was started after my Firefox. (I never close Firefox while rebooting, so it starts automatically in each login with previous session)
So i suspect the dropbox is also getting started by the kde along with the other software which were running in previous session.
Where does kde save all the list of programs to restart while rebooting?


PS: Since I use Porteus (a modified version of slackware), i don't have sudo command.

Thanking you,
-indiajoe
 
  


Reply

Tags
autostart, daemon


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to known when a process was started ? marozsas Linux - General 8 01-07-2010 07:17 AM
How to find the process ID of process executing in the background akeneche Linux - Newbie 1 01-03-2008 10:08 AM
[SOLVED] what/who started that process unkie888 Linux - General 2 11-05-2007 08:05 AM
daemon process mallikk_in Linux - Networking 4 05-09-2007 08:49 AM
howto monitor process and autostart if killed houssamfarag Red Hat 1 12-23-2005 10:02 AM


All times are GMT -5. The time now is 09:07 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration