Opening new tab in gnome-terminal launched from nautilus loses most environment variables

Bug #1922839 reported by Matthew Ruffell on 2021-04-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gnome-terminal (Ubuntu)
Status tracked in Hirsute

Bug Description


If you launch gnome-terminal by right clicking a directory in Nautilus, selecting "Open in Terminal", you get a fully functional terminal window.

If you then press the new tab button, or ctrl-shift-t to open a new terminal tab, you will find that most environment variables have become unset, and you see the text:

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Comparing printenv between:

Normal terminal:
Broken new terminal tab:

Most commands won't run in the new terminal tab, due to $HOME and $USER not being set.

Note, if you launch gnome-terminal from gnome-shell or the dock, and create a new tab, everything works perfectly. Is something wrong with the Nautilus option for "Open in Terminal"?

Matthew Ruffell (mruffell) wrote :

Version tested in hirsute is 3.38.1-1ubuntu1.
I checked Groovy, with 3.38.0-1ubuntu1.1, and the problem does not happen.

Both systems using Wayland session.

tags: added: hirsute
Matthew Ruffell (mruffell) wrote :

Seems this is a long running issue.

Upstream bug:

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.