I have just performed a fresh install of Ubuntu 21.04 (formerly using 20.10) on my desktop. However, I am facing an problem with GNOME Terminal.

If I open the Terminal via the keyboard shortcut or the right-click menu on my desktop, everything works fine. If I open Terminal via the file browser (Files), however, the initial window works fine but any subsequent Terminal tabs/windows I open from within that one fail to find my terminal settings.


  • Open Terminal via keyboard shortcut/desktop right-click menu: OK
  • Open new Terminal window/tab from previous: OK
  • Open new Terminal window via Files right-click menu: OK
  • Open new Terminal window/tab from previous: BROKEN

Every time, the fourth situtation shows the sudo tip (so clearly can't find ~/.sudo_as_admin_successful), shows the current location in the prompt as /home/<username> rather than ~, produces no output for echo $HOME, etc.

It seems to have no idea where to look for terminal settings, but only when opened from another Terminal window that was opened from Files. whoami shows the same user for both working and non-working Terminals.

I've copied the clean .profile and .bashrc from /etc/skal/, as well as logging out and in and restarted my computer, but nothing has helped.

  • Cannot reproduce that on Ubuntu 21.04, although my instance is an upgrade, no clean install.
    – vanadium
    Jun 7, 2021 at 13:13

1 Answer 1


I've managed to fix this, but I have no idea what happened.


Go into the Terminal window hamburger menu > ‘Preferences’ > ‘⟨profile name⟩’ sidebar item > ‘Command’ tab and check ‘Run command as a login shell’. I've left all other settings as I found them:

enter image description here

Re: @steeldriver's comment below, if I leave this option unchecked it is unchecked in all Terminal windows, both the ones that work and the ones that don't. So presumably checking the option has no effect on the originally-working windows, and only comes into play in the fourth, originally-broken scenario.


I'll leave this for a little bit before accepting it as the answer in case anybody can provide a more detailed explanation of what happened.

  • 1
    This may be the "right" answer but it would be interesting to know why it is necessary - processes should inherit a working environment from their parent, so I wonder why that's not happening in this case? Jun 7, 2021 at 14:41
  • @steeldriver I've expanded the answer a little - AFAICT, the processes are inheriting the parent environment.
    – 08915bfe02
    Jun 8, 2021 at 7:32
  • Thanks for the update - I was actually referring to inheritance of environment variables (the stuff you would see in the output of the printenv command) rather than the terminal's user-preferences - which AFAIK are stored in the dconf database rather than inherited as such. Jun 8, 2021 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.