I'm using Microsoft's dotnet in linux (ubuntu), and it has dial-home telemetry. I want to disable it, and the instructions say:
The .NET Core tools collect usage data in order to help us improve your experience. The data is anonymous and doesn't include command-line arguments. The data is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
I've read that .profile, .bashrc, .bash_profile, /etc/environment, etc, have differences in when they are read, if at all.
So I'm not sure where to put DOTNET_CLI_TELEMETRY_OPTOUT=1? I want it to always be loaded, regardless whether I login without desktop, login with desktop, ssh in remotely, start a terminal, start a terminal from a parent terminal, etc.
Which file (or files) should I put it in? And how would I do it for all users?
.cshfile in and set the shebang for it. I didn't specifically say that but I think he's able to work that out with a little googling. Failing it, he can use/etc/profilewhich I also mentioned and a lot easier. It's highly unlikely that he's got other users who are using every possible shell that exists. If that's somehow the case then he can use/etc/profilewhich is sourced by everything. – Nasir Riley Jun 25 '18 at 22:46/etc/environment. Do you think it's better/worse than your recommendation of using/etc/profile? Also, will this get read when someone logs into an X session, I thought in that case the bash config isn't read? – lonix Jun 26 '18 at 06:41ssh -Xorssh -Y, then yes, the bash initialization files are indeed read. As long as a shell session is started, the initialization files will be sourced so this will work for you. If this does what you want, you can accept my answer by clicking the check mark next to it. – Nasir Riley Jun 26 '18 at 12:16/etc/environment"better"? – lonix Jun 27 '18 at 06:44/etc/X11/xinit/xinitrc.d/. If you are launching it from the terminal, then.bash_profile,.bashrc,/etc/profile.d/dotnet_optout.sh', or/etc/profilewill all work. It's probably easier to put it in/etc/X11/xinit/xinitrc.d/or in/etc/profile.d/, or if users are using other shells,/etc/profileas you'd otherwise have to put it inside everyone's.bash_profileor.bashrc`. – Nasir Riley Jun 27 '18 at 11:32x) is actually not necessary because the scripts at/etc/profile.dare sourced by Bash. See https://unix.stackexchange.com/q/291404/154671. – Marc.2377 Jun 22 '19 at 01:33