Quote:
Originally Posted by PopyCaste |
Right.
Quote:
Please have a look on the link above and search for "DISPLAY" in it, for example. The author uses if-clauses to determine, on which system we are, using the DISPLAY-variable, doesn't he?
But as you say, normally the variable is not set by default and as a result, i get one error message on every command i enter on the shell..
|
Well, the author might be one of those that never operate outside X, that's why s/he probably didn't notice this problem. However, it's a very obvious error.
Quote:
|
My question is, how can I change it?
|
You could check if $HOST is set, and if it's not set, set it to a default value. I don't know the purpose of that value, so I can't figure out what would be a good default value.
Note also that that script loads by default /etc/bashrc, while some distros often use /etc/bash/bashrc.
I don't have the time to review the whole rc file right now, and it just seems to me way too complicated, just to get fancy useless stuff in your prompt. It's about tastes, though.
Quote:
|
And why this could be a working sample .bashrc-file when obviously the environment variables - that are used - are not initialized by default.
|
I don't know. It seems that this rc file is not too well tested, and it's also old (though that shouldn't matter).
Quote:
When I export the two variables, they won't be there after rebooting, right?
Best regards!
|
Right. But you could export them at the very beginning of the script. Not that it would make much sense, though.