I can set environment variables to be inherited by all processes in
~/.profile. This works because the desktop environment (eg. gnome-shell) runs this file on login. gnome-shell then updates its own environment variables. Because each process (firefox, xterm, emacs) has gnome-shell as an ancestor, they inherit these environment variables.
Is there a way to update the environment variables in this process (gnome-shell) after login? I envision something like
$ xdg-set FOO=BAR
then in a new terminal you can immediately see
$ echo $FOO BAR