Registered Member
|
I put a script in ~/.config/plasma-workspace/env which should source another .sh script which is installed on the system. The other script files sets some environment variables and it needs to be called with a parameter. The parameter doesn't get propagated to the script though. Is it possible to source the other script file so that it gets called with the parameter intel64?
The script looks like this:
|
Registered Member
|
Try to run the script, not to source it. Be sure, the file name in ~/.config/plasma-workspace/env ends with ".sh" and is executable (chmod +x ...)!
|
Registered Member
|
If I just run the script instead of sourcing it the environment variables won't get exported, which is what I actually want.
|
Registered Member
|
You are right, i was wrong
I checked /usr/bin/startkde ... The *.sh files from ~/.config/plasma-workspace/env are sourced and not executed as mentioned in link above:
startkde is running with /bin/sh which is dash on Kubuntu an dash ignores arguments when sourcing another scripts You can write your own script that sets same env variables as /opt/intel/bin/compilervars.sh intel64 or modify startkde to use bash. The last may be bad way because updates can overwrite startkde. |
Registered Member
|
I wasn't aware that Ubuntu was using Dash as default shell. It's really hard to find some informations about Dash. I guess not many people are using it.
Thanks a lot for pointing out why the parameter wasn't used! Fortunately the programmers of the shell script made it also possible to pass the parameters also by setting environment variables. So my script looks like this now:
|
Registered Member
|
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell