-
Notifications
You must be signed in to change notification settings - Fork 511
Wireshark installation fails in non-interactive environments #2577
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
Wireshark installation fails in non-interactive environments #2577
Conversation
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.
There was a problem hiding this 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=noninteractiveenvironment 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=noninteractivebefore installingwireshark-common.
- Modified line 966 to set
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
-
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. ↩
There was a problem hiding this 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_FRONTENDenvironment variable tononinteractiveto 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.
|
thank you, maybe this should be set on top of the install script to apply to all apt invocations? |
|
You're absolutely right — setting I'll update the script accordingly to export this environment variable near the top. Thanks for the feedback! |
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:
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.