How to create a message box from the command line?
Clash Royale CLAN TAG#URR8PPP
up vote
45
down vote
favorite
Either GUI message boxes, or message boxes that show inside the terminal.
It would also be interesting to be able to get simple input back from the user, e.g. yes / no or radio buttons.
command-line
add a comment |
up vote
45
down vote
favorite
Either GUI message boxes, or message boxes that show inside the terminal.
It would also be interesting to be able to get simple input back from the user, e.g. yes / no or radio buttons.
command-line
7
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44
add a comment |
up vote
45
down vote
favorite
up vote
45
down vote
favorite
Either GUI message boxes, or message boxes that show inside the terminal.
It would also be interesting to be able to get simple input back from the user, e.g. yes / no or radio buttons.
command-line
Either GUI message boxes, or message boxes that show inside the terminal.
It would also be interesting to be able to get simple input back from the user, e.g. yes / no or radio buttons.
command-line
command-line
edited Mar 26 at 8:45
Ciro Santilli 新疆改造中心 六四事件 法轮功
4,64824038
4,64824038
asked Jul 16 '14 at 18:41
user62511
70231529
70231529
7
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44
add a comment |
7
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44
7
7
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44
add a comment |
4 Answers
4
active
oldest
votes
up vote
86
down vote
accepted
For a standard "box around a message", use boxes
:
echo 'This is a test' | boxes
boxes
will look like this (First one. Second one is a custom like cowsay
):
If you mean an alert box, use notify-send
:
notify-send 'title' 'message'
notify-send
looks like this:
You also can use zenity
for a popup window:
zenity --error --text="An error occurred!" --title="Warning!"
Zenity is more graphical and has more options, like having the window appear as a question, using:
zenity --question --text="Do you wish to continue/?"
or even progress bars, using:
find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."
zenity
looks like this:
Or use dialog
, for a command-line only message box:
dialog --checklist "Choose OS:" 15 40 5
1 Linux off
2 Solaris on
3 'HP UX' off
4 AIX off
dialog
looks like this:
Another option is whiptail
:
whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78
whiptail
looks like this:
And if you are truly crazy, use toilet
:
toilet -F border -F gay "CRAZY"
toilet
looks like this:
- Source for boxes
- Source for dialog 1
- Source for dialog 2
- Source for zenity 1
- Source for zenity 2
- Source for whiptail 1
- Source for whiptail 2
- Source for toilet
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
add a comment |
up vote
17
down vote
xmessage
This is the granddaddy of GUI alerts:
xmessage -center "Hello, World!"
Pure retro goodness.
I also bet that it should be widely available on X11 systems.
SO thread: How to show a GUI message box from a bash script in linux? | Stack Overflow
Tested in Ubuntu 18.04.
add a comment |
up vote
7
down vote
And then just because @polym's completely over the top answer missed the classic messaging:
write <username> [<terminal>]
- send a message to another user. Either interactively or as part of a pipe with echo "message" | write username
And the complement to write, wall
to send a message to all users
add a comment |
up vote
0
down vote
If you are willing to pipe the text to a Python wrapper, you can use terminaltables
:
pip3 install colorclass
pip3 install terminaltables
Then in the GitHub Repo, you can use one of the examples to write a python wrapper.
add a comment |
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
86
down vote
accepted
For a standard "box around a message", use boxes
:
echo 'This is a test' | boxes
boxes
will look like this (First one. Second one is a custom like cowsay
):
If you mean an alert box, use notify-send
:
notify-send 'title' 'message'
notify-send
looks like this:
You also can use zenity
for a popup window:
zenity --error --text="An error occurred!" --title="Warning!"
Zenity is more graphical and has more options, like having the window appear as a question, using:
zenity --question --text="Do you wish to continue/?"
or even progress bars, using:
find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."
zenity
looks like this:
Or use dialog
, for a command-line only message box:
dialog --checklist "Choose OS:" 15 40 5
1 Linux off
2 Solaris on
3 'HP UX' off
4 AIX off
dialog
looks like this:
Another option is whiptail
:
whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78
whiptail
looks like this:
And if you are truly crazy, use toilet
:
toilet -F border -F gay "CRAZY"
toilet
looks like this:
- Source for boxes
- Source for dialog 1
- Source for dialog 2
- Source for zenity 1
- Source for zenity 2
- Source for whiptail 1
- Source for whiptail 2
- Source for toilet
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
add a comment |
up vote
86
down vote
accepted
For a standard "box around a message", use boxes
:
echo 'This is a test' | boxes
boxes
will look like this (First one. Second one is a custom like cowsay
):
If you mean an alert box, use notify-send
:
notify-send 'title' 'message'
notify-send
looks like this:
You also can use zenity
for a popup window:
zenity --error --text="An error occurred!" --title="Warning!"
Zenity is more graphical and has more options, like having the window appear as a question, using:
zenity --question --text="Do you wish to continue/?"
or even progress bars, using:
find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."
zenity
looks like this:
Or use dialog
, for a command-line only message box:
dialog --checklist "Choose OS:" 15 40 5
1 Linux off
2 Solaris on
3 'HP UX' off
4 AIX off
dialog
looks like this:
Another option is whiptail
:
whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78
whiptail
looks like this:
And if you are truly crazy, use toilet
:
toilet -F border -F gay "CRAZY"
toilet
looks like this:
- Source for boxes
- Source for dialog 1
- Source for dialog 2
- Source for zenity 1
- Source for zenity 2
- Source for whiptail 1
- Source for whiptail 2
- Source for toilet
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
add a comment |
up vote
86
down vote
accepted
up vote
86
down vote
accepted
For a standard "box around a message", use boxes
:
echo 'This is a test' | boxes
boxes
will look like this (First one. Second one is a custom like cowsay
):
If you mean an alert box, use notify-send
:
notify-send 'title' 'message'
notify-send
looks like this:
You also can use zenity
for a popup window:
zenity --error --text="An error occurred!" --title="Warning!"
Zenity is more graphical and has more options, like having the window appear as a question, using:
zenity --question --text="Do you wish to continue/?"
or even progress bars, using:
find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."
zenity
looks like this:
Or use dialog
, for a command-line only message box:
dialog --checklist "Choose OS:" 15 40 5
1 Linux off
2 Solaris on
3 'HP UX' off
4 AIX off
dialog
looks like this:
Another option is whiptail
:
whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78
whiptail
looks like this:
And if you are truly crazy, use toilet
:
toilet -F border -F gay "CRAZY"
toilet
looks like this:
- Source for boxes
- Source for dialog 1
- Source for dialog 2
- Source for zenity 1
- Source for zenity 2
- Source for whiptail 1
- Source for whiptail 2
- Source for toilet
For a standard "box around a message", use boxes
:
echo 'This is a test' | boxes
boxes
will look like this (First one. Second one is a custom like cowsay
):
If you mean an alert box, use notify-send
:
notify-send 'title' 'message'
notify-send
looks like this:
You also can use zenity
for a popup window:
zenity --error --text="An error occurred!" --title="Warning!"
Zenity is more graphical and has more options, like having the window appear as a question, using:
zenity --question --text="Do you wish to continue/?"
or even progress bars, using:
find /usr | zenity --progress --pulsate --auto-close --auto-kill --text="Working..."
zenity
looks like this:
Or use dialog
, for a command-line only message box:
dialog --checklist "Choose OS:" 15 40 5
1 Linux off
2 Solaris on
3 'HP UX' off
4 AIX off
dialog
looks like this:
Another option is whiptail
:
whiptail --title "Example Dialog" --msgbox "This is an example of a message box. You must hit OK to continue." 8 78
whiptail
looks like this:
And if you are truly crazy, use toilet
:
toilet -F border -F gay "CRAZY"
toilet
looks like this:
- Source for boxes
- Source for dialog 1
- Source for dialog 2
- Source for zenity 1
- Source for zenity 2
- Source for whiptail 1
- Source for whiptail 2
- Source for toilet
edited Feb 7 at 0:59
Jeff Schaller
35.9k952119
35.9k952119
answered Jul 16 '14 at 18:43
polym
6,42643156
6,42643156
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
add a comment |
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
2
2
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
Really complete answer, it's useful! Thank you!
– JBFWP286
Mar 21 '17 at 0:46
add a comment |
up vote
17
down vote
xmessage
This is the granddaddy of GUI alerts:
xmessage -center "Hello, World!"
Pure retro goodness.
I also bet that it should be widely available on X11 systems.
SO thread: How to show a GUI message box from a bash script in linux? | Stack Overflow
Tested in Ubuntu 18.04.
add a comment |
up vote
17
down vote
xmessage
This is the granddaddy of GUI alerts:
xmessage -center "Hello, World!"
Pure retro goodness.
I also bet that it should be widely available on X11 systems.
SO thread: How to show a GUI message box from a bash script in linux? | Stack Overflow
Tested in Ubuntu 18.04.
add a comment |
up vote
17
down vote
up vote
17
down vote
xmessage
This is the granddaddy of GUI alerts:
xmessage -center "Hello, World!"
Pure retro goodness.
I also bet that it should be widely available on X11 systems.
SO thread: How to show a GUI message box from a bash script in linux? | Stack Overflow
Tested in Ubuntu 18.04.
xmessage
This is the granddaddy of GUI alerts:
xmessage -center "Hello, World!"
Pure retro goodness.
I also bet that it should be widely available on X11 systems.
SO thread: How to show a GUI message box from a bash script in linux? | Stack Overflow
Tested in Ubuntu 18.04.
edited yesterday
answered Aug 26 '16 at 19:53
Ciro Santilli 新疆改造中心 六四事件 法轮功
4,64824038
4,64824038
add a comment |
add a comment |
up vote
7
down vote
And then just because @polym's completely over the top answer missed the classic messaging:
write <username> [<terminal>]
- send a message to another user. Either interactively or as part of a pipe with echo "message" | write username
And the complement to write, wall
to send a message to all users
add a comment |
up vote
7
down vote
And then just because @polym's completely over the top answer missed the classic messaging:
write <username> [<terminal>]
- send a message to another user. Either interactively or as part of a pipe with echo "message" | write username
And the complement to write, wall
to send a message to all users
add a comment |
up vote
7
down vote
up vote
7
down vote
And then just because @polym's completely over the top answer missed the classic messaging:
write <username> [<terminal>]
- send a message to another user. Either interactively or as part of a pipe with echo "message" | write username
And the complement to write, wall
to send a message to all users
And then just because @polym's completely over the top answer missed the classic messaging:
write <username> [<terminal>]
- send a message to another user. Either interactively or as part of a pipe with echo "message" | write username
And the complement to write, wall
to send a message to all users
answered Jul 16 '14 at 22:13
HBruijn
5,4761525
5,4761525
add a comment |
add a comment |
up vote
0
down vote
If you are willing to pipe the text to a Python wrapper, you can use terminaltables
:
pip3 install colorclass
pip3 install terminaltables
Then in the GitHub Repo, you can use one of the examples to write a python wrapper.
add a comment |
up vote
0
down vote
If you are willing to pipe the text to a Python wrapper, you can use terminaltables
:
pip3 install colorclass
pip3 install terminaltables
Then in the GitHub Repo, you can use one of the examples to write a python wrapper.
add a comment |
up vote
0
down vote
up vote
0
down vote
If you are willing to pipe the text to a Python wrapper, you can use terminaltables
:
pip3 install colorclass
pip3 install terminaltables
Then in the GitHub Repo, you can use one of the examples to write a python wrapper.
If you are willing to pipe the text to a Python wrapper, you can use terminaltables
:
pip3 install colorclass
pip3 install terminaltables
Then in the GitHub Repo, you can use one of the examples to write a python wrapper.
answered Jan 10 at 12:15
not2qubit
690714
690714
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f144924%2fhow-to-create-a-message-box-from-the-command-line%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
7
What do you mean by "message box"? A graphic alert box, a popup message box? Something else?
– polym
Jul 16 '14 at 18:44