Reputation: 11120
Running Ubuntu 14.04, and I have a script that is being run automatically when I boot the machine. For the life of me, I can't remember how or where I did this.
I already checked:
It's a script of my own, so it's not some kind of malicious virus or malware or anything. I just can't remember how I did this, and would like to know.
It has a distinct name, e.g. like ~/MyScriptXYZ.sh so I could search for that, IF I know how or where..?? (I'm a novice linux user)
Upvotes: 0
Views: 3106
Reputation: 11
So I stumbled across this question and I managed to solve it for myself: I was using Ubuntu (chroot) through the Linux Deploy Android app and I also couldn't find it. So to make the answer complete: Use pstree to locate and trace what is currently running and see where it's originating from.
Following Basile Starynkevitch's advice I managed to solve it by going to: /home/[user]/.config/lxsession/LXDE/autostart and find it the code I added a while ago.
Upvotes: 1
Reputation: 931
A few other places you can look:
crontab -e
as your own user and as root (local user crontab)
/etc/profile.d/
or /etc/profile
~/.profile
~/.bashrc
The last ditch attempt you can do is to cd / && grep -R "MyScriptXYZ"
as root - this will take a while but will search all files on your computer for that reference :)
Upvotes: 2