The solutions on the web I found in the top 100 google hits for (ubuntu enviornment variables) were all pretty terrible as they suggested changing the system wide settings in /etc/profile and other things that would make it harder for me to use other machines in my organization.
The solution I am using instead is to create an executable ~/.Xsession file which sources the script which sets up my environment variables and then execs /usr/bin/x-session-manager. In between, it is convenient to launch a few extra programs to run as well. So here is my script:
#!/bin/bash
# Force environment variables to get loaded before our window manager starts.
# Perhaps I should just load .bash_profile here but .bashrc will load that
# automatically if necessary.
source ~/.bashrc
# Start up some programs here.
xterm &
# Now, invoke the normal gnome/ubuntu login stuff.
exec /usr/bin/x-session-manager
Hope this saves you a little time and frustration.
No comments:
Post a Comment