Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I do not know how the title got to "bash" and cannot cnange / edit it
I there a way to modify whiptail menu display to show second parameter on two ( at least) lines?
In attached file the second menu parameter "falls off" and is not visble.
it is probably a root owned file, try using sudo nano, or your favorite terminal text editor using sudo to do so. I do not see any bash, just the path to its location.
I am using this command in bash script already "running in " sudo nano editor. The "menu" output layout is pretty temperamental and as fas as I can tell there is no provision to "roll the text of the second parameter over" to new new line.
Update
I can option the display width to partially show both parameters - the display gets centered ( ?) in window .
The obvious solution then is to have "horizontal scroll ".
My best "solution" is to ask owner of whiptail to add such feature or somehow hack it in.
PS "Thread tools" do not have an option to edit title.
Jim232, i am sorry that apparently nobody knows how to answer your question.
neither do I, unfortunately.
maybe you could explain what whiptail actually is, how you are using it and where it fails (code, not narrative)?
whiptail is not in the software repositories of my distro.
I am not sure how to respond.
I am having rough time "participating" in forums. Usually after few "responses" I either get banned for being too open or get sidetracked by editors.
Not surprised about lack of responses. By rough estimate only about 80% of my posts actually help me to resolve an issue.
So - take a look at "raspi-config" , but not sure if you can actually get it without loading Raspi flavour of Linux.
"whiptail" is a bash command , sort of poor man GUI used to poorly navigate Raspberry Pi configuration / setting.
I am not knowledgeable how "copyrighted " this configuration file is, and I really do not care. I am building my own using bash script.
You can of course ask Mrs Google about "whiptail bash Linux", if you are interested.
Cheers
I am using this command in bash script already "running in " sudo nano editor. The "menu" output layout is pretty temperamental and as fas as I can tell there is no provision to "roll the text of the second parameter over" to new new line.
I'm guessing that this is the meat of your question, yes?
Try imbedding a newline in the text:
That is part of the "problem" - each menu item has two parameters in sequence, separated by "standard" Linux " extended line \ ". There cannot be anything "between" the parameters.
Yes, I did added "\n" to the parameter itself and it did not have desired effect.
Here is an example , part of it, of the initial whiptail test (non working) menu:
TEST=$(whiptail \
--title "DEBUG Raspberry Pi Software Configuration Tool (raspi-config)" \
--backtitle "Current work in progress file $0 " \
--menu "Setup Options" $WT_HEIGHT $WT_WIDTH $WT_MENU_HEIGHT \
--default-item "10 DEBUG Enable debug " \
--cancel-button Finish --ok-button Select \
"${TESTarray[@]}" \
"$menuFull" "$menuFull" \
"1 Change User Password" "Change password for the current user" \
"2 Network Options" "Configure network settings" \
"3 Boot Options" "Configure options for start-up" \
I would like to add more text to the parameters and still be able to display it.
I tried the usual ways of embedding a line feed but nothing worked and would guess it is probably a limitation of whiptail.
By the way the first "parameter" is the tag and the second is a description. The tag is the return value which is assigned to TEST variable in your script.
By rough estimate only about 80% of my posts actually help me to resolve an issue.
that would be an incredibly high succes rate.
congratulations!
Quote:
Originally Posted by Jim232
That is part of the "problem" - each menu item has two parameters in sequence, separated by "standard" Linux " extended line \ ". There cannot be anything "between" the parameters.
Yes, I did added "\n" to the parameter itself and it did not have desired effect.
i do not see any "\n" in your example.
it's also possible that the TEST="$(whipatil ......)" construct expands the \n to an actual newline; have you tried adding \\n or \\\n instead, or maybe '\n' (single quotes)?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.