Privacy option?



I usually enable the privacy option on GUI desktop systems / file managers, which prevents them from keeping a menu of recently accessed files and directories, because I find the feature more troublesome than useful.

In plain Bash terminals instead I use a "private window" concept, borrowed from web browsers. Whenever I'm about to work on private data I type 'unset HISTFILE', after which all following commands typed into that window won't be saved in .bash_history

Is there a similar option for mc? Either a global option to avoid saving activity history (such as recently accessed files, directories, and commands) or a temporary switch akin to "private window"?

Otherwise, has anybody come up with some hook or script to do that?

I took a look at the files kept by mc and I found the following:

~/.local/share/mc/history
~/.local/share/mc/filepos
~/.cache/mc/Tree

The first is the most troublesome file. I only want to keep the [user-fmt-input] and [mini_input] sections there (which are really configuration history, rather than activity history) and get rid of everything else. The second file contains activity history of recently edited files and the third contains the directories browsed using Tree view, so they need to go as well.

I just cleaned up those three files and gave them root:root 644 permissions, which seems to be doing the trick: it keeps them read-only with no visible error message. But I'm wondering if there's a better option out there.

Toby


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]