Skip to content

Conversation

@sunba91-su
Copy link
Contributor

Problem

When running the installer script, the terminal exits unexpectedly during the Wireshark package installation. This is because wireshark-common prompts for user input (e.g., permission to allow non-superusers to capture packets), which requires an interactive terminal.

This breaks automated installations or any environment (like CI/CD pipelines or Docker builds) where user interaction is not possible.

Solution

Set the environment variable DEBIAN_FRONTEND=noninteractive before installing Wireshark to suppress the interactive prompt:

DEBIAN_FRONTEND=noninteractive apt-get install -y wireshark

This ensures the script runs smoothly in non-interactive sessions.

Additional Notes

  • The script could optionally pre-answer debconf selections if needed.

  • Tested on Debian/Ubuntu systems.

  • Does not impact systems where interaction is possible — only improves automation compatibility.

Set DEBIAN_FRONTEND=noninteractive to prevent terminal from prompting during Wireshark installation. This is required in automation or CI environments where user input is not possible.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @sunba91-su, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request addresses an issue where the Wireshark installation fails in non-interactive environments due to the wireshark-common package prompting for user input. To resolve this, the pull request sets the environment variable DEBIAN_FRONTEND=noninteractive before installing Wireshark, suppressing the interactive prompt and ensuring smooth installation in automated environments.

Highlights

  • Problem: Wireshark installation fails in non-interactive environments due to interactive prompts during package installation.
  • Solution: Sets the DEBIAN_FRONTEND=noninteractive environment variable before installing Wireshark to suppress interactive prompts.
  • Impact: Improves automation compatibility without affecting systems where interaction is possible.

Changelog

  • installer/cape2.sh
    • Modified line 966 to set DEBIAN_FRONTEND=noninteractive before installing wireshark-common.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A silent install,
No prompts to enthrall,
Wireshark now flows,
Where automation goes,
No longer to stall.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a critical issue where Wireshark installation fails in non-interactive environments. The solution of setting the DEBIAN_FRONTEND=noninteractive environment variable is a standard and effective approach. The changes are straightforward and well-explained in the pull request description.

Summary of Findings

  • Setting environment variable: The solution correctly sets the DEBIAN_FRONTEND environment variable to noninteractive to prevent prompts during Wireshark installation in non-interactive environments.

Merge Readiness

The pull request effectively solves the problem described and the changes are minimal and safe. I recommend merging this pull request after verifying that the change does not negatively impact interactive installations. I am unable to directly approve the pull request, and users should have others review and approve this code before merging.

@doomedraven doomedraven merged commit a2da40e into kevoreilly:master Apr 29, 2025
3 checks passed
@doomedraven
Copy link
Collaborator

thank you, maybe this should be set on top of the install script to apply to all apt invocations?

@sunba91-su
Copy link
Contributor Author

You're absolutely right — setting DEBIAN_FRONTEND=noninteractive globally at the top of the install script is a better approach. This ensures all apt-get commands behave consistently in non-interactive environments, not just the Wireshark installation.

I'll update the script accordingly to export this environment variable near the top. Thanks for the feedback!

@sunba91-su sunba91-su deleted the bugfix/wireshark-noninteractive branch April 29, 2025 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants