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
[Installer] One-step install command leads to minimal whiptail sizes #3323
Comments
|
Is that a terminal emulator screencap? Is it really 150x300? Or do you just have it set to really small fonts? |
@dschaper Please rerun the troubleshooting commands I've posted above, so you can try to replicate the underlying issues on your setup. I don't believe that this is different on different distros but at least I never tested it on Fedora or CentOS. |
I have 4k display, my terminal emulator is set to 140x50, this seems more of a self-inflicted issue. The information in the dialog boxes won't change, you'll just have huge whiptail boxes with a single sentence and acres of whitespace. I'd rather have small boxes. For me this isn't an issue. |
And really, you don't need to @ me, I read everything. |
I mean, I rarely fullscreen my terminal on my 3840x1080 monitor, but just for fun: With the proposed: Personally I prefer the former. I don't need the whiptail to expand to fit the screen, the information within stays at the same size, and looks better in the smaller window. Besides which, I think the proposed command is arguably more prone to user error (obviously not if they copy paste), but there is more to go wrong when typing it out. |
If your argument is "Why even do it?" my response will be to remove it completely instead of changing it for your edge case. |
We just need to make the |
@dschaper |
Great, will look it over. |
It's whiptail, not a responsive webpage. |
I prefer the smaller dialog box. |
Ah yes, it is 👍. |
In raising this issue, I confirm the following:
How familiar are you with the the source code relevant to this issue?:
10
Expected behaviour:
Actual behaviour:
curl -sSL https://install.pi-hole.net | bash
, the whiptail dialogs have always minimal size.Steps to reproduce:
stty size
curl -sSL https://install.pi-hole.net | bash
Troubleshooting undertaken, and/or other relevant information:
[ -t 0 ]
, before checking terminal dimensions. If bash is called within a pipe, it does not have one:24 80
which leads to minimum20x70
whiptail dimensions.stty
to work:tput
is an alternative to get terminal dimensions, which does not rely on SDTIN, hence can be called from within a pipe:stty
command.tput
has another issue, at least on Debian until including Stretch. Instead of STDIN it requires either STDOUT or STDERR to be attached to the terminal. If both are redirected, e.g. someone pipes installer output totee
to create a log file, it does not work:Suggested solution:
Since
stty
simply cannot work without free STDIN and there might be other commands affected as well, and sincetput
has another limitation on older distro versions + adds a package dependency, I suggest to change the one-line install command:bash -c
allows to preserve all file descriptors (STDIN, STDOUT, STDERR) for best compatibility with commands that interact with the terminal in any way.-f
option leads to 40X responses to be treated as errors, so that curl exits, instead of forwarding a possible error page html code to be executed by bash: https://manpages.debian.org/buster/curl/curl.1.en.html#OPTIONSThe text was updated successfully, but these errors were encountered: