You are not logged in.
How do I do it? No matter if I want to change files in Midnight Commander and save it with nano command, or put something up in crontab with nano.
"Do not judge me by my successes, judge me by how many times I fell down and got back up again." - Nelson Mandela
Offline
for cli applications like MC, environment variables can be used to set such things, see https://wiki.archlinux.org/index.php/En … t_programs
For graphical applications things are more complicated, https://wiki.archlinux.org/index.php/De … plications
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
mc also defaults to it's internal editor which you'll have to uncheck in the config dialog.
Online
or set mc default editor to nano
ezik
Offline
Or modify mc.ext with the following at the end of the file...
# Default target for anything not described above
default/*
Open=
View=
Edit=nano
Last edited by archimboldo (2021-02-01 18:03:24)
Rules for problems.
Everyone has problems. Animals have problems. And buildings. And cats, and trees.
Problems are your friends. Treat them well.
Offline
Can it not be done by inserting the following in etc/profile
export VISUAL="nano"
export EDITOR="nano"
so the file looks like this
# /etc/profile
# Set our umask
umask 022
# Append "$1" to $PATH when not already in.
# This function API is accessible to scripts in /etc/profile.d
append_path () {
case ":$PATH:" in
*:"$1":*)
;;
*)
PATH="${PATH:+$PATH:}$1"
esac
}
# Append our default paths
append_path '/usr/local/sbin'
append_path '/usr/local/bin'
append_path '/usr/bin'
# Force PATH to be environment
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Unload our profile API functions
unset -f append_path
# Source global bash config, when interactive but not posix or sh mode
if test "$BASH" &&\
test "$PS1" &&\
test -z "$POSIXLY_CORRECT" &&\
test "${0#-}" != sh &&\
test -r /etc/bash.bashrc
then
. /etc/bash.bashrc
fi
export VISUAL="nano"
export EDITOR="nano"
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
"Do not judge me by my successes, judge me by how many times I fell down and got back up again." - Nelson Mandela
Offline
That's what you'd want to do yes. You just have to additionally disable the internal editor as otherwise mc doesn't check those variables.
Offline