3

I have a line in my .bashrc that cd's to a specific directory. For as long as I can remember, this only changed the directory in which terminal sessions began. But then at some point recently, GUI applications such as Geeqie and Thunar also began to start in the specific directory. What could have changed?

0

Geeqie and Thunar both use functions that utilize g_get_home_dir() from GNOME's glib.

Quoting from g_get_home_dir() in the API Reference:

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.

So check the $HOME variable and your system's passwd file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.