Custom motd in /etc/update-motd.d/20-fortune-cowsay only working partially
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
2
down vote
favorite
I have tried to create a custom motd on Ubuntu 16.04 LTS. I've found that there is a /etc/update-motd.d
directory with a few files. I've seen the pattern of [00-99]-[name]
So I've added my own file called 20-fortune-cowsay
. It looks like this
#!/bin/bash
echo "TEST"
fortune | cowsay
but the motd only looks like this
...
TEST
...
And I don't see the output of fortune | cowsay
. Also, echo "$(fortune | cowsay)"
, didn't help. What am I missing?
16.04 lts motd fortune cowsay
add a comment |Â
up vote
2
down vote
favorite
I have tried to create a custom motd on Ubuntu 16.04 LTS. I've found that there is a /etc/update-motd.d
directory with a few files. I've seen the pattern of [00-99]-[name]
So I've added my own file called 20-fortune-cowsay
. It looks like this
#!/bin/bash
echo "TEST"
fortune | cowsay
but the motd only looks like this
...
TEST
...
And I don't see the output of fortune | cowsay
. Also, echo "$(fortune | cowsay)"
, didn't help. What am I missing?
16.04 lts motd fortune cowsay
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have tried to create a custom motd on Ubuntu 16.04 LTS. I've found that there is a /etc/update-motd.d
directory with a few files. I've seen the pattern of [00-99]-[name]
So I've added my own file called 20-fortune-cowsay
. It looks like this
#!/bin/bash
echo "TEST"
fortune | cowsay
but the motd only looks like this
...
TEST
...
And I don't see the output of fortune | cowsay
. Also, echo "$(fortune | cowsay)"
, didn't help. What am I missing?
16.04 lts motd fortune cowsay
I have tried to create a custom motd on Ubuntu 16.04 LTS. I've found that there is a /etc/update-motd.d
directory with a few files. I've seen the pattern of [00-99]-[name]
So I've added my own file called 20-fortune-cowsay
. It looks like this
#!/bin/bash
echo "TEST"
fortune | cowsay
but the motd only looks like this
...
TEST
...
And I don't see the output of fortune | cowsay
. Also, echo "$(fortune | cowsay)"
, didn't help. What am I missing?
16.04 lts motd fortune cowsay
asked May 4 at 9:05
![](https://lh3.googleusercontent.com/-G6BMgWAersY/AAAAAAAAAAI/AAAAAAAAGG4/wnThVo0uWoA/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-G6BMgWAersY/AAAAAAAAAAI/AAAAAAAAGG4/wnThVo0uWoA/photo.jpg?sz=32)
Impulse The Fox
1134
1134
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Change your script to look like this:
#!/bin/bash
export PATH="/usr/games:$PATH"
fortune | cowsay
"fortune" and "cowsay" are considered games by ubuntu and those are not in the default system path.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Change your script to look like this:
#!/bin/bash
export PATH="/usr/games:$PATH"
fortune | cowsay
"fortune" and "cowsay" are considered games by ubuntu and those are not in the default system path.
add a comment |Â
up vote
1
down vote
accepted
Change your script to look like this:
#!/bin/bash
export PATH="/usr/games:$PATH"
fortune | cowsay
"fortune" and "cowsay" are considered games by ubuntu and those are not in the default system path.
add a comment |Â
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Change your script to look like this:
#!/bin/bash
export PATH="/usr/games:$PATH"
fortune | cowsay
"fortune" and "cowsay" are considered games by ubuntu and those are not in the default system path.
Change your script to look like this:
#!/bin/bash
export PATH="/usr/games:$PATH"
fortune | cowsay
"fortune" and "cowsay" are considered games by ubuntu and those are not in the default system path.
edited May 4 at 11:55
answered May 4 at 11:13
![](https://i.stack.imgur.com/33gTl.jpg?s=32&g=1)
![](https://i.stack.imgur.com/33gTl.jpg?s=32&g=1)
Sebastian Stark
4,663938
4,663938
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2faskubuntu.com%2fquestions%2f1031895%2fcustom-motd-in-etc-update-motd-d-20-fortune-cowsay-only-working-partially%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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