GNOME reads ~/.profile upon login. When I change something in .profile (for example LC_MESSAGES) I want gnome to reread the .profile file without logging out and back in. In bash I can tell bash to source .profile. How can I do that for the running GNOME session?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
I think it is not possible. The relevant script is /etc/gdm/Xsession. There quite at the top you’ll find
# First read /etc/profile and .profile test -f /etc/profile && . /etc/profile test -f "$HOME/.profile" && . "$HOME/.profile"
and after that (and sourcing other scripts, loading X resources etc) the desktop environment is started, inheriting the values of .profile just loaded. As there is no way to change the environment of running processes (if the process has no special functionality to import changed environment, but this is nothing you commonly find), you seem to be out of luck.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0