New answers tagged

0

Close the console you're using then open it again, worked for me.


0

Hi just follow this steps: set android vars Initially go to your home and press Ctrl + H it will show you hidden files now look for .bashrc file, open it with any text editor then place the lines below at the end of file: export ANDROID_HOME=/myPathSdk/android-sdk-linux export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools reboot using ...


16

There are two shells involved here: The calling shell, the interactive shell from which you are running this The non-login, non-interactive shell, spawned by bash -c Now, the problem is, within double quotes the variables are expanded to their respective values, this is true for any shell. So, as you have used double quotes, the variable expansion, $v, ...


2

Probably your .bashrc or .profile is messedup. Your gedit will not start if it is not in path and since your path is empty it is not in the path. You should first establish a good enough path. export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin And then you should be able to start gedit. Alternativelly you could just run gedit with ...


0

https://help.ubuntu.com/community/EnvironmentVariables There is all you need to know. I found out that a lot of the input here was incorrect or at least the method was not suggested. This is a great piece of information that will let you figure out where to modify your environment variable based on the reason you are doing it and exactly how to do it ...


3

It is not possible. As you have correctly observed, your script is executing in its own shell. This shell gets a copy of its parent shell's environment when it is forked, and it has no way to access the parent shell's environment. And that is good, because otherwise scripts could have all kinds of unforeseen side effects. ;) In order to change variables in ...


2

sudo sanitizes the environment and by default only keeps certain environment variables available with modifying the values of some (e.g. PATH). You can pass the variable ANDROID_HOME manually: sudo ANDROID_HOME="/actual/path" ionic run android Or preserve the current environment: sudo -E ionic run android


3

In the transcript output from your make command, you should notice the important part: perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_CA:en", LC_ALL = (unset), LC_PAPER = "it_IT.UTF-8", LC_ADDRESS = "it_IT.UTF-8", LC_MONETARY = "it_IT.UTF-8", LC_NUMERIC = "it_IT.UTF-8", ...


3

sudo sanitizes the environment before running any command. In doing so, if the value of the directive secure_path is set, it will be used as the PATH for the sudo commands, not the current PATH. In my system: % sudo grep -E 'secure_path' /etc/sudoers Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" So i have: % echo ...


1

Use the -l option on su to get a full user login: su -l ubuntu That should give you the ubuntu environment you expect.



Top 50 recent answers are included