As a user I expect that when running "tilix" a new window opens, with a shell that has the exact same environment variables set as the environment where I run tilix.
Actual results
In reality, this is only true for the very fist tilix window as further invocations of "tilix" (without arguments) just signal the main process to create a new window. The shell in this new window is created in the envirionment of this first process, the current environment is ignored.
Usecase
I'm occasionally setting environment variables and like to spawn multiple new terminals with those (e.g. $VERSION for package maintenance).
Most profoundly I have a script/shortcut in nautilus to spawn a new terminal and some functions in .bashrc to work with the selected files transferred from nautilus to bridge the gap between GUI File manager and terminal. This used to work great with Gnome Terminal but fails with Tilix.
Possible workarounds
I'm currently testing with --new-process which seems to be okay, but per man page this is "not recommended and only intended for debugging purposes". Lets hope I'm not pushing my luck here.
Further information
A similar case concerning $DISPLAY is already discussed. Please note that this is a different issue because I care about the environment within the new terminal, not the DISPLAY which affects the GUI itself.
The Gnome Terminal seems to make this work to my expectation, also running in a single process. Would it be feasible to capture the environment and transfer it to the main process to use it for the newly spawned terminal?
Expectation
As a user I expect that when running "tilix" a new window opens, with a shell that has the exact same environment variables set as the environment where I run tilix.
Actual results
In reality, this is only true for the very fist tilix window as further invocations of "tilix" (without arguments) just signal the main process to create a new window. The shell in this new window is created in the envirionment of this first process, the current environment is ignored.
Usecase
I'm occasionally setting environment variables and like to spawn multiple new terminals with those (e.g. $VERSION for package maintenance). Most profoundly I have a script/shortcut in nautilus to spawn a new terminal and some functions in
.bashrc
to work with the selected files transferred from nautilus to bridge the gap between GUI File manager and terminal. This used to work great with Gnome Terminal but fails with Tilix.Possible workarounds
I'm currently testing with
--new-process
which seems to be okay, but per man page this is "not recommended and only intended for debugging purposes". Lets hope I'm not pushing my luck here.Further information
A similar case concerning $DISPLAY is already discussed. Please note that this is a different issue because I care about the environment within the new terminal, not the DISPLAY which affects the GUI itself.
The Gnome Terminal seems to make this work to my expectation, also running in a single process. Would it be feasible to capture the environment and transfer it to the main process to use it for the newly spawned terminal?