.bashrc
我的that中有一行cd
指向特定目录。从我记事起,这只改变了终端会话开始的目录。但最近的某个时候,Geeqie 和 Thunar 等 GUI 应用程序也开始在特定目录中启动。有什么可以改变的?
答案1
格其和图纳尔两者都使用利用的函数g_get_home_dir()来自 GNOME 的glib
.
引用自g_get_home_dir()在 API 参考中:
Gets the current user's home directory.
As with most UNIX tools, this function will return the value of the HOME
environment variable if it is set to an existing absolute path name, falling
back to the passwd file in the case that it is unset.
If the path given in HOME is non-absolute, does not exist, or is not a
directory, the result is undefined.
因此,请检查$HOME
变量和系统passwd
文件。