User avatar
Cr4z33
Posts: 25
Joined: Fri Oct 12, 2018 3:30 pm

A command is executed whenever I open the Terminal window

Thu Feb 28, 2019 3:44 pm

Last week I was trying different methods to run a command to turn the TV on at Pi start, but now that I am done with a working solution I noticed a problem.

Whenever I open a Terminal window the same command I am currently using with a script is executed automatically and I have no clue on how to get rid of it. :evil:

Where shall I start looking?

User avatar
scruss
Posts: 2572
Joined: Sat Jun 09, 2012 12:25 pm
Location: Toronto, ON
Contact: Website

Re: A command is executed whenever I open the Terminal window

Thu Feb 28, 2019 3:59 pm

You probably edited your .bashrc, .profile or .bash_profile files. If the command you don't want to run is command, try

Code: Select all

grep command ~/.*
and you'll get a list of matches with the filename first in the line.
‘Remember the Golden Rule of Selling: “Do not resort to violence.”’ — McGlashan.

User avatar
Cr4z33
Posts: 25
Joined: Fri Oct 12, 2018 3:30 pm

Re: A command is executed whenever I open the Terminal window

Thu Feb 28, 2019 4:09 pm

Thanks that did the trick! :mrgreen:

As soon as I looked into /home/pi/.bashrc I found the command and removed it.

Return to “Troubleshooting”