Random cd and clear commands in my yakuake terminal that I did not run

I have been noticing that when I open my yakuake terminal to update Manjaro, some commands like cd to certain folders and clear have been run in my terminal withouth me executing them.

How can this be explained? Virus, hacker?

Do I need to protect my system?

Regards

This may indeed happen if you've used the built-in terminal in Dolphin, and it did also for a while happen after using Octopi. It shouldn't ─ and there's a way to prevent that from happening ─ but out-of-the-box, it does, unfortunately.

The shell normally does not append commands that start with a space to the command history ─ the cd commands used by Dolphin are prefixed with a space ─ but apparently Manjaro does not enable this filtering by default. Perhaps this is something to be considered for the future install images ─ pinging @philm.

Here's how to avoid it... Edit your ~/.bash_profile and make sure you add the following...

HISTCONTROL=ignoreboth:erasedups
HISTSIZE=1000
HISTIGNORE='[ \t]*:cd /:export TERM=xterm:clear:sudo /usr/lib/octopi/octopi-helper -t:bash -c "/tmp/.qt_temp_octopi_*"'
export HISTCONTROL HISTIGNORE HISTSIZE

In order to clean out your Bash command history, issue the following command...

history -c && > ~/.bash_history
1 Like

So, to be clear, this is the system running these commands. Nothing to do with an external factor rather than normal procedures of the system?

Oh, and I only use the Yakuake terminal, so no Dolphin or Octopi terminal used here

Yes, that is correct.

It could also come from installing third-party software, such as certain packages from the AUR, or perhaps something installed through Snap or FlatPak.

Thank you very much for your help!
I will procede with the bash configuration you recomended!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by