Bug 1884977
| Summary: | "Open in Terminal" -> new window loses a lot of environment variables, including $HOME | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Peter Simonyi <rhbz> |
| Component: | gnome-terminal | Assignee: | Matthias Clasen <mclasen> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 33 | CC: | boost113, bugzilla.redhat.com.klox, caillon+fedoraproject, debarshir, decathorpe, doug.hs, giallu, gnome-sig, john.j5live, mclasen, musuruan, rhughes, rstrode, sandmann, sebastian-keller, tadej.j |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | gnome-terminal-3.38.3-1.fc34 gnome-terminal-3.38.3-1.fc33 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-05-09 01:34:52 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Peter Simonyi
2020-10-04 09:00:36 UTC
Upstream https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/253 and worked around in 3.38.1. Thanks, I'll test that as soon as there's a build, but from reading the bug reports it sounds like a different issue.
It sounds as if the problem in #253 you linked to is that the new terminal is inheriting its environment from gnome-terminal-server. But the environment I'm getting is missing all kinds of things that are present in g-t-s's environment, like $HOME. Check with
cat /proc/$(ps -C gnome-terminal- -o pid:1=)/environ | tr '\0' '\n'
and see HOME, USER, HOSTNAME etc are all set.
3.38.1 does not fix this. Tested with: gnome-terminal-3.38.1-1.fc33.x86_64 gnome-terminal-nautilus-3.38.1-1.fc33.x86_64 This is definitely a different issue. Note that it also means $PATH is mangled badly: the default .bashrc adds $HOME/.local/bin and $HOME/bin to the PATH, but with HOME unset you get /.local/bin and /bin instead. So per-user installed stuff stops working. Can confirm, I'm hit by this too, on fedora 33 stable. Sometimes new gnome-terminal windows do not seem to inherit the correct / full environment. HOME, USER, SSH_AUTH_SOCK, DESKTOP_SESSION, XDG_SESSION_DESKTOP, XDG_SESSION_TYPE, XAUTHORITY, XDG_SESSION_CLASS, DISPLAY, DBUS_SESSION_BUS_ADDRESS and others are missing (leading to problems with SSH and launching graphical applications). PATH is mangled to "/usr/lib64/ccache:/usr/local/bin:/usr/bin". This looks like https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/303 which has a patch linked in the comments. (In reply to Sebastian Keller from comment #5) > This looks like https://gitlab.gnome.org/GNOME/gnome-terminal/-/issues/303 > which has a patch linked in the comments. The proposed patch in the upstream issue works for me. I've created a Copr repo with the fixed version of GNOME Terminal: https://copr.fedorainfracloud.org/coprs/tadej/gnome-terminal-f33/ I've also opened a PR so this can get included in Fedora's GNOME Terminal package: https://src.fedoraproject.org/rpms/gnome-terminal/pull-request/4 I just updated to Fedora 34 and was very disappointed to find that the default version of gnome terminal still has this bug. FEDORA-2021-f2f97366ff has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-f2f97366ff FEDORA-2021-2a26a789e4 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2021-2a26a789e4 FEDORA-2021-2a26a789e4 has been pushed to the Fedora 33 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-2a26a789e4` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-2a26a789e4 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-f2f97366ff has been pushed to the Fedora 34 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-f2f97366ff` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-f2f97366ff See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2021-f2f97366ff has been pushed to the Fedora 34 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2021-2a26a789e4 has been pushed to the Fedora 33 stable repository. If problem still persists, please make note of it in this bug report. *** Bug 1917145 has been marked as a duplicate of this bug. *** |