FS#68318 - [gnome-terminal] $HOME and $USER not set when opening via file manager in new tab

Attached to Project: Arch Linux
Opened by NicoHood (NicoHood) - Sunday, 18 October 2020, 09:44 GMT
Last edited by Jan Alexander Steffens (heftig) - Tuesday, 27 October 2020, 20:35 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan Alexander Steffens (heftig)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
$HOME and $USER is not set, when doing the following instructions.

Steps to reproduce:
* Open Files
* Right click on an empty white space and "Open in Terminal"
* Open a new Tab inside this terminal
* $USER and $HOME is not set

This only happens when using the context menu to open from a file browser and it only happens for a new tab, not the first tab. This is super annoying, as a lot of programs will behave very weird/not at all.
This task depends upon

Closed by  Jan Alexander Steffens (heftig)
Tuesday, 27 October 2020, 20:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  gnome-terminal 3.38.1-2
Comment by NicoHood (NicoHood) - Tuesday, 27 October 2020, 11:00 GMT Comment by NicoHood (NicoHood) - Tuesday, 27 October 2020, 13:20 GMT
Small addition:
As stated in the upstream bugreport it might be possible to revert https://gitlab.gnome.org/GNOME/gnome-terminal/-/commit/b76802730e67637c11b70bc5b2e2851755e0a1a5 and solve the bug. However I have no idea if that influences with other code. Maybe that should be discussed upstream.

If we can go back to 3.36. that'd be also fine for me, as the bug is really annoying in every days workflow.

@heftig: thanks for the fast reaction :-)
Comment by Jan Alexander Steffens (heftig) - Tuesday, 27 October 2020, 15:31 GMT
What is `systemctl --user show-environment` printing for you?
Comment by NicoHood (NicoHood) - Tuesday, 27 October 2020, 18:34 GMT
This of course only works in the "not broken" terminal session, otherwise I get "Failed to connect to bus: No such file or directory" (Because HOME and USER and some other variables are not set)

```
HOME=/home/user
LANG=en_US.UTF-8
LOGNAME=nicohood
MAIL=/var/spool/mail/nicohood
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
SHELL=/bin/bash
USER=nicohood
XDG_RUNTIME_DIR=/run/user/1000
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DESKTOP_SESSION=gnome-xorg
DISPLAY=:0
GDMSESSION=gnome-xorg
GDM_LANG=en_US.UTF-8
GRADLE_HOME=/usr/share/java/gradle
HG=/usr/bin/hg
MKLROOT=/opt/intel/mkl
MOTD_SHOWN=pam
PWD=/home/user
SAL_USE_VCLPLUGIN=gtk3
SESSION_MANAGER=local/talloniv:@/tmp/.ICE-unix/814,unix/talloniv:/tmp/.ICE-unix/814
SHLVL=0
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
USERNAME=nicohood
WINDOWPATH=2
XAUTHORITY=/run/user/1000/gdm/Xauthority
XDG_CURRENT_DESKTOP=GNOME
XDG_MENU_PREFIX=gnome-
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=gnome-xorg
XDG_SESSION_TYPE=x11
ZEITGEIST_DATA_PATH=/home/user/.local/share/zeitgeist
```

Loading...