Ahh k. I took it out of .profile entirely and put it in .bashrc, so it
should only be run the once. I'm the only significant user of this
computer. Cheers!


On Wed, Oct 16, 2013 at 11:45 AM, Bill Freeman <ke1g...@gmail.com> wrote:

> What I mean by "I don't know about sourceing virtualenvwrapper.sh" is that
> I don't know, and don't have the inclination to research, whether, having
> sourced the file in a shell, you should avoid sourcing it again in a
> sub-shell.
>
> What I mean by guard variables is that you could, at the end of your
> .bashrc, export a variable that is unlikely to clash with the variables of
> other systems, e.g.;
>
>     export BASHRC_HAS_ALREADY_BEEN RUN
>
> And earlier in the file test the variable to guard against redoing the
> things that should not be redone.
>
>     if [ "$BASHRC_HAS_ALREADY_BEEN RUN" -ne "1" ]; then
>        # Put stuff that shouldn't be done twice here
>     fi
>
>
> On Wed, Oct 16, 2013 at 12:24 PM, J. Paskaruk <jpaska...@gmail.com> wrote:
>
>> That's the one, thank you so much! I saw in the comments of .profile that
>> it would not be read if there was a .bashrc file present, so my next step
>> was creating that file and putting those lines in it, but I'm very afraid
>> of pooching my install. Noob, like I said. :>
>>
>> I have Aspergers, so I'm not clear on what you meant by "I don't know
>> about sourceing virtualenvwrapper.sh.  (Guard variables are your friend.)"
>> - I'm assuming, though, that you're referring to a security concern in this
>> line, presumably based on the idea that someone could access
>> virtualenvwrapper.sh and put malicious code in there.
>>
>> If I've assessed your comment correctly, is there a good, basic tutorial
>> on {guard variables}, as well as the larger schema into which they fit?
>> Preferably one that *does* assume intelligence, but does *not* assume a lot
>> of existing knowledge on the part of the user?
>>
>>
>> Whatever the case, thank you again for the new knowledge about .profile
>> and .bashrc. :>
>>
>>
>> On Wed, Oct 16, 2013 at 11:14 AM, Bill Freeman <ke1g...@gmail.com> wrote:
>>
>>> The file you want (assuming that your shell is bash) is .bashrc because
>>> it is run every time a bash shell is started, even if it is not a login
>>> shell.
>>>
>>> Note, however, that settings that shouldn't be done multiple times, such
>>> as appending ":$HOME/bin" to the PATH, should be protected with an if so
>>> they only happen once, no matter how many sub-shells you start (such as by
>>> running something in parentheses), so that PATH doesn't grow without
>>> bound.  The WORKON_HOME and PROJECT_HOME settings don't suffer from this
>>> problem because it doesn't hurt to set them again to the same value.  I
>>> don't know about sourceing virtualenvwrapper.sh.  (Guard variables are your
>>> friend.)
>>>
>>> For some of this stuff it may also be possible to set the environment of
>>> the X session, making it available in the environment of shells that are
>>> started by the window manager, but you'll have to do your own research on
>>> that.
>>>
>>>
>>>
>>> On Wed, Oct 16, 2013 at 11:54 AM, Jimmy Pants <jpaska...@gmail.com>wrote:
>>>
>>>> Does gnome-terminal make sense to you in this context? I popped up
>>>> "edit" on the terminal launcher and that's in the Application field. I
>>>> would, theoretically, add whatever option for gnome-terminal specifies it
>>>> as a login shell?
>>>>
>>>> Testing this, I added --login to the field, per 
>>>> this<http://multignometerm.sourceforge.net/web/doc/options.html>page, but 
>>>> it didn't ask for a login, nor did it run .profile.
>>>>
>>>> Not sure if I'm barking up the proper tree here, natch.
>>>>
>>>>
>>>> On Wednesday, October 16, 2013 10:37:03 AM UTC-5, Thomas wrote:
>>>>>
>>>>>  On 10/16/13 8:29 AM, Jimmy Pants wrote:
>>>>>
>>>>> ...every time I open a terminal, that is. As I understand it, .profile
>>>>> is the file to edit in Linux Mint, and it does exist, with some basic code
>>>>> in it, in my home dir. So, per this 
>>>>> tutorial<http://virtualenvwrapper.readthedocs.org/en/latest/install.html>,
>>>>> I added the following to .profile:
>>>>>
>>>>> Your terminal is being opened without specifying it as a "login
>>>>> shell". Not sure which terminal program you are using so you will need to
>>>>> check on options; for xterm it is the -ls option.
>>>>>
>>>>> hth
>>>>>
>>>>>                           - Tom
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Django users" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to django-users+unsubscr...@googlegroups.com.
>>>>
>>>> To post to this group, send email to django-users@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/django-users.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/e3e173c4-56a5-4d16-a449-6da333fbb74e%40googlegroups.com
>>>> .
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>  --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Django users" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/django-users/kDehG6wHqiA/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> django-users+unsubscr...@googlegroups.com.
>>>
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAB%2BAj0uVGKfx_b%2BBX4-h8EA3YPqDipJStL5TRE8fN_gW6dJvCQ%40mail.gmail.com
>>> .
>>>
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CANabDd%2B2P08Ur%2BStcrg4Ynadg1fhWiFfK2%3D_nYJnhs4DSA3RTw%40mail.gmail.com
>> .
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/kDehG6wHqiA/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAB%2BAj0sY8N%3DQ7%3D%2B_-X9AUBdyeDR9HcRsoK6w8vQKVwHptMwkVw%40mail.gmail.com
> .
>
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANabDdKdW8909Gx_uT8%2BxucwkJCLPUDq1Sjn3apD3-J0vam1Sg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to