-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variable are not realoaded unless you Repair FluentTerminal #131
Comments
You will need to close all windows and the system tray component, only then will relaunchinv the app let you see changes in environment variables. |
Hi @Riebart, thanks for the quick reply. I did not noticed the tray icon before and I now moved it to be always visible. 👍 |
The reason that you need to restart the system tray service is that the terminal windows you see are just the front end to the shell processes. Those shell processes (In your case, So when you change an environment variable, that change is only reflected in new processes, and spawned terminals will only inherit the old environment (before you made your changes) that the system tray service was launched with originally. |
We might be able to improve this with ConPTY since we get more control on how the processes are created |
@Riebart thanks for the explanation. It's all clear 👍 @felixse thanks for reaching out and for considering an improvement for FluentTerminal. My two cents here is that, from a user perspective (and even more from a Developer perspective), is much more intuitive that, by opening a new, say, powershell tab, the new terminal is like a new process and everything is started anew, including environment variable. By the way, great work with FT. I really like it and use it on a daily-basis 🎉 PS: what is the module name (or whatever it is) that change your terminal prompt line as in the screenshot image of the home project page? It's really cool and similar to the one present in Debian! |
I totally agree with you on this, I just didn't come around to address this issue so far. I have described my setup here but you can also achieve similar results with the fish shell and oh-my-fish or zsh and oh-my-zsh |
@felixse great, thanks for sharing your opinion about this matter. Thanks for the setup instruction, I finally have a very cool theme as well 🎉 |
It is important to understand that this behaviour is almost ubiquitous. Cmder also behaves like this, as well as the standard terminal emulators on Ubuntu (you need to configure them run the shell command as a login shell to get it to load the new environment files on launch). Solving this, in the unix world, is done by the shell ( At it's core, it is because environment variables are inherited from parent processes, and without special actions taken by the process (unix shells will typically read profile scripts in /etc/profile.d, and the user's home directory when started, with the specific scripts being read depending on whether the shell is started interactively or not), changes to the system environment will not propagate to those grandchild processes. With ConPTY, we may be able to do something about this, but a portable solution would be adding scripts for your powershell profiles that re-read the system environment, and insert it when the process is launched, like |
It is also possible to refresh environment variable without restart using the |
I have no idea how this working, I have the same problem as the title, has check on the tray icon and all the running app, nothing is running FluentTerminal but still can't recognize the path environment, then I close the |
It is mostly no different than "repair"ing as suggested above. But I believe this different way can help understand the cause. It looks like, closing all windows is not quitting the app, and the app is only refreshing env vars on start up. |
You could just add it to your terminal profile |
Yes, but this should be default behavior should be default, since expected by most users, which is why this issue exists. |
It has been nearly five years, and this problem still exists ... In any case, this problem affects the experience |
Still an issue in April 2024. Pulled out my hair before realizing it was Fluent that was having the issue. |
Use case
Workaround
Under Windows 10, go to Apps & Feature, look for FluentTerminal, go to Advanced Options, under Reset, click Repair.
The environment variable are reload correctly.
The text was updated successfully, but these errors were encountered: