Commit f44dbef8 authored by Ray Strode's avatar Ray Strode Committed by Ray Strode

session-worker: set PWD for user session

It's possible for the current working directory to be
a symlink.  Some programs, and notably, the
get_current_dir_name() libc api use the PWD environment
variable to know the symlink being used (so they don't
use the canonical name that the symlink points to)

This commit makes sure we set PWD in that case, to
allow those programs to show the right path.
parent 20ef7016
......@@ -1392,6 +1392,7 @@ gdm_session_worker_update_environment_from_passwd_info (GdmSessionWorker *worker
gdm_session_worker_set_environment_variable (worker, "USER", worker->priv->username);
gdm_session_worker_set_environment_variable (worker, "USERNAME", worker->priv->username);
gdm_session_worker_set_environment_variable (worker, "HOME", home);
gdm_session_worker_set_environment_variable (worker, "PWD", home);
gdm_session_worker_set_environment_variable (worker, "SHELL", shell);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment