I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
Just a guess - even when configuration changes on the disk, the already running instance (of the shell?) won't get updated. Assuming you use bash, can you just call new 'bash' after that to spring up a new instance which will correctly load the new settings, inside of the one you currently have? I guess "logging out and back again" usually solves stuff exactly because it means you will get a fresh new shell instance.
Michal
--
Michal Schorm Software Engineer Databases Team Red Hat
--
On Wed, Feb 26, 2025 at 11:43 PM Robert Moskowitz rgm@htt-consult.com wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
-- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On 2/26/25 6:02 PM, Michal Schorm wrote:
Just a guess - even when configuration changes on the disk, the already running instance (of the shell?) won't get updated. Assuming you use bash, can you just call new 'bash' after that to spring up a new instance which will correctly load the new settings, inside of the one you currently have? I guess "logging out and back again" usually solves stuff exactly because it means you will get a fresh new shell instance.
If I understand you correctly I should be able to just run "bash" within a terminal window and then vi will be called, rather than nano?
Well I tried the above and crontab -e still dropped into nano. Grumble. I HATE logging out. :)
--
On Wed, Feb 26, 2025 at 11:43 PM Robert Moskowitz rgm@htt-consult.com wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
-- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
$ set|grep nano EDITOR=/usr/bin/nano export EDITOR=/usr/bin/vi $ set|grep /vi EDITOR=/usr/bin/vi _=EDITOR=/usr/bin/vi
And "crontab -e" is using vi!
This only fixes the terminal session I am in, but that is OK for right now.
On 2/26/25 6:08 PM, Robert Moskowitz wrote:
On 2/26/25 6:02 PM, Michal Schorm wrote:
Just a guess - even when configuration changes on the disk, the already running instance (of the shell?) won't get updated. Assuming you use bash, can you just call new 'bash' after that to spring up a new instance which will correctly load the new settings, inside of the one you currently have? I guess "logging out and back again" usually solves stuff exactly because it means you will get a fresh new shell instance.
If I understand you correctly I should be able to just run "bash" within a terminal window and then vi will be called, rather than nano?
Well I tried the above and crontab -e still dropped into nano. Grumble. I HATE logging out. :)
--
On Wed, Feb 26, 2025 at 11:43 PM Robert Moskowitz rgm@htt-consult.com wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
-- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
On 2/26/25 4:20 PM, Joe Zeff wrote:
On 02/26/2025 04:08 PM, Robert Moskowitz wrote:
Well I tried the above and crontab -e still dropped into nano. Grumble. I HATE logging out. :)
Then don't. Just close that terminal and open a new one. That should be all you need.
It's set in the global /etc/profile.d, so that might not be enough. Try "bash -l".
On 26 Feb 2025 at 17:41, Robert Moskowitz wrote:
Date sent: Wed, 26 Feb 2025 17:41:56 -0500 To: Community support for Fedora users users@lists.fedoraproject.org From: Robert Moskowitz rgm@htt-consult.com Subject: Replacing nano with vim - logout needed? Send reply to: Community support for Fedora users users@lists.fedoraproject.org
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
-e Edits the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit from the editor, the modified crontab will be installed automatically.
tested with export EDITOR=geany cronttab -e Then used geany, so should work with vim
Could add export to your bashrc to setup on login
-- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
+------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mikes@guam.net mailto:msetzerii@gmail.com mailto:msetzerii@gmx.com Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+
On Wed, 2025-02-26 at 17:41 -0500, Robert Moskowitz wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
I've no idea what that does, but just installing that package is unlikely to affect anything that's already running. If you don't want to log out, try 'exec bash', which will re-initialize Bash within the same process and may have the desired effect.
poc
On 2/26/25 6:36 PM, Patrick O'Callaghan wrote:
On Wed, 2025-02-26 at 17:41 -0500, Robert Moskowitz wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
I've no idea what that does, but just installing that package is unlikely to affect anything that's already running. If you don't want to log out, try 'exec bash', which will re-initialize Bash within the same process and may have the desired effect.
$ set|grep -i editor EDITOR=/usr/bin/nano $ exec bash $ set|grep -i editor EDITOR=/usr/bin/nano
so "exec bash" does not change it.
vim-default-editor I picked up a lot of releases ago when Fedora moved to nano (or maybe it is Xfce) as the default editor to switch to vi.
Guess for now use the export command until my next logout which will probably be the next boot...
Seems to be set by this file. cat /etc/profile.d/nano-default-editor.sh # Ensure GNU nano is set as EDITOR if it isn't already set
if [ -z "$EDITOR" ]; then export EDITOR="/usr/bin/nano" fi
On 26 Feb 2025 at 17:41, Robert Moskowitz wrote:
Date sent: Wed, 26 Feb 2025 17:41:56 -0500 To: Community support for Fedora users users@lists.fedoraproject.org From: Robert Moskowitz rgm@htt-consult.com Subject: Replacing nano with vim - logout needed? Send reply to: Community support for Fedora users users@lists.fedoraproject.org
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
-- _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue
+------------------------------------------------------------+ Michael D. Setzer II - Computer Science Instructor (Retired) mailto:mikes@guam.net mailto:msetzerii@gmail.com mailto:msetzerii@gmx.com Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +------------------------------------------------------------+
Try "dnf remove nano-default-editor".
On 2/26/25 8:43 PM, Dave Close wrote:
Try "dnf remove nano-default-editor".
I think that is what allowerasing did...
dnf install vim-default-editor --allowerasing Updating and loading repositories: Fedora 41 - x86_64 - Updates 100% | 10.9 KiB/s | 15.5 KiB | 00m01s Repositories loaded. Package Arch Version Repository Size Removing dependent packages: nano-default-editor noarch 8.1-1.fc41 fedora 514.0 B Installing: vim-default-editor noarch 2:9.1.1122-1.fc41 updates 505.0 B
Transaction Summary: Installing: 1 package Removing: 1 package
Total size of inbound packages is 14 KiB. Need to download 14 KiB. After this operation, 9 B will be freed (install 505 B, remove 514 B). Is this ok [y/N]: y [1/1] vim-default-editor-2:9.1.1122-1.fc41.noarch 100% | 27.0 KiB/s | 14.3 KiB | 00m01s --------------------------------------------------------------------------------------------- [1/1] Total 100% | 9.7 KiB/s | 14.3 KiB | 00m01s Running transaction [1/4] Verify package files 100% | 66.0 B/s | 1.0 B | 00m00s [2/4] Prepare transaction 100% | 1.0 B/s | 2.0 B | 00m02s [3/4] Installing vim-default-editor-2:9.1.1122-1.fc4 100% | 12.4 KiB/s | 1.2 KiB | 00m00s [4/4] Removing nano-default-editor-0:8.1-1.fc41.noar 100% | 2.0 B/s | 5.0 B | 00m02s Complete!
Am 26.02.2025 um 23:41 schrieb Robert Moskowitz rgm@htt-consult.com:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?
The editor to use is specified in the EDITOR environment variable. It is set by executing /etc/profile when you open a new login ter
I guess, you still get: […]$ env | grep EDITOR EDITOR=/usr/bin/nano
You can try
[…]$ . /etc/profile
(it „sources" the initial profile again) But I guess, the script sets the variable only if it is undefined.
So you have to add to your
[…]$ vim ~/.bashrc
A line like
export EDITOR="/usr/bin/vim“
At the end of the file and then source this file
[…]$ . ~/.bashrc
Afterwards a
[…]$ env | grep EDITOR
Should get you a
EDITOR=/usr/bin/vim
— Peter Boy https://fedoraproject.org/wiki/User:Pboy PBoy@fedoraproject.org
Timezone: CET (UTC+1) / CEST (UTC+2)
Fedora Server Edition Working Group member Fedora Docs team contributor and board member Java developer and enthusiast
System did not recover from suspend and had to cold start. As expected, default editor is not as I want it:
set|grep "/vi" EDITOR=/usr/bin/vim
First reboot since the initial one after install!
On 2/26/25 5:41 PM, Robert Moskowitz wrote:
I ran:
dnf install vim-default-editor --allowerasing
But I am still getting nano when I try to "crontab -e"
Do I have to logout and back in for this change to take? Or is there an easier way?