Alert notification
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?
bash shell
add a comment |Â
up vote
0
down vote
favorite
I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?
bash shell
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?
bash shell
I wrote simple script which is running all the time and whenever the size of a file is changed it will write something like "The size has changed" to terminal but instead of terminal message, is it possible to actually get some prompt or some alert sound like in C?
bash shell
bash shell
edited Mar 3 '16 at 22:12
Anthon
59.2k1798161
59.2k1798161
asked Mar 3 '16 at 22:02
kvway
1031
1031
add a comment |Â
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
1
down vote
accepted
In C you can output the BEL character 'a'. In a script you can do so with:
echo -e 'a'
If you don't get a sound with that, be sure to check that there is no
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(and if there is comment it out and reboot).
Alternatively, if you have a nice sound short sound file xyz.mp3
, and have vlc
installed, you can do:
cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with-n
but not getting the BEL to sound looks like a terminal setting problem to me.
â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't haveblacklist pcspkr
in your/etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)
â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
 |Â
show 3 more comments
up vote
2
down vote
If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:
tput flash
For most systems, tput
accepts terminfo
names including flash
. The terminfo manual for ncurses says:
flash_screen flash vb visible bell (may
not move cursor)
and
If the terminal has a way of flashing the screen to indi-
cate an error quietly (a bell replacement) then this can
be given as flash; it must not move the cursor.
A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM
to xterm
(but xterm
itself works).
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What doesecho $XTERM_VERSION
show?
â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
 |Â
show 1 more comment
up vote
0
down vote
how to get service start & stop alert through script
New contributor
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
In C you can output the BEL character 'a'. In a script you can do so with:
echo -e 'a'
If you don't get a sound with that, be sure to check that there is no
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(and if there is comment it out and reboot).
Alternatively, if you have a nice sound short sound file xyz.mp3
, and have vlc
installed, you can do:
cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with-n
but not getting the BEL to sound looks like a terminal setting problem to me.
â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't haveblacklist pcspkr
in your/etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)
â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
 |Â
show 3 more comments
up vote
1
down vote
accepted
In C you can output the BEL character 'a'. In a script you can do so with:
echo -e 'a'
If you don't get a sound with that, be sure to check that there is no
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(and if there is comment it out and reboot).
Alternatively, if you have a nice sound short sound file xyz.mp3
, and have vlc
installed, you can do:
cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with-n
but not getting the BEL to sound looks like a terminal setting problem to me.
â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't haveblacklist pcspkr
in your/etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)
â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
 |Â
show 3 more comments
up vote
1
down vote
accepted
up vote
1
down vote
accepted
In C you can output the BEL character 'a'. In a script you can do so with:
echo -e 'a'
If you don't get a sound with that, be sure to check that there is no
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(and if there is comment it out and reboot).
Alternatively, if you have a nice sound short sound file xyz.mp3
, and have vlc
installed, you can do:
cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3
In C you can output the BEL character 'a'. In a script you can do so with:
echo -e 'a'
If you don't get a sound with that, be sure to check that there is no
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(and if there is comment it out and reboot).
Alternatively, if you have a nice sound short sound file xyz.mp3
, and have vlc
installed, you can do:
cvlc --no-one-instance --volume 100 --quiet --no-loop --no-repeat --play-and-exit xyz.mp3
edited Mar 3 '16 at 22:47
answered Mar 3 '16 at 22:14
Anthon
59.2k1798161
59.2k1798161
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with-n
but not getting the BEL to sound looks like a terminal setting problem to me.
â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't haveblacklist pcspkr
in your/etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)
â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
 |Â
show 3 more comments
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with-n
but not getting the BEL to sound looks like a terminal setting problem to me.
â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't haveblacklist pcspkr
in your/etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)
â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
Yeah but it does not make any sound i have already tried it just gives me newline
â kvway
Mar 3 '16 at 22:16
You can prevent the newline with
-n
but not getting the BEL to sound looks like a terminal setting problem to me.â Anthon
Mar 3 '16 at 22:18
You can prevent the newline with
-n
but not getting the BEL to sound looks like a terminal setting problem to me.â Anthon
Mar 3 '16 at 22:18
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Yeah it may be any idea how to fix it?
â kvway
Mar 3 '16 at 22:19
Have you checked that your don't have
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)â Anthon
Mar 3 '16 at 22:23
Have you checked that your don't have
blacklist pcspkr
in your /etc/modprobe.d/blacklist.conf
(if you do comment out and reboot)â Anthon
Mar 3 '16 at 22:23
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
If that still doesn't make a sound, make sure your motherboard has a speaker attached :-)
â Anthon
Mar 3 '16 at 22:29
 |Â
show 3 more comments
up vote
2
down vote
If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:
tput flash
For most systems, tput
accepts terminfo
names including flash
. The terminfo manual for ncurses says:
flash_screen flash vb visible bell (may
not move cursor)
and
If the terminal has a way of flashing the screen to indi-
cate an error quietly (a bell replacement) then this can
be given as flash; it must not move the cursor.
A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM
to xterm
(but xterm
itself works).
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What doesecho $XTERM_VERSION
show?
â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
 |Â
show 1 more comment
up vote
2
down vote
If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:
tput flash
For most systems, tput
accepts terminfo
names including flash
. The terminfo manual for ncurses says:
flash_screen flash vb visible bell (may
not move cursor)
and
If the terminal has a way of flashing the screen to indi-
cate an error quietly (a bell replacement) then this can
be given as flash; it must not move the cursor.
A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM
to xterm
(but xterm
itself works).
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What doesecho $XTERM_VERSION
show?
â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
 |Â
show 1 more comment
up vote
2
down vote
up vote
2
down vote
If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:
tput flash
For most systems, tput
accepts terminfo
names including flash
. The terminfo manual for ncurses says:
flash_screen flash vb visible bell (may
not move cursor)
and
If the terminal has a way of flashing the screen to indi-
cate an error quietly (a bell replacement) then this can
be given as flash; it must not move the cursor.
A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM
to xterm
(but xterm
itself works).
If your terminal does not make any sound, it still (more likely than not) can make a visible alarm:
tput flash
For most systems, tput
accepts terminfo
names including flash
. The terminfo manual for ncurses says:
flash_screen flash vb visible bell (may
not move cursor)
and
If the terminal has a way of flashing the screen to indi-
cate an error quietly (a bell replacement) then this can
be given as flash; it must not move the cursor.
A few implementations accept only termcap names. Some terminal emulators do not flash the screen using any method (and in ncurses' terminal database, the preferred terminal description for those excludes the feature). Some of those may set TERM
to xterm
(but xterm
itself works).
edited Mar 3 '16 at 22:32
answered Mar 3 '16 at 22:20
Thomas Dickey
50.6k587159
50.6k587159
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What doesecho $XTERM_VERSION
show?
â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
 |Â
show 1 more comment
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What doesecho $XTERM_VERSION
show?
â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
Tried but does not do anything , tried to type tput flash , am i doing anything wrong? and what does flash do? i could not find anything about it in tput manual
â kvway
Mar 3 '16 at 22:24
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
What terminal are you using? (A few do not support this feature because their VT100 emulation is broken).
â Thomas Dickey
Mar 3 '16 at 22:26
1
1
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
I use xterm terminal
â kvway
Mar 3 '16 at 22:32
What does
echo $XTERM_VERSION
show?â Thomas Dickey
Mar 3 '16 at 22:33
What does
echo $XTERM_VERSION
show?â Thomas Dickey
Mar 3 '16 at 22:33
it shows an empty line
â kvway
Mar 3 '16 at 22:34
it shows an empty line
â kvway
Mar 3 '16 at 22:34
 |Â
show 1 more comment
up vote
0
down vote
how to get service start & stop alert through script
New contributor
add a comment |Â
up vote
0
down vote
how to get service start & stop alert through script
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
how to get service start & stop alert through script
New contributor
how to get service start & stop alert through script
New contributor
New contributor
answered 16 mins ago
samyak
1
1
New contributor
New contributor
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f267486%2falert-notification%23new-answer', 'question_page');
);
Post as a guest
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
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
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