Custom environment variables for Custom Terminal connections

Hi,

Royal TS V26 on Windows just added a really nice capability to its Custom Terminal / PTY connections (currently in beta): the Advanced page lets you define custom environment variables, including values resolved through replacement tokens. That means protected custom fields and custom properties can be mapped securely into the terminal environment.

Would it be possible to bring the same feature to Royal TSX on macOS?

Custom Terminal connections already exist in TSX, but as far as I can tell there’s currently no way to provide a list of environment variables sourced from credentials. The only workaround is a Key Sequence Task, which has two real limitations: it’s tied to a single user/password pair, and the secrets are visible on screen in the terminal.

Being able to map secrets (API keys, tokens, passwords) from protected fields straight into the environment of a dedicated terminal (without exposing them in the session and without keeping them permanently in the user’s environment) would be very valuable for DevOps workflows. It keeps secrets scoped to the terminal that actually needs them, which is exactly the use case the Windows version highlights.

Thanks for considering it!

Hi,
Currently, that feature isn’t really on the roadmap since it is actually already possible in Royal TSX. The best way to do this would be via the “Custom Commands” in the Terminal Connection.

Here is an example of how you can configure this:

  • Create a terminal connection as a Custom Terminal
  • Create a protected property named Name in the custom properties
  • Enter your desired value. I used RoyalApps as the value.

Then, in the Custom Commands section, I configured the following:

exec env GREETING="Hello" 
NAME="$CustomProperty.Name$" zsh

Once you have done that you can test it by opening the connection and typing the following:
echo $GREETING $NAME

If everthing is set up correctly, you will get the following output:
Hello RoyalApps

I hope this helps!