How to change Midnight Commander cache directory in Raspbian
by dracolich from LinuxQuestions.org on (#5C9G3)
Greetings, LQ. I hope this is the appropriate forum for this topic since there isn't a dedicated subforum for Raspbian. I have searched here and Google many times for this but haven't found a solution yet.
When I login to my raspberry pi, which runs Raspbian Buster, I can use mc as the pi administrator account but not any other user account. When trying to run mc as another user the error is
Code:Cannot create /dev/shm/.cache/mc directorymc -F for both users shows
Code:Cache directory: /dev/shm/.cache/mc/but mc -F on my Slackware desktop and Debian laptops, where mc works fine, shows ~/.cache/mc
In Raspbian the /dev/shm/.cache and /dev/shm/.cache/mc directories are owned by pi : pi with permissions 700. In the /dev/shm/.cache/mc directory is a Tree file owned by pi : pi with permissions 644.
I have browsed ~/.config/mc/ini but cannot find a setting to change the cache directory for users; and I have explored /etc/mc, and /usr/share/mc but cannot find anywhere to change the default cache directory.
Is it possible to change Midnight Commander's cache directory, or is it hardcoded into the executable? Would there be any harm/risk in changing the permissions on /dev/shm/.cache/mc?


When I login to my raspberry pi, which runs Raspbian Buster, I can use mc as the pi administrator account but not any other user account. When trying to run mc as another user the error is
Code:Cannot create /dev/shm/.cache/mc directorymc -F for both users shows
Code:Cache directory: /dev/shm/.cache/mc/but mc -F on my Slackware desktop and Debian laptops, where mc works fine, shows ~/.cache/mc
In Raspbian the /dev/shm/.cache and /dev/shm/.cache/mc directories are owned by pi : pi with permissions 700. In the /dev/shm/.cache/mc directory is a Tree file owned by pi : pi with permissions 644.
I have browsed ~/.config/mc/ini but cannot find a setting to change the cache directory for users; and I have explored /etc/mc, and /usr/share/mc but cannot find anywhere to change the default cache directory.
Is it possible to change Midnight Commander's cache directory, or is it hardcoded into the executable? Would there be any harm/risk in changing the permissions on /dev/shm/.cache/mc?