GNOME terminal launches into specific directory

Ernest Melville

I'm on Linux Mint 20, and somehow I've managed to make GNOME terminal always launch into a specific directory (it cds into my usual working directory). While it seemed like a good idea at the time, I've regretted it sincerely since. The problem is, I can't figure out how to revert it.

  • The profile does not contain any launch commands
  • My .bashrc doesn't contain anything
  • My .profile doesn't contain anything
  • I can't find anything related in my ~/.config dir
  • I've rummaged around in /usr with no luck
  • I've grepped forever, but the only thing similar I've found is in my .bash_aliases: alias www=cd /media/daniel/Webdev/html

This occurs both when I launch the terminal from cinnamon's menu, from cairo-dock, from another terminal or when I right-click and select "open in terminal".

Can anyone tell this dumb dumb where he screwed up? I'd be super grateful for any tips.

Thank you for your time!

Edit:

Here's the content of my ~/.config/user-dirs.dirs:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
ErikMD

For the record, posting the hints I had suggested in the comments:

  • To figure out whether this is related to the GNOME Terminal UI preferences, or just to the underlying shell itself:
    you may open gnome-terminal, go to the root of your homedir (cd ~/) and run a "nested shell" with trace mode on (bash --login -i -x).
  • If at this point you end in a different directory, this is certainly due to a mere cd command (printed in the trace so obtained).
  • Otherwise I'd suggest to locate the gnome-terminal launcher (by running locate org.gnome.Terminal.desktop or so) and inspect that file:
  • In particular, there seems to be a relevant Path= key in the freedesktop.org spec.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to open new gnome-terminal that launches a command?

How to save working directory in gnome-terminal?

Gnome-terminal cannot open in working directory

Gnome-Terminal, how to start in a different directory?

Set starting directory for gnome-terminal profile

Make .destop for ZSH such that it launches zsh and remains without transfering to .desktop of gnome-terminal?

close one specific GNOME Terminal command

how to go to a directory in gnome terminal which contains spaces as its name?

Gnome-terminal and Zsh: keep current directory on new tab/window

Gnome-terminal custom command and dynamic working directory

gnome-terminal: how do you set working-directory?

gnome-terminal: keep track of directory in new tab

CD to a directory and issue a shell command using GNOME TERMINAL command

Create desktop alias for Terminal starting in specific directory

Terminal: list subdirectories containing a specific directory name

Some letters on gnome-terminal can't be typed by specific user

Starting gnome-terminal and automatically run specific process (roscore)

How do I start gnome-terminal with a specific width/height?

Gnome-Screenshot GUI: Which command launches that?

How to execute a comand in a specific directory to run in a WIndows Terminal window

Use gnome-terminal and tmux together: how to launch with the most recent working directory?

vte.sh does not keep my gnome-terminal directory in new tab

How do I change the default working directory with which gnome-terminal opens?

How can I change the default directory for gnome-terminal without editing .bashrc?

After upgrading ubuntu 19 to 20.04.1, gnome-terminal always starts with '/' as working directory

"Failed to execute child process (No such file or directory)" when calling gnome-terminal subprocess in Python 3

Prevent gnome-terminal from changing directory when creating a new tab or window

Gnome terminal scrollback lines?

gnome terminal colors