Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

Welcome Message on Boot

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
97 posts
  • Previous
  • 1
  • 2
  • 3
  • 4
Author
Message
Headhunter123
Guru
Guru
User avatar
Posts: 509
Joined: Sat Oct 19, 2002 7:45 pm

  • Quote

Post by Headhunter123 » Fri Jun 20, 2003 7:49 am

Hi !

How can you use a screensaver in the console ? I have always tried to use cmatrix, but I don't know how to start a program after a certain time of inactivity.
And to aalib :
Try compiling your mplayer with aalib, and choose it as videooutput (-vo). Pretty weird, but nevertheless cool :)
Top
DrkPlague
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 107
Joined: Wed Jun 04, 2003 4:32 pm
Contact:
Contact DrkPlague
Website

  • Quote

Post by DrkPlague » Fri Jun 20, 2003 7:23 pm

i am all about aalib. there are some great programs out there for it. and for a screensaver, I have "setterm -blank 0" run at startup to disable console blanking, then run aalib on an empty console when i am done for a while. i am still trying to find a way to make it an actual screensaver like in freeBSD.
DKP

There are 10 kinds of people in the world:
Those who understand binary and those who don't...
Top
epretorious
Apprentice
Apprentice
Posts: 191
Joined: Fri Jul 04, 2003 8:07 pm
Location: Truckee, CA
Contact:
Contact epretorious
Website

Editing /etc/issue

  • Quote

Post by epretorious » Sun Jul 06, 2003 1:47 am

Hello, All:

I'm stumped: If your login screen doesn't need to change, why not just edit the /etc/issue file using vi? i.e., Why create a script that removes a file just to create the same file again?
Eric P.
Sunnyvale, CA
Top
usingloser
Apprentice
Apprentice
User avatar
Posts: 297
Joined: Sun May 18, 2003 6:48 pm
Location: ->Here<-
Contact:
Contact usingloser
Website

  • Quote

Post by usingloser » Mon Jul 07, 2003 2:07 am

so the stats contained in the welcome message can be updated, like uptime, usage, etc..
Top
epretorious
Apprentice
Apprentice
Posts: 191
Joined: Fri Jul 04, 2003 8:07 pm
Location: Truckee, CA
Contact:
Contact epretorious
Website

Re: Editing /etc/issue

  • Quote

Post by epretorious » Mon Jul 07, 2003 7:21 am

:!: I'll repeat the question for clarity:
If your login screen doesn't need to change, why not just edit the /etc/issue file using vi?
I haven't seen a single solution here that uses a static /etc/issue but have seen many login screens that don't produce dynamic information. (The reason that I ask is this: I would like to know how to create a static login screen that contains the ANSI color escape codes without having to create /etc/init.d/issue. Every other solution on the 'Net also uses the `echo -e "\033[#;#m...` approach...
Eric P.
Sunnyvale, CA
Top
Gandalf_Grey_
Apprentice
Apprentice
Posts: 151
Joined: Sat Apr 19, 2003 4:18 pm

  • Quote

Post by Gandalf_Grey_ » Thu Jul 24, 2003 1:35 am

I made a custom startup screen that other Canadians might be interested in, here is a screenshot

Image

and the source is

Code: Select all

#!/bin/sh

AUTHOR="Ryan Vilim"
Red="\033[1;6m\033[0;31m" # Red
White="\033[1;6m\033[1;37m" # White
Green="\033[1;6m\033[0;32m" # Green
COLOUR_RESET="\033[0m"

#rm -f /etc/issue
echo -e $Red"|i|i|i|i|i|i|"$White"qmmmmmmmmmmmmmmmmmmmmmmmmmmz"$Red"|i|i|i|i|i|i">> /etc/issue
echo -e $Red"i||||||||||||"$White"mQQQQQQQQQQQQQQQQQQQQQQQQQQe"$Red"||||||||||||">> /etc/issue
echo -e $Red"|||||i||i||||"$White"mWQQQQQQQQQQQQQQQQQQQQQQQQQe"$Red"|||||i||i||i">> /etc/issue
echo -e $Red"||i||||||||i|"$White"mQQQQQQQQQQQQCWQQQQQQQQQQQQe"$Red"|||i||||||||">> /etc/issue
echo -e $Red"i|||i||i||i||"$White"mWQQQQQQQQQQ@"$Red"|"$White"]QQQQQQQQQQQQe"$Red"||||||i||i|i">> /etc/issue
echo -e $Red"|||i|||||||||"$White"mWQQQQQQQWTW"$Red"(||"$White"Q@YQQQQQQQQQe"$Red"|||||i||||||">> /etc/issue
echo -e $Red"i|||||i||i|||"$White"mWQQQQQQQW"$Red"||i||||j"$White"QQQQQQQQQe"$Red"||||i||||i|i">> /etc/issue
echo -e $Red"||i||i|||||||"$White"mQQQQQQQQQc"$Red"||||i|"$White"jQQQQQQQQQc"$Red"||||||||i|||">> /etc/issue
echo -e $Red"i||||||||i|i|"$White"mWQQQQQQQQz"$Red"||||||"$White"mQWQQQQQQQC"$Red"|||i|||i|||i">> /etc/issue
echo -e $Red"|||i||i||||||"$White"mWQQRWQk?Qk"$Red"|||i|i"$White"Q@(WQRQQQQe"$Red"||||||i|||||">> /etc/issue
echo -e $Red"i|||||||i||||"$White"mQQQc"$Red"|"$White"*"$Red"||"$White"?h"$Red"|||||"$White"xD"$Red"||"$White"}|+dQQQc"$Red"|||i||||||i|">> /etc/issue
echo -e $Red"||i||i|||||i|"$White"mWQQz"$Red"|||||"$White"I"$Red"|||||"$White"I"$Red"||||||"$White"QQQQe"$Red"||||||i|||||">> /etc/issue
echo -e $Red"i||||||i||i||"$White"mWQQk"$Red"|||||||||i||i||i|"$White"{QQQQe"$Red"|||i|||||i|i">> /etc/issue
echo -e $Red"|||i||i||||||"$White"mWQW1"$Red"|||||||i||||||||||"$White"4QQQc"$Red"|||||i||i|||">> /etc/issue
echo -e $Red"i|||||||||i||"$White"mWQQc"$Red"|||i|i|||||i||i||"$White"imQQQC"$Red"||i||||||||i">> /etc/issue
echo -e $Red"||i||i||i||||"$White"mQQQQp+i"$Red"||||||i|||i||"$White"xQQQQQe"$Red"|||||i||i|||">> /etc/issue
echo -e $Red"i||||||||||||"$White"mWQQQWp>"$Red"|||i|i|||i||"$White"uQQQQQQe"$Red"||||i|||||i|">> /etc/issue
echo -e $Red"|||i||i||i|||"$White"mQQQQQQm>"$Red"|||||||i||"$White"wQQQQQQQe"$Red"|||||||i||||">> /etc/issue
echo -e $Red"i|||||||i||||"$White"mWQQQQQWE"$Red"|||||||||"$White"{QQQQQQQQc"$Red"|||i||||||i|">> /etc/issue
echo -e $Red"||i||i|||||i|"$White"mQQQQQQQCiaww"$Red"z"$White"wwa%xQQQQQQQQe"$Red"|||||i|i||||">> /etc/issue
echo -e $Red"i||||||i|||||"$White"mWQQQQQQQQQWQ"$Red"k"$White"QWQQWQQQQQQQQc"$Red"|i||i|||||i|">> /etc/issue
echo -e $Red"|||i||i|||i||"$White"mWQQQQQQQQQQQ"$Red"k"$White"WWQQQQQQQQQQQe"$Red"|||||||||i||">> /etc/issue
echo -e $Red"i||||||||||||"$White"mQQQQQQQQQQQQ"$Red"k"$White"WWQQQQQQQQQQQc"$Red"|i||i||i||||">> /etc/issue
echo -e $Red"||i||i||i||i|"$White"mWQQQQQQQQQQW"$Red"k"$White"BQQQQQQWQQQWQe"$Red"|||||||||||i">> /etc/issue
echo -e $Red"i||||||||||||"$White"mWQQQQQQQWQQQ"$Red"m"$White"QQQQWQQQQQQQQe"$Red"|||i||i||i||">> /etc/issue
echo -e $Red"|||||i|||i|||"$White"mWQQQQQQQQQQQQQWQQQQQQQQQQQc"$Red"||i||||||||i">> /etc/issue
echo -e $Red"iiiiii|iii|ii"$White"3"$Green" A Proud Canadian Penguin "$White"1"$Red"ii|iiiiiiii|" >> /etc/issue
echo >>/etc/issue
cp -f /etc/issue /etc/issue.net
I got a picture of the canadian flag, used gimp and aalib to export it to a text file, then did the colouring myself :D
Top
jaska
Bodhisattva
Bodhisattva
Posts: 725
Joined: Fri Jun 06, 2003 7:26 am
Location: Finland

  • Quote

Post by jaska » Fri Aug 22, 2003 5:47 am

Maybe I am dyslexic, but how do you make the cowsay appear when i open up aterm? I saw a screenshot with something like that happening, but it could have been only an ssh loging?
Top
jaska
Bodhisattva
Bodhisattva
Posts: 725
Joined: Fri Jun 06, 2003 7:26 am
Location: Finland

  • Quote

Post by jaska » Fri Aug 22, 2003 5:51 am

Nevermind, I think its fixed now.
Top
dhurt
Apprentice
Apprentice
Posts: 278
Joined: Wed May 14, 2003 6:21 pm
Location: Davis, CA
Contact:
Contact dhurt
Website

  • Quote

Post by dhurt » Fri Aug 22, 2003 9:02 pm

Thanks for this great thread. I have really enjoyed setting this up on my computer. I have a question though. The script that I have cobbled together from posts in this thread updates correctly /etc/issue and /etc/issue.net and it works correctly as far as I can tell. But I keep getting errors from the cron daemon.

The errors are as follows:

Code: Select all

Date: Fri, 22 Aug 2003 09:45:00 -0700 (PDT)
From: Cron Daemon <root@mcising.net>
To: root@mcising.net
Subject: Cron <root@shadow>  /etc/init.d/issue
                                                                                
TERM environment variable not set.

Code: Select all

Date: Fri, 22 Aug 2003 09:45:00 -0700 (PDT)
From: Cron Daemon <root@mcising.net>
To: root@mcising.net
Subject: Cron <root@shadow> root /etc/init.d/issue
                                                                                
/bin/sh: line 1: root: command not found
I get this error everytime the cron job runs and it is just annoying to have it fill up my mail box. The bash script that I run every ten minutes via cron is the following:

Code: Select all

#!/bin/bash
                                                                                                                                                  
if [ -f /etc/gentoo-release ]; then
                                                                                                                                                  
R=$(cat /etc/gentoo-release | awk '{ print $5,$6 }')
C=$(cat /proc/cpuinfo | grep 'model name' | awk '{ print $4,$5,$6 }')
CS=$(cat /proc/cpuinfo | grep 'cpu MHz' | awk '{ print $4 }')
CB=$(cat /proc/cpuinfo | grep 'bogomips' | awk '{ print $3 }')
K=$(uname -r)
H=$(/bin/hostname -f)
M=$(( `dmesg | grep "Dentry" | awk '{print $9}'` / 1024 ))
KS=`dmesg | grep "Swap" | awk '{print $3}'`
S=$(( ${KS%k} / 1024 ))
U=$(uptime)
F=$(fortune 40% calvin 30% hitchhiker 10% chalkboard 10% starwars 10% bofh-excuses)
                                                                                                                                                  
DARK="\033[1;30m" # dark grey
GREY="\033[0m" # default grey / white
WHITE="\033[1;37m" # bright / bold white
PURPLE="\033[0;35m" # purple
BR_GREEN="\033[1;32m" # bright green
BR_BLUE="\033[1;34m" # bright blue
BLACK="\033[0;30m" # black
RED="\033[0;31m" # Red
LT_RED="\033[1;31m" # Light Red
YELLOW="\033[1;33m" # Light Red
                                                                                                                                                  
/usr/bin/clear >> /etc/issue
echo -e " " >> /etc/issue
echo -e "$BR_GREEN Gentoo$BR_BLUE Linux$RED Release $R" >> /etc/issue
echo -e " " >> /etc/issue
echo -e "$GREY Hostname: $WHITE $H" >> /etc/issue
echo -e " " >> /etc/issue
echo -e "$GREY Kernel:   $WHITE $K" >> /etc/issue
echo -e "$GREY Processor:$WHITE $C ( $CS MHz => $CB bogomips)" >> /etc/issue
echo -e "$GREY Memory:   $WHITE $M Mb    $GREY Swap:  $WHITE $S Mb" >> /etc/issue
echo -e "$GREY Uptime:  $WHITE $U" >> /etc/issue
echo -e " " >> /etc/issue
echo -e "$YELLOW$F$WHITE" >> /etc/issue
echo -e " " >> /etc/issue
cp /etc/issue /etc/issue.net
cp /etc/issue /etc/motd
chmod 644 /etc/motd
fi
The crontab entry looks like this:

Code: Select all

*/10 * * * *     root    /etc/init.d/issue
Any suggestions would be most appriciated. Thanks in advance.
Top
dhurt
Apprentice
Apprentice
Posts: 278
Joined: Wed May 14, 2003 6:21 pm
Location: Davis, CA
Contact:
Contact dhurt
Website

  • Quote

Post by dhurt » Tue Sep 02, 2003 7:08 am

In case anyone else is having the same error. The solution is to change these lines:

Code: Select all

/usr/bin/clear >> /etc/issue
echo -e " " >> /etc/issue
To This

Code: Select all

 
TERM=linux /usr/bin/clear > /etc/issue
printf "\e[2J\e[H" >> /etc/issue
That fixes the first error of the environment variable not being set. The next error of root not being a command, is because I am noob and added in the job to the cron daemon wrong. I looked at /etc/crontab for how to format the entry and it has root in as the sixth entry, but when you do a crontab -e, the sixth item should be the job and the user should not be listed. So the crontab entry should look like this:

Code: Select all

*/10 * * * *     /etc/init.d/issue 
Top
radr
Tux's lil' helper
Tux's lil' helper
Posts: 77
Joined: Mon Jul 15, 2002 2:30 pm
Location: MT

linux_logo for remote login

  • Quote

Post by radr » Mon Sep 15, 2003 6:33 am

it is possible
<after a few hrs of hairpulling>

add these lines to /etc/profile

#linux_logo
echo
linux_logo -L 3
echo


now even my remote users can see the goodness =)
ps. i followed all previous posts to get the linux_logo workin
Dual Opteron 280/1M (dual core = 4 procs) , 16G reg ECC ram, 4TB disc, NvIDIA GF 6800 PCI-E, SB X-FI
=Theres NO Substitute for Horsepower=
Top
IvoryTiger
Tux's lil' helper
Tux's lil' helper
Posts: 132
Joined: Thu Jun 27, 2002 4:35 am

  • Quote

Post by IvoryTiger » Fri Sep 19, 2003 6:00 am

Master_Of_Disaster wrote:Fine, made it as Sedated suggested, there is just one anoying problem:

Code: Select all

fuero@bmfh fuero $ sudo /etc/init.d/issue start
 * Could not get dependency info for "issue"!
 * Could not get dependency info for "issue"!
 * Building Linux Welcome Message
 *      Creating /etc/issue...                     [ ok ]
 *      Creating /etc/issue.net...                 [ ok ]
fuero@bmfh fuero $
/sbin/depscan.sh will fix the dependancy errors.

I added the start/stop to my script and then ran /sbin/depscan.sh and those errors are now gone.
--
For those about to compile...we salute you!
Top
quark
Tux's lil' helper
Tux's lil' helper
Posts: 102
Joined: Fri Jun 06, 2003 11:48 am
Location: Hessen, Germany
Contact:
Contact quark
Website

  • Quote

Post by quark » Tue Oct 21, 2003 10:04 pm

Hi all...

I started to make my own /etc/init.d/issue after reading this thread a while :)
This is what I ended up with:

Code: Select all

    .vir.       Gentoo Gnu/Linux        
 .d$$$$$$b.                                     
 $$$$( )$$$b    Hostname: lappy.potro.net
 Q$$$$$$$$$$B   Kernel:   2.6.0-test8-mm1
   "$$$$$$$P    Uptime:   3:02
  d$$$$$$P"                                     
 $$$$$$$P       ALL UNAUTHORIZED USERS WILL BE CONDEMNED TO DIE!
 `Q$$P"                                          

Wed Oct 22 01:02:19 EEST 2003
The g is taken from the linux-logo -ebuild's gentoo logo and the rest is mostly inspired by this thread :) I used a simple awk line to take just the uptime and nothing but the uptime from the output of "uptime". It's not as easy as you might think ;)

Here is the code (if someone is interested):

Code: Select all

#!/bin/sh

LGRAY="\033[1;6m\033[1;37m"
YELLOW="\033[1;6m\033[1;33m"
PURPLE="\033[1;6m\033[1;35m"
WHITE="\033[1;6m\033[1;37m"
COLOR_RESET="\033[0m"

# Let's simplify this a bit :)
UPTIME=`uptime | awk '{for ( i = 3; i <= NF-7; i++ ) if ( i != NF-7 ) \
        print $i; else print substr($i,1,length($i)-1);}'`  

rm -f /etc/issue
echo -e $PURPLE'                                                ' >> /etc/issue
echo -e $PURPLE'    .vir.       Gentoo '$WHITE'Gnu/Linux        ' >> /etc/issue
echo -e $PURPLE' .d$$$$$$b.                                     ' >> /etc/issue
echo -e $PURPLE' $$$$( )$$$b    '$LGRAY'Hostname: '$(hostname -a) >> /etc/issue
echo -e $PURPLE' Q$$$$$$$$$$B   '$LGRAY'Kernel:   '$(uname -r)    >> /etc/issue
echo -e $PURPLE'   "$$$$$$$P    '$LGRAY'Uptime:   '$UPTIME        >> /etc/issue
echo -e $PURPLE'  d$$$$$$P"                                     ' >> /etc/issue
echo -e $PURPLE' $$$$$$$P       '$YELLOW'ALL UNAUTHORIZED USERS WILL BE'\
                                'CONDEMNED TO DIE!' >> /etc/issue
echo -e $PURPLE' `Q$$P"                                          '>> /etc/issue

echo -e $LGRAY"\n$(date)" >> /etc/issue
echo -e $COLOR_RESET >> /etc/issue
cp -f /etc/issue /etc/issue.net
Last edited by quark on Thu Oct 23, 2003 2:58 pm, edited 1 time in total.
HP Compaq nx9420 || Intel Core2 CPU T7200 @ 2GHz | 2Gb RAM | 120Gb HD
HP Compaq nc2400 || Intel Core Duo CPU U2500 @ 1.2 GHz | 2Gb RAM | 120Gb HD
Top
Thulle
n00b
n00b
User avatar
Posts: 70
Joined: Mon Nov 11, 2002 12:00 pm

Re: Welcome Message on Boot

  • Quote

Post by Thulle » Thu Oct 23, 2003 12:57 am

lain iwakura wrote: echo -e $COLOR3"Welcome to the Wired!">>/etc/issue
<offtopic> apparently more than me who like s.e lain ^_^</offtopic>
Top
Antimatter
Guru
Guru
Posts: 463
Joined: Mon Aug 11, 2003 5:45 am

  • Quote

Post by Antimatter » Fri Nov 28, 2003 6:25 am

sorry for this bumpage but i'm having some problem with this

i got the issue file to display correctly before i am able to log in but i have another problem

i created an issue.net and enabled banner /etc/issue.net

then i ssh in from my windows machine though putty and i get no message, zip nada, none

so is it just something with putty or ?

thanks

UPDATE:

if i log in using ssh1 i get nothing just a login prompt then when i log in it display last time i log in.

now if i switch to ssh2 i get a log in prompt i type in the login name, then i get the message from issue.net then it presents me with the password field.

this is partway there but i want it to all display BEFORE the login thing is even printed to screen meaning it print to screen then let u to log in. and also wondering why it partly work with ssh2 but not ssh1

thanks
Top
jtp755
l33t
l33t
User avatar
Posts: 691
Joined: Mon Sep 01, 2003 11:32 pm
Location: USA
Contact:
Contact jtp755
Website

  • Quote

Post by jtp755 » Fri Nov 28, 2003 5:12 pm

Here are some screenshots of some simple ones i just did. Its my first attmept at this but i thought it was cool. Hope yall like them.

Image
Image
Image

If you want me to send the text files let me know.
www.EternalFireProof.com
Registered Linux User #334610
Top
maxulanhot
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 89
Joined: Sat Nov 29, 2003 3:48 am
Location: Northeast China
Contact:
Contact maxulanhot
Website

  • Quote

Post by maxulanhot » Sun Nov 30, 2003 6:09 am

I just put the issue to run level default,but when I reboot it say
issue dependency error?

why?
Top
DumbAss
Apprentice
Apprentice
User avatar
Posts: 247
Joined: Tue Sep 30, 2003 10:57 am
Location: 't Steen
Contact:
Contact DumbAss
Website

  • Quote

Post by DumbAss » Tue Dec 23, 2003 12:23 am

Hi, I think this is a cool topic. It is one of those things that makes your computer "special".
Maybe anyone knows a script that outputs the number of the terminal you are logged in to? I searched google and the fora but I couldn't find anything.
Top
OdinsDream
Veteran
Veteran
User avatar
Posts: 1057
Joined: Sat Jun 01, 2002 4:11 pm
Contact:
Contact OdinsDream
Website

  • Quote

Post by OdinsDream » Fri Apr 09, 2004 9:12 am

I thought I'd mention that some of you guys might be interested in trying figlet, it's a great program for making banners out of ASCII "fonts"... like so:

Code: Select all

localhost odinsdream # echo "farscapeone" | figlet -f chunky -w 120
  ___                                                            
.'  _|.---.-.----.-----.----.---.-.-----.-----.-----.-----.-----.
|   _||  _  |   _|__ --|  __|  _  |  _  |  -__|  _  |     |  -__|
|__|  |___._|__| |_____|____|___._|   __|_____|_____|__|__|_____|
                                  |__|                           
localhost odinsdream # 
emerge figlet && showfigfonts | less

... I'm working on adding this kind of functionality to /etc/init.d/issue, so that I can get a chunky output of uname -r...

But, is the definitive answer that this isn't just a matter of dropping stuff into /etc/issue itself? Is there no way to convert that into a script? What process reads and prints the contents of /etc/issue? man issue talks about expansions of anything that getty understands, like \s. Where can I find more information about getty, what it is, and what it can expand on?
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Top
Klainn
n00b
n00b
User avatar
Posts: 67
Joined: Fri Aug 27, 2004 2:45 pm
Location: Indianapolis

issue.logo instead of issue ?

  • Quote

Post by Klainn » Sat Oct 16, 2004 10:04 pm

For some reason I can't get my box to use either /etc/init.d/issue or /etc/issue instead of /etc/issue.logo

anyone know how I can fix that ?
Note: This post is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects.
Top
gieltje
n00b
n00b
Posts: 59
Joined: Sat Aug 14, 2004 9:00 pm

  • Quote

Post by gieltje » Sun Oct 17, 2004 9:27 am

./greet: line 14: / 1024 : syntax error: operand expected (error token is "/ 1024 ")

That is when I get when I try to run (http://forums.gentoo.org/viewtopic.php? ... 4ba8526193)
Line 14 is;
S=$(( ${KS%k} / 1024 ))

Anyone got an idea?

Found it
KS=`dmesg | grep "Swap" | awk '{print $3}'`
should be;
KS=`dmesg | grep "swap" | awk '{print $2}'`

(watch the Swap to swap to)
Top
ares
Apprentice
Apprentice
User avatar
Posts: 280
Joined: Mon Oct 13, 2003 6:06 pm
Location: Savigliano (CN)
Contact:
Contact ares
Website

  • Quote

Post by ares » Sun Oct 17, 2004 2:30 pm

cat messaggio | cowsay -f daemon

_________________________________________
/ THIS IS A DEPARTMENT OF DEFENSE \
| COMPUTER SYSTEM. THIS COMPUTER SYSTEM, |
\WHICH INCLUDES ALL RELATED EQUIPMENT, /
------------------------------------------------------------


\ , ,
\ /( )`
\ \ \___ / |
/- _ `-/ '
(/\/ \ \ /\
/ / | ` \
O O ) / |
`-^--'`< '
(_.) _ ) /
`.___/` /
`-----' /
<----. __ / __ \
<----|====O)))==) \) /====
<----' `--' `.__,' \
| |
\ /
______( (_ / \______
,' ,-----' | \
`--{__________) \/



For colors output with cowsay apply my simple patch

Code: Select all

--- cowsay      2004-10-17 16:19:14.905063424 +0200
+++ cowsay      2004-10-17 16:18:59.743368352 +0200
@@ -10,6 +10,7 @@
 use Text::Wrap qw(wrap fill $columns);
 use File::Basename;
 use Getopt::Std;
+use Term::ANSIColor;
 use Cwd;

 $VERSION = "3.03";
@@ -20,6 +21,15 @@
 @message = ();
 $thoughts = "";

+## Colors output
+my %colors = (
+       'yellow' => 'bold yellow',
+       'red' => 'bold red',
+       'blue' => 'bold blue',
+       'cyan' => 'bold cyan',
+       'green' => 'bold green',
+);
+
 ## Yeah, this is rude, I know.  But hopefully it gets around a nasty
 ## little version dependency.

@@ -68,8 +78,8 @@
 &construct_balloon;
 &construct_face;
 &get_cow;
-print @balloon_lines;
-print $the_cow;
+print colored("@balloon_lines",$colors{'red'});
+print colored("$the_cow",$colors{'green'});

 sub list_cowfiles {
     my $basedir;
Sorry for paste
My portage and homepage
Top
Post Reply

97 posts
  • Previous
  • 1
  • 2
  • 3
  • 4

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic