Gnome Terminal doesn't inherit working directory

Hi.

Happy Fedora 32 user here. I just reinstalled my machine because of a problem I have had for a while. I had the problem on F31 before doing a fresh F32 reinstall, and I expected it to be solved. However, on F32, it came back:

For the first hour or so, Gnome Terminal and Tilix work as expected: When I create a new terminal tab, the working directory is inherited from the “parent” terminal. However, all of a sudden this stops working after an hour or so. Then, all new terminals start from my home directory.

I’m using Fish shell, with the standard command prompt, and the problem came without any customizations to the fish setup. The problem also persists when I change my default shell back to bash and log out/log in again. Reboots don’t help either. The problem seems to be permanent.

On this fresh install, I have installed restic fzf fish ripgrep neovim tilix and nothing else. I have added a custom font for the terminal, and changed to a preinstalled color theme. I have also restored my files from a backup, but nothing that should interfere with the shell (I haven’t installed custom fish.config or anything)

Can anyone help me debug this and find the cause of the problem?

Just to add, I have tried to find a solution in these pages, but without any luck:

I see that Gnome Terminal starts two VTE children when it starts. I’m not sure if this has any significance at all:

$ journalctl -g gnome-terminal
May 17 16:09:15 xxxxxx systemd[8351]: Started VTE child process 16427 launched by gnome-terminal-server process 16422.
May 17 16:09:17 xxxxxx systemd[8351]: Started VTE child process 16498 launched by gnome-terminal-server process 16422.

Process 16427 is fish, I can’t see the other one. I think is has exited just after being started.

1 Like

Update: I did a fresh F32 install. This time I don’t even have fish or tilix installed, and the problem has re-appeared in Gnome Terminal running unmodified bash. The working directory is not inherited to the child terminal. I have made no modifications to .bashrc etc.

I’m confused. If anyone have clues to what the problem can be, it would be much appreciated.

I have solved it! Finally. :sweat_smile:

I had set my hostname to a word starting with a digit, e.g. 123blabla. If changing the hostname back to e.g. blabla new terminals start inheriting the working directory again. I have no idea why, but this solved the problem for me. Hurray, no more reinstalls. :tada:

I think this behavior is very confusing though. Is 123blabla an invalid hostname? Shouldn’t I get be a warning for this?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.