Description of problem: Nano should be the default editor in the whole Fedora 33: https://fedoraproject.org/wiki/Changes/UseNanoByDefault However, when reporting an anaconda crash from the text mode, "vi" is started instead. Here's a reproducer: https://fedoraproject.org/wiki/QA:Testcase_Anaconda_save_traceback_to_bugzilla I verified that nano is present on the image, and it's even set as $EDITOR: > [anaconda root@fedora /]# echo $EDITOR > /usr/bin/nano It seems that anaconda (or libreport) invoke "vi" directly, instead of using the default editor. Version-Release number of selected component (if applicable): Fedora-Server-dvd-x86_64-33-1.2.iso anaconda 33.25.4-1.fc33
Probably not a blocker, but proposing as a freeze exception.
I think libreport should just work as-is? See: https://github.com/abrt/libreport/blob/84ed0489731418c8cadc51321f294ea68661d585/src/cli/cli-report.c#L305 That probably means the variable is not what you think when/where anaconda actually runs. FWIW normally (not on Live) we have a systemd unit that starts anaconda in tmux. No idea if you expect EDITOR to be set there? (I do not, but that's just a guess.) Anyway, if that's it, the fix involves setting EDITOR here: https://github.com/rhinstaller/anaconda/blob/master/data/systemd/anaconda.service#L8 ...and in some other files in that directory probably too. Alternatively, there is one more opportunity here: https://github.com/rhinstaller/anaconda/blob/master/anaconda.py#L198 But I think that's not the right place for that, rather for a fallback if EDITOR is not set. (Unfortunately everything is stuck on metacity right now, or I'd try that immediately.)
Oops, sorry, assigning back to us, that was a mistake.
Possibly similar to bug 1889576. Anaconda runs as root. I'm not sure whether it runs literally under root user or via sudo; but it's likely that environment doesn't have nano set as the default editor and that's why. I agree it's probably not a feature blocker, but it's not good UX and should be considered a bug to be fixed. If anaconda runs with sudo then maybe it's possible for a drop-in file to sudoers, as I mention in 1889576.
13:03:36 adamw | cmurf: on live images the launcher runs a smallish wrapper called liveinst which sets up some environment stuff then runs anaconda as root, iirc 13:05:01 adamw | oh, right, liveinst is wrapped in consolehelper, that's how it gets to be root 13:05:24 adamw | of course this is all super old and hasn't been touched in forever
Kamil was testing an installer image, though, so that's not relevant. On installer images there is no (interactive) user but root, I don't think, everything runs as root.
# pgrep -a anaconda 1712 /usr/bin/python3 /sbin/anaconda # cat /proc/1712/environ | tr '\0' '\n' | sort GDK_BACKEND=x11 GIO_USE_VFS=local HOME=/root INVOCATION_ID=83b29ea651ec4eb292b41cdc18360061 JOURNAL_STREAM=8:28638 LANG=en_US.UTF-8 MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin PWD=/root SHELL=/bin/bash SHLVL=0 TERM=screen TMUX=/tmp//tmux-0/default,1696,0 TMUX_PANE=%0 XDG_RUNTIME_DIR=/tmp _=/sbin/anaconda No EDITOR, no VISUAL. Yes, the actual anaconda environment doesn't have nano configured. Please note I'm talking here about the DVD environment here, not Live. I don't think it makes sense to run anaconda in text mode on Live (not even sure if that's possible, but even if it was).
I think /etc/profile.d probably isn't read in the installer env. lorax runtime-postinstall.tmpl does this: install ${configdir}/profile root/.profile that file is I think lorax share/templates.d/99-generic/config_files/common/profile , which just has this: PS1="[anaconda \u@\h \W]\\$ " PATH=/bin:/sbin:/usr/bin:/usr/sbin:/mnt/sysimage/sbin:/mnt/sysimage/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin export PATH PS1 in an installed system, the chain by which profile.d stuff is used for a typical user shell is that ~/.bashrc sources /etc/bashrc , which sources everything in /etc/profile.d . But that profile used in the installer environment doesn't source /etc/bashrc , or source /etc/profile.d contents itself.
+3 votes for FE in https://pagure.io/fedora-qa/blocker-review/issue/186 , accepting. This isn't that critical, but it *is* in the installer environment and can't be fixed with a post-release update.
Sorry about my suboptimal reading comprehension :P Maybe because it runs from within tmux? man tmux: When tmux is started, it inspects the following environment variables: EDITOR If the command specified in this variable contains the string ‘vi’ and VISUAL is unset, use vi-style key bindings. Overridden by the mode-keys and status-keys options. ps aux shows this which might be related... /usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start That conf file has a comment at the top: # tmux.conf for the anaconda environment And it isn't explicitly setting $EDITOR
I think the explanation is just what I wrote in comment #8. We're not sourcing the thing nano-default-editor installs.
This message is a reminder that Fedora 33 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '33'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 33 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still valid.
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle. Changing version to 36.
This message is a reminder that Fedora Linux 36 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '36'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 36 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 36 entered end-of-life (EOL) status on 2023-05-16. Fedora Linux 36 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.
Still present in Rawhide.
A couple of notes... - originally "fixed" in bug 1874094 - can confirm the nano-default-editor rpm gets installed to boot.iso - bash in tmux picks up the default - anaconda does not, per comment 7 - pstree shows systemd -> tmux: server -> anaconda - looks to me like there isn't any place in the chain to source the defaults via bash... - the bash in tmux is child of the same "tmux: server" in that chain - we don't really want to source all the files in /etc/profile.d In the end, I'm not sure where is the best place to plug this in. Let's try... https://github.com/rhinstaller/anaconda/pull/4800
So, reading a bit into the details, it seems that the change was actually somewhat shallow, and affects only shells. For anaconda, which is runs directly under systemd, there really isn't any other way to make it work than setting it ourselves. (Unless systemd and such set EDITOR too, which I doubt.)
I think changing the default editor in the text-mode anaconda would make sense even if there was no such Change, because simply put, more people will be able to report a bug using nano than using vi...