I'm trying to write a simple script that starts a terminal and runs the command workon foo. In other words, I just want to do:
mate-terminal -e workon foo
However, that doesn't work because the workon command requires me to first do:
export WORKON_HOME=~/work;
source /usr/local/bin/virtualenvwrapper.sh
Normally those lines are run automatically because they're in my .bashrc, but evidently mate-terminal -e doesn't do a source ~/.bashrc. However, if I try adding those lines to my script:
mate-terminal -e export WORKON_HOME=~/work; source /usr/local/bin/virtualenvwrapper.sh; workon foo
it doesn't work either. MATE tells me:
There was an error creating the child process for this terminal
Failed to execute child process "export" (No such file or directory)
I have the same problem if I skip the export and just do mate-terminal -e source ... or if I try to use . instead of source (mate-terminal -e . ...).
I'm not sure how I can load anything if I can't, export, source, or ., but there must be some way because mate-terminal -e would be almost useless without it.
Does anyone know how I can I setup my environment in a terminal started with mate-terminal -e?