简体   繁体   中英

GNOME terminal launches into specific directory

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"

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM