ncurses Dialogs for your Linux Shell Script tutorial

  Рет қаралды 49,272

Kris Occhipinti

Kris Occhipinti

Күн бұрын

filmsbykris.com
/ metalx1000
Playlist:
• The Linux Shell - 2016...
This video was sponsored by:
Karl Arvid
John Tedesco - stainlesssteeltoolwrap.com/
Steven C. Morreale
For help: filmsbykris.com/irc
FaceBook: / 225113590836253

Пікірлер: 54
@sarnobat2000
@sarnobat2000 16 күн бұрын
11:05 This is the part I as a beginner needed. I can't believe how difficult it was to find a minimal working example. Wait, I better try it before I speak too soon.
@tonpo27
@tonpo27 Жыл бұрын
Every time I try to find something tough/obscure, I stumble on you. Thank you for being a pioneer!
@BUYXR
@BUYXR Жыл бұрын
yeah no kidding! Doom, programming, he does everything
@TraceguyRune
@TraceguyRune Жыл бұрын
This are so annoying but so worth it. I spend hours trying to tweak it exactly as I need it.
@TransexistenceMusic
@TransexistenceMusic 10 ай бұрын
Absolute lifesaver for me! Thank you very much!!!! I was looking everywhere trying to figure out how to use dialog in this exact manner and was having zero luck! TYVM!
@DigitalMetal
@DigitalMetal 10 ай бұрын
Glad it helped!
@LundMr1
@LundMr1 5 жыл бұрын
This is so cool :) Thank you for making this short video. This helped me a lot when I needed a file selector in bash!
@WeedMIC
@WeedMIC 5 жыл бұрын
ty ever sm - i was going to use urwid, but this seems so much easier (the way you presented it).
@markharrington5826
@markharrington5826 8 жыл бұрын
Excellent learn t something new again today beats having to create a message box with C++ or with java for ease and use thank you Kris Its an exit code same as all msgboxes which return and integer 0,1,2 depending on what type of msgbox you use
@AmichaiRotman
@AmichaiRotman 6 жыл бұрын
Great job. Very simple to understand!
@GeekMustHave
@GeekMustHave 6 жыл бұрын
Nice video. I've used dialog "back in the day". I needed a refresher to help kick-start the memory. I'm going to try and used Dialog with CYGWin in Powershell. Need to make the Powershell scripts easier for the operator to uderstand. I like yor presentation style. Keep broadcasting!!
@joeyvico
@joeyvico 8 жыл бұрын
Your channel is awesome Kris!!!
@DigitalMetal
@DigitalMetal 8 жыл бұрын
Thanks. And thank you for spelling my name correctly. :D Be sure to check out the second channel I just started: kzbin.info/door/FsvtR4aNPwefLjR1a9Hgvg
@maxmeranda
@maxmeranda 8 жыл бұрын
Thanks Kris!
@SO-dl2pv
@SO-dl2pv 6 жыл бұрын
in 12:00 , the 2>file.txt means redirect the stderr output to file.txt
@AIGenerated
@AIGenerated 4 жыл бұрын
Just what I needed, thanks
@dderudito
@dderudito 4 жыл бұрын
Really useful/efficient!
@user-sh6nv1sx9o
@user-sh6nv1sx9o 6 жыл бұрын
Thanks for short but useful video! One question: can I create with dialog multi-line input box?
@hrnekbezucha
@hrnekbezucha 7 жыл бұрын
This is great!
@markharrington5826
@markharrington5826 8 жыл бұрын
Could be very useful for creating a simple text based database For example , names and telephone numbers without the extremes of perhaps having to got through the entire procedure of creating a GUI in another language , having to open a stream to write to a file and then further a read the file back that file with a separate GUI based mechanism and again opening up a read stream to read file back in You could then combine this with basic bash scripts plus GUI depending on your exit code to select an operation , for example a sort or find or what ever other operation you might need on small scale with out all the massive intricacy of coding and understanding class inheritance , polymorphism and having to use try catch statements so as to deal with any errors although yes you could build these in with bash script mechanisms Ideal thinking here might be a simple logon GUI which operates or allows use of browser for example btw certain times checking that user is allowed and has access rights For other people who would like to go into this more then here are some more notes for you on using dialog part of the N curses library www.linuxjournal.com/article/2807 Just an idea !!
@baee7478
@baee7478 2 жыл бұрын
That is what I looking for. Thanks
@EricMuranoAU
@EricMuranoAU Жыл бұрын
So cool!!
@Asimov16
@Asimov16 6 жыл бұрын
I have used dialog in Bash but would like to also use it i C++. Have you any pointers?
@rematador14
@rematador14 5 жыл бұрын
hi Kris, do u know how can i run some instructions when i select an option? tks :D
@johnny5240
@johnny5240 10 күн бұрын
One annoying thing when running dialog in a script is that the blue background does not disappear when you are done with the dialog box. I know that many have had the same problem. After hours of searching, I figured it out. Run this script twice in a row and you'll understand what I mean. #!/bin/bash # This is the solution to the problem where the blue background # does not disappear when you exit the dialog. # Use --keep tite. # Show information before dialog echo "Information that should not disappear from the terminal." echo "More information can be found here." # Show a dialog box dialog --title "Example" --keep-tite --msgbox "This is a message." 10 50 # Continue with the script echo "The dialog box has closed and we continue with the script here." exit 0
@MrApplewine
@MrApplewine 4 жыл бұрын
Mine just seems to print the image to the console, but it is not interactive. If I press enter it just shows the terminal prompt and there is no blinking cursor on the dialog boxes or anything.
@joelamoako6778
@joelamoako6778 4 жыл бұрын
how do i store it in a variable
@alerey4363
@alerey4363 5 жыл бұрын
This looks a lot like Debian text install; also reminds me of 90s Borland's TurboVision
@derekfrost8991
@derekfrost8991 5 жыл бұрын
Very helpful.. :)
@angelflores5893
@angelflores5893 2 жыл бұрын
how cn i see the return from the menu? :(
@krzysztofwaleska
@krzysztofwaleska 7 жыл бұрын
Your shell is bash or something different? Like exit code on red in prompt. Nice feature :)
@weizhang6725
@weizhang6725 6 жыл бұрын
It is zsh.
@mahfuzurrahman601
@mahfuzurrahman601 5 жыл бұрын
Since it has grml name there , I'm gussing it's zsh. But above is doable in bash.
@marcello4258
@marcello4258 3 жыл бұрын
isnt 2> the error output?
@jamescobb2618
@jamescobb2618 5 жыл бұрын
Cool
@osiris5449
@osiris5449 6 жыл бұрын
Wait-- With this we could basically design a computer from scratch? Like, Boot, GUI and everything? Even login credentials and stuff? :s
@trinketos
@trinketos 4 жыл бұрын
nope
@keokawasaki7833
@keokawasaki7833 4 жыл бұрын
@@trinketos lol, that was kinda mean... but someone *had* to pop his bubble, i guess. XD
@otsen82
@otsen82 5 жыл бұрын
Hello Kris and everyone, do you know how to save the output into a var, I try this but it doesn't work. :( $> myvar=$(dialog --textbox "Enter something" 5 30) Any idea? Great video, thanks for all.
@rabblerabble4969
@rabblerabble4969 5 жыл бұрын
AnsInput=$(dialog --inputbox "Enter Something:" 20 60 "Text here..." 2>&1 >/dev/tty)
@techwithdave
@techwithdave 4 жыл бұрын
Here is an example of what worked for me: exec 3>&1 sizeX=10 sizeY=30 options=3 value=$(dialog -menu “Please pick One” $sizeX $sizeY $options 1 “blue” 2 “green” 3 “pink” 2&1 1>3) returnValue=$? exec 3>&- echo “user selected”$value echo “return value is 1 for cancel, 0 for OK”$returnValue
@markharrington5826
@markharrington5826 8 жыл бұрын
For further reading once you have followed the tutorial via Kris then you might like to try this in C which is provided with Linux distros although you may have to install the library to use this and the c compiler Please see the following I think you will notice the difference very quickly and how much more you have to do as opposed to what Kris is showing you here tldp.org/HOWTO/NCURSES-Programming-HOWTO/helloworld.html
@MoreChannelNoise
@MoreChannelNoise 8 жыл бұрын
Thanks fot that ncurses link, I downloaded the Tutorial in pdf format.
@markharrington5826
@markharrington5826 8 жыл бұрын
+MoreChannelNoise Welcome
@mason-pe5lk
@mason-pe5lk 6 жыл бұрын
4:49, it's sad that you choose no.
@Crazmuss
@Crazmuss 8 жыл бұрын
But 2> is stderr, why its put output in stderr?
@DigitalMetal
@DigitalMetal 8 жыл бұрын
Because the dialog box itself is the Standard Output. Try redirecting the standard output into a file and you won't see anything on the screen, because it's going into the file. Then open the with something like VIM and you will see the characters that created the dialog box.
@ShivamJha00
@ShivamJha00 7 жыл бұрын
But how to implement it in c++
@user-gr5do8nk7e
@user-gr5do8nk7e 7 жыл бұрын
lmgtfy.com/?q=ncurses+tutorial+for+c%2B%2B first link
@binarysaiyan9389
@binarysaiyan9389 2 жыл бұрын
Menu at 8:52
@douwehuysmans5959
@douwehuysmans5959 6 жыл бұрын
return value
@janjezek9333
@janjezek9333 5 жыл бұрын
Why is "yes" 0 and "no" a 1 (one)? totally upside down! I cant understand who decided to swap that against ALL programming languages on this planet...
@DigitalMetal
@DigitalMetal 5 жыл бұрын
Be cause the standard for exit codes in programming is '0' for success and '1' for fail. I think this is true for all programming languages, because it's how all operating system interpret exit codes. If there are no problems then the result is '0'. tldp.org/LDP/abs/html/exitcodes.html
Custom File Selector in a Linux Shell Script tutorial Part 1
9:54
Kris Occhipinti
Рет қаралды 3,1 М.
Use curses, don't swear
30:15
Next Day Video
Рет қаралды 85 М.
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
Пранк пошел не по плану…🥲
00:59
Саша Квашеная
Рет қаралды 6 МЛН
Transform Your Scripts With Bash Simple Curses
16:15
DistroTube
Рет қаралды 107 М.
Learning Awk Is Essential For Linux Users
20:02
DistroTube
Рет қаралды 291 М.
Zenity Dialog for your Linux Shell Script GUI tutorial
8:20
Kris Occhipinti
Рет қаралды 15 М.
Add Dialogs And Menus To Shell Scripts With Whiptail
23:09
DistroTube
Рет қаралды 19 М.
Bash vs ZSH vs Fish: What's the Difference?
13:32
Eric Murphy
Рет қаралды 168 М.
BASH scripting will change your life
14:18
NetworkChuck
Рет қаралды 1 МЛН
Write Your Own Bash Scripts for Automation [Tutorial]
16:35
Null Byte
Рет қаралды 756 М.
Linux File System/Structure Explained!
15:59
DorianDotSlash
Рет қаралды 4,1 МЛН
03 Shell Script Spinner Animation Tutorial
12:39
Kris Occhipinti
Рет қаралды 34 М.
Проверил, как вам?
1:00
Коннор
Рет қаралды 15 МЛН
Gosta de 🌟 e 🍿?
0:19
F L U S C O M A N I A
Рет қаралды 10 МЛН
Rajesh ka flying dance 😂
0:11
Rajesh Kumar Shorts 14
Рет қаралды 18 МЛН
Телега - hahalivars
1:00
HAHALIVARS
Рет қаралды 7 МЛН
Don´t WASTE FOOD pt.3
0:20
LosWagners ENG
Рет қаралды 18 МЛН
Don´t WASTE FOOD pt.3
0:20
LosWagners ENG
Рет қаралды 18 МЛН