Skip to content
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

Filter environment variables like GNOME Terminal #741

Open
amezin opened this issue Jan 10, 2024 · 2 comments
Open

Filter environment variables like GNOME Terminal #741

amezin opened this issue Jan 10, 2024 · 2 comments
Labels
enhancement New feature or request needs VTE changes

Comments

@amezin
Copy link
Member

amezin commented Jan 10, 2024

ddterm should filter environment variables like GNOME Terminal does: https://gitlab.gnome.org/GNOME/gnome-terminal/-/blob/006fbb8a2d986eb59ed2bb4d1ed29110d5032fb4/src/terminal-client-utils.cc#L341

Currently, every spawned process (shell) inherits all variables from ddterm process.

VTE has a flag for it: https://gjs-docs.gnome.org/vte291~2.91/vte.spawn_no_parent_envv

However, it can't be passed from GJS, because:

JS ERROR: Error: 0x2000040 is not a valid value for flags argument spawn_flags

As a workaround, some variables could be filtered out by unsetting them in ddterm's process environment. For the remaining ones, overriding them with an empty value could work.

@amezin amezin added enhancement New feature or request needs VTE changes labels Jan 10, 2024
@amezin
Copy link
Member Author

amezin commented Jan 10, 2024

@amezin
Copy link
Member Author

amezin commented Jan 11, 2024

Console doesn't seem to filter environment variables. However, when started through .desktop file, it doesn't have things like GJS_DEBUG_TOPICS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs VTE changes
Projects
None yet
Development

No branches or pull requests

1 participant