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

Reset icon name and window title when leaving shell #1319

Open
andreas-gruenbacher opened this issue Feb 12, 2024 · 4 comments
Open

Reset icon name and window title when leaving shell #1319

andreas-gruenbacher opened this issue Feb 12, 2024 · 4 comments
Labels
enhancement feature request, rfe

Comments

@andreas-gruenbacher
Copy link

When entering the mock shell, mock sets the terminal icon name and window title to "", or whatever else the configuration file says.

That icon name and window title isn't reset when leaving the shell, so the title will stay the same until something else resets it.

When leaving the shell, mock should do printf "\033]0;\007" to reset the terminal icon name and window title.

@praiskup
Copy link
Member

Thank you for the report. We have to check if mock runs in the terminal first, right? To avoid unwanted output on possibly-parsed stdout.

@praiskup praiskup added the enhancement feature request, rfe label Feb 14, 2024
@andreas-gruenbacher
Copy link
Author

andreas-gruenbacher commented Feb 14, 2024

Thank you for the report. We have to check if mock runs in the terminal first, right? To avoid unwanted output on possibly-parsed stdout.

There ought to exist a check that prevents mock from setting the title when it's inappropriate, right? The same condition should apply for resetting the title ...

@praiskup
Copy link
Member

Have you already checked that this is done by mock?

@andreas-gruenbacher
Copy link
Author

The window title mock uses by default is <mock-chroot>; see the PROMPT_COMMAND environment variable.

I'm only running into this issue on systems that don't set the window title themselves.

A command like mock --shell cmd, with a specific command to run, doesn't use PROMPT_COMMAND, so it also doesn't set the window title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement feature request, rfe
Projects
None yet
Development

No branches or pull requests

2 participants