简体   繁体   English

GNOME 终端启动到特定目录

[英]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).我在 Linux Mint 20 上,不知何故我设法使GNOME 终端始终启动到特定目录(它进入我通常的工作目录)。 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我的 .bashrc 不包含任何内容
  • My .profile doesn't contain anything我的 .profile 不包含任何内容
  • I can't find anything related in my ~/.config dir我在 ~/.config 目录中找不到任何相关内容
  • I've rummaged around in /usr with no luck我在 /usr 中翻来覆去没有走运
  • I've grepped forever, but the only thing similar I've found is in my .bash_aliases: alias www=cd /media/daniel/Webdev/html我一直在 grepped,但我发现的唯一类似的东西是在我的 .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".当我从 cinnamon 的菜单、cairo-dock、另一个终端启动终端时,或者当我右键单击并选择“在终端中打开”时,都会发生这种情况。

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:这是我的 ~/.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:要弄清楚这是否与 GNOME 终端 UI 首选项有关,还是仅与底层 shell 本身有关:
    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 ).您可以打开gnome-terminal ,转到 homedir 的根目录( cd ~/ )并在( bash --login -i -x )上运行带有跟踪模式的“嵌套shell”。
  • 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).如果此时您在不同的目录中结束,这肯定是由于仅仅cd命令(打印在如此获得的跟踪中)。
  • Otherwise I'd suggest to locate the gnome-terminal launcher (by running locate org.gnome.Terminal.desktop or so) and inspect that file:否则,我建议找到gnome-terminal启动器(通过运行locate org.gnome.Terminal.desktop左右)并检查该文件:
  • In particular, there seems to be a relevant Path= key in the freedesktop.org spec .特别是,在freedesktop.org 规范中似乎有一个相关的Path=键。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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