* Display a starting message
@ 2012-05-28 19:01 Shravan1804
2012-05-28 21:07 ` Eliot Moss
0 siblings, 1 reply; 6+ messages in thread
From: Shravan1804 @ 2012-05-28 19:01 UTC (permalink / raw)
To: cygwin
Dear all,
I would like my cygwin terminal to display a starting message everytime I
start the program. For example something like "Hello Shravan, what do you
want to do today?" or this type of pictures :
.....
.e$$$$$$$$$$$$$$e.
z$$ ^$$$$$$$$$$$$$$$$$.
.$$$* J$$$$$$$$$$$$$$$$$$$e
.$" .$$$$$$$$$$$$$$$$$$$$$$*-
.$ $$$$$$$$$$$$$$$$***$$ .ee"
z**$$ $$r ^**$$$$$$$$$*" .e$$$$$$*"
" -\e$$ 4$$$$. .ze$$$""""
4 z$$$$$ $$$$$$$$$$$$$$$$$$$$"
$$$$$$$$ .$$$$$$$$$$$**$$$$*"
z$$" $$ $$$$P*"" J$*$$c
$$" $$F .$$$ $$ ^$$
$$ *$$c.z$$$ $$ $$
$P $$$$$$$ 4$F 4$
dP *$$$" $$ '$r
.$ J$" $"
$ $P 4$
F $$ 4$
4$% 4$
$$ 4$
d$" $$
$P $$
$$ $$
4$% $$
$$ $$
d$ $$
$F "3
r=4e=" ... ..rf . ""%
$**$*"^""=..^4*=4=^"" ^""" Gilo94'
Anyone knows how?
Thanks,
Shravan
--
View this message in context: http://old.nabble.com/Display-a-starting-message-tp33921015p33921015.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Display a starting message
2012-05-28 19:01 Display a starting message Shravan1804
@ 2012-05-28 21:07 ` Eliot Moss
2012-05-29 2:41 ` Buchbinder, Barry (NIH/NIAID) [E]
2012-05-30 18:44 ` Shravan1804
0 siblings, 2 replies; 6+ messages in thread
From: Eliot Moss @ 2012-05-28 21:07 UTC (permalink / raw)
To: cygwin
On 5/28/2012 2:26 PM, Shravan1804 wrote:
>
> Dear all,
>
> I would like my cygwin terminal to display a starting message everytime I
> start the program. For example something like "Hello Shravan, what do you
> want to do today?" or this type of pictures :
Put something in your .bash_profile (or something like
that). Not a function of cygwin,specifically ...
Eliot Moss
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Display a starting message
2012-05-28 21:07 ` Eliot Moss
@ 2012-05-29 2:41 ` Buchbinder, Barry (NIH/NIAID) [E]
2012-06-02 1:46 ` Cyrille Lefevre
2012-05-30 18:44 ` Shravan1804
1 sibling, 1 reply; 6+ messages in thread
From: Buchbinder, Barry (NIH/NIAID) [E] @ 2012-05-29 2:41 UTC (permalink / raw)
To: cygwin
Eliot Moss sent the following at Monday, May 28, 2012 3:01 PM
>On 5/28/2012 2:26 PM, Shravan1804 wrote:
>> I would like my cygwin terminal to display a starting message every time I
>> start the program. For example something like "Hello Shravan, what do you
>> want to do today?" or this type of pictures :
>
>Put something in your .bash_profile (or something like that). Not a
>function of cygwin, specifically ...
Here is what I use in ~/.bashrc
sed -e 's/ The .* to /\x1B[33;44;5m&\x1B[0;37;44m/' \
-e 's/|\(.*\)|$/\x1B[1m|\x1B[44m\1\x1B[1;40m|\x1B[0m/' \
-e 's/ __* $/\x1B[1m&\x1B[0m/' \
-e 's/jgs/\x1B[1;34;44mjgs\x1B[1;37;44m/' \
~/hippo.txt
<BEGIN hippo.txt>
____________________, ______________________________________
.QQQQQQQQQQQQQQQQQQQQQQQQL_ | |
.gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ__ | |
gQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ== | _.---.) |
QQQQQQQQQQQQQQQQQQQQQQQQQQQF= | (^--^)_.-" `; |
QQQQQQQQQ================! | ) ee ( | |
QQQQQQQQ | (_.__._) / |
QQQQQQQQ | `--', ,' |
QQQQQQQQ ~"jjj__, | jgs )_|--')_| |
QQQQQQQQ "jjjjjjjjjj___ | ""' ""' |
QQQQQQQQ ~jjjjjjjjjjjjjjjjj__ | |
QQQQQQQQ _jjjjjjjjjjjjjj/~~~~ | The Hippo says: Welcome to |
QQQQQQQQ .{jjjjjjj/~~~~~ | _ |
QQQQQQQQ .{/~~~~` | ____ _ _ ____ _ _ _ (_) ____ |
QQQQQQQQ | / ___)| | | | / _ || | | || || _ \ |
QQQQQQQQ |( (___ | |_| |( (_| || | | || || | | ||
QQQQQQQQQL_______________, | \____) \__ | \___ | \___/ |_||_| |_||
QQQQQQQQQQQQQQQQQQQQQQQQQQQL___ | (___/ (____| |
4QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ___ | |
(=QQQQQQQQQQQQQQQQQQQQQQQQQQQQQ==== | -.-. -.-- --. .-- .. -. |
(QQQQQQQQQQQQQQQQQQQQQQQQF= |______________________________________|
<END hippo.txt>
However, I only want this in an interactive shell, so I test whether PS1
is greater than 0 in size.
if [ ! -z "$PS1" ]
I only want this with a new shell, not a subshell. So I test for the
shell level.
if [ ${SHLVL} = 1 ]
I apologize for the lack of credit for the sources of the graphics; I
don't remember where I found them.
Enjoy!
- Barry
Disclaimer: Statements made herein are not made on behalf of NIAID.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Display a starting message
2012-05-28 21:07 ` Eliot Moss
2012-05-29 2:41 ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2012-05-30 18:44 ` Shravan1804
2012-05-30 18:46 ` Shravan1804
1 sibling, 1 reply; 6+ messages in thread
From: Shravan1804 @ 2012-05-30 18:44 UTC (permalink / raw)
To: cygwin
Merci beaucoup :)
Bugzilla from moss@cs.umass.edu wrote:
>
> On 5/28/2012 2:26 PM, Shravan1804 wrote:
>>
>> Dear all,
>>
>> I would like my cygwin terminal to display a starting message everytime I
>> start the program. For example something like "Hello Shravan, what do you
>> want to do today?" or this type of pictures :
>
> Put something in your .bash_profile (or something like
> that). Not a function of cygwin,specifically ...
>
> Eliot Moss
>
> --
> Problem reports: http://cygwin.com/problems.html
> FAQ: http://cygwin.com/faq/
> Documentation: http://cygwin.com/docs.html
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
>
>
>
--
View this message in context: http://old.nabble.com/Display-a-starting-message-tp33921015p33933611.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Display a starting message
2012-05-30 18:44 ` Shravan1804
@ 2012-05-30 18:46 ` Shravan1804
0 siblings, 0 replies; 6+ messages in thread
From: Shravan1804 @ 2012-05-30 18:46 UTC (permalink / raw)
To: cygwin
Merci beaucoup Messieurs :)
--
View this message in context: http://old.nabble.com/Display-a-starting-message-tp33921015p33933611.html
Sent from the Cygwin list mailing list archive at Nabble.com.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Display a starting message
2012-05-29 2:41 ` Buchbinder, Barry (NIH/NIAID) [E]
@ 2012-06-02 1:46 ` Cyrille Lefevre
0 siblings, 0 replies; 6+ messages in thread
From: Cyrille Lefevre @ 2012-06-02 1:46 UTC (permalink / raw)
To: cygwin
Le 28/05/2012 23:21, Buchbinder, Barry (NIH/NIAID) [E] a écrit :
> Here is what I use in ~/.bashrc
>
> sed -e 's/ The .* to /\x1B[33;44;5m&\x1B[0;37;44m/' \
> -e 's/|\(.*\)|$/\x1B[1m|\x1B[44m\1\x1B[1;40m|\x1B[0m/' \
> -e 's/ __* $/\x1B[1m&\x1B[0m/' \
> -e 's/jgs/\x1B[1;34;44mjgs\x1B[1;37;44m/' \
> ~/hippo.txt
pretty, how about this one :-)
if [[ -w /etc/sshd_config ]]; then
perl -pi -e 's/^#// if /PrintMotd/;
s/yes/no/ if /PrintMotd/' /etc/sshd_config
net stop sshd; net start sshd
fi
cat << 'EOF' > /etc/profile.d/banner.sh
sed -e 's/ The .* to /\x1B[33;44;5m&\x1B[0;37;44m/' \
-e 's/|\(.*\)|$/\x1B[0;1m|\x1B[44m\1\x1B[1;40m|\x1B[0m/' \
-e '/./s/^/\x1B[0;32m/' -e 's/ __*$/\x1B[0;1m&\x1B[0m/' \
-e 's/jgs/\x1B[1;34;44mjgs\x1B[1;37;44m/' /etc/motd
EOF
PS : [ ! -z $PS1 ] == [ -n $PS1 ], $SHLVL is bash only
Regards,
Cyrille Lefevre
--
mailto:Cyrille.Lefevre-lists@laposte.net
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-06-02 1:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-28 19:01 Display a starting message Shravan1804
2012-05-28 21:07 ` Eliot Moss
2012-05-29 2:41 ` Buchbinder, Barry (NIH/NIAID) [E]
2012-06-02 1:46 ` Cyrille Lefevre
2012-05-30 18:44 ` Shravan1804
2012-05-30 18:46 ` Shravan1804
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).