View previous topic :: View next topic |
Author |
Message |
Headhunter123 Guru
Joined: 19 Oct 2002 Posts: 509
|
Posted: Fri Jun 20, 2003 7:49 am Post subject: |
|
|
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 |
|
Back to top |
|
|
DrkPlague Tux's lil' helper
Joined: 04 Jun 2003 Posts: 107
|
Posted: Fri Jun 20, 2003 7:23 pm Post subject: |
|
|
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... |
|
Back to top |
|
|
epretorious Apprentice
Joined: 04 Jul 2003 Posts: 191 Location: Truckee, CA
|
Posted: Sun Jul 06, 2003 1:47 am Post subject: Editing /etc/issue |
|
|
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 |
|
Back to top |
|
|
usingloser Apprentice
Joined: 18 May 2003 Posts: 297 Location: ->Here<-
|
Posted: Mon Jul 07, 2003 2:07 am Post subject: |
|
|
so the stats contained in the welcome message can be updated, like uptime, usage, etc.. |
|
Back to top |
|
|
epretorious Apprentice
Joined: 04 Jul 2003 Posts: 191 Location: Truckee, CA
|
Posted: Mon Jul 07, 2003 7:21 am Post subject: Re: Editing /etc/issue |
|
|
I'll repeat the question for clarity:
Quote: | 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 |
|
Back to top |
|
|
Gandalf_Grey_ Apprentice
Joined: 19 Apr 2003 Posts: 151
|
Posted: Thu Jul 24, 2003 1:35 am Post subject: |
|
|
I made a custom startup screen that other Canadians might be interested in, here is a screenshot
[img:070178b44c]http://www.geocities.com/gamer_vil/Screenshot.txt[/img:070178b44c]
and the source is
Code: |
#!/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 |
|
Back to top |
|
|
jaska Bodhisattva
Joined: 06 Jun 2003 Posts: 725 Location: Finland
|
Posted: Fri Aug 22, 2003 5:47 am Post subject: |
|
|
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? |
|
Back to top |
|
|
jaska Bodhisattva
Joined: 06 Jun 2003 Posts: 725 Location: Finland
|
Posted: Fri Aug 22, 2003 5:51 am Post subject: |
|
|
Nevermind, I think its fixed now. |
|
Back to top |
|
|
dhurt Apprentice
Joined: 14 May 2003 Posts: 278 Location: Davis, CA
|
Posted: Fri Aug 22, 2003 9:02 pm Post subject: |
|
|
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: |
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: |
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: |
#!/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: |
*/10 * * * * root /etc/init.d/issue
|
Any suggestions would be most appriciated. Thanks in advance. |
|
Back to top |
|
|
dhurt Apprentice
Joined: 14 May 2003 Posts: 278 Location: Davis, CA
|
Posted: Tue Sep 02, 2003 7:08 am Post subject: |
|
|
In case anyone else is having the same error. The solution is to change these lines:
Code: |
/usr/bin/clear >> /etc/issue
echo -e " " >> /etc/issue
|
To This
Code: |
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: |
*/10 * * * * /etc/init.d/issue
|
|
|
Back to top |
|
|
radr Tux's lil' helper
Joined: 15 Jul 2002 Posts: 77 Location: MT
|
Posted: Mon Sep 15, 2003 6:33 am Post subject: linux_logo for remote login |
|
|
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= |
|
Back to top |
|
|
IvoryTiger Tux's lil' helper
Joined: 27 Jun 2002 Posts: 132
|
Posted: Fri Sep 19, 2003 6:00 am Post subject: |
|
|
[quote="Master_Of_Disaster"]Fine, made it as Sedated suggested, there is just one anoying problem:
Code: | 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! |
|
Back to top |
|
|
quark Tux's lil' helper
Joined: 06 Jun 2003 Posts: 102 Location: Hessen, Germany
|
Posted: Tue Oct 21, 2003 10:04 pm Post subject: |
|
|
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: | .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: | #!/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 |
_________________ 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
Last edited by quark on Thu Oct 23, 2003 2:58 pm; edited 1 time in total |
|
Back to top |
|
|
Thulle n00b
Joined: 11 Nov 2002 Posts: 70
|
Posted: Thu Oct 23, 2003 12:57 am Post subject: Re: Welcome Message on Boot |
|
|
lain iwakura wrote: |
echo -e $COLOR3"Welcome to the Wired!">>/etc/issue
|
<offtopic> apparently more than me who like s.e lain ^_^</offtopic> |
|
Back to top |
|
|
Antimatter Guru
Joined: 11 Aug 2003 Posts: 463
|
Posted: Fri Nov 28, 2003 6:25 am Post subject: |
|
|
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 |
|
Back to top |
|
|
jtp755 l33t
Joined: 01 Sep 2003 Posts: 691 Location: USA
|
Posted: Fri Nov 28, 2003 5:12 pm Post subject: |
|
|
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.
[img:1742f29d0c]http://www.eternalfireproof.com/gentoopics.GIF[/img:1742f29d0c]
[img:1742f29d0c]http://www.eternalfireproof.com/gentoopic1.GIF[/img:1742f29d0c]
[img:1742f29d0c]http://www.eternalfireproof.com/gentoopic2.GIF[/img:1742f29d0c]
If you want me to send the text files let me know. _________________ www.EternalFireProof.com
Registered Linux User #334610 |
|
Back to top |
|
|
maxulanhot Tux's lil' helper
Joined: 29 Nov 2003 Posts: 89 Location: Northeast China
|
Posted: Sun Nov 30, 2003 6:09 am Post subject: |
|
|
I just put the issue to run level default,but when I reboot it say
issue dependency error?
why? |
|
Back to top |
|
|
DumbAss Apprentice
Joined: 30 Sep 2003 Posts: 247 Location: 't Steen
|
Posted: Tue Dec 23, 2003 12:23 am Post subject: |
|
|
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. |
|
Back to top |
|
|
OdinsDream Veteran
Joined: 01 Jun 2002 Posts: 1057
|
Posted: Fri Apr 09, 2004 9:12 am Post subject: |
|
|
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: |
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 |
|
Back to top |
|
|
Klainn n00b
Joined: 27 Aug 2004 Posts: 67 Location: Indianapolis
|
Posted: Sat Oct 16, 2004 10:04 pm Post subject: issue.logo instead of issue ? |
|
|
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. |
|
Back to top |
|
|
gieltje n00b
Joined: 14 Aug 2004 Posts: 59
|
|
Back to top |
|
|
ares Apprentice
Joined: 13 Oct 2003 Posts: 280 Location: Savigliano (CN)
|
Posted: Sun Oct 17, 2004 2:30 pm Post subject: |
|
|
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: |
--- 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 |
|
Back to top |
|
|
|