1

I tried to put this into the startup applications:

gnome-terminal --working-directory /media/Data/work/ -e '. .env/bin/activate'

where .env/bin/activate represents my virtualenv.

For some reason, it doesn't work; the terminal starts but displays a message

Failed to execute child process "." (Permission denied)

If I just start gnome-terminal manually, and then execute .env/bin/activate, everything works fine.

What am I doing wrong? (Running Ubuntu 14.04.)

0
2

Try this command instead:

gnome-terminal --working-directory /media/Data/work/ -x bash --rcfile .env/bin/activate

From man bash:

 The --rcfile file option will force bash to read and execute commands
 from file instead of /etc/bash.bashrc and ~/.bashrc.
3
  • That is a bit heavy-handed, isn't it? Ignoring .bashrc?
    – muru
    Mar 23 '15 at 11:39
  • 1
    @muru This so far the only method I've found to keep 1. the terminal opened and 2. the virtual env activated. As ending the gnome-terminal command with an extra bash close/hide the venv. Mar 23 '15 at 11:43
  • @Muru: It'll be up to the OP to decide whether the cure is worse then the disease... >:-) (I've upvoted as I wouldn't have found this)
    – Fabby
    Mar 29 '15 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.