两个有意思的玩意儿: linuxlogo, cowsay

巴蛮子 posted @ 2011年2月08日 09:10 in Unixer with tags linuxmint debian linux geek , 10061 阅读

linuxlogo:  Color ANSI System Logo

A Color ANSI Logo with some system information that can be displayed at system boot time or, with some local configuration, at the login prompt. Four different Logos are available:

 * Debian Swirl(default)
 * Debian Banner
 * Tux Classic and Banner

The Classic and Banner Logos are based on Larry Ewing's Penguin. Monochrome ASCII versions of all the logos are included.





我修改了一下Debian提供的/etc/init.d/linuxlogo,直接用linuxlogo的输出作为了/etc/issue.net (ANSI彩色版本)和/etc/issue (无ANSI控制字符版本)的头部。

cowsay: A configurable talking cow

Cowsay (or cowthink) will turn text into happy ASCII cows, with speech (or thought) balloons. If you don't like cows, ASCII art is available to replace it with some other creatures (Tux, the BSD daemon, dragons, and a plethora of animals, from a turkey to an elephant in a snake).

homepage: http://www.nog.net/~tony/warez/cowsay.shtml

这次安装LinuxMint以后在登录后就会看到一个牛或者企鹅吐出一段随机的话,对于这些小玩意儿我有些兴趣,于是在/etc/profile等文件里面找了半天才知道是cowsay的效果:LinuxMint封装了一个cowsay+fortune的脚本,叫做mint-fortune,在mintsystem包里面提供。其实自己想要类似的也容易(不过LinuxMint还简单地做了一下随机显示tux/moose还是别的什么,具体如何控制可自己看manpage): 

   $ cowsay `fortune`

对于Debian系统管理员,不妨安装一个fortunes-debian-hints, 在~/.profile里面添加如下一行:

   /usr/games/fortuen debian-hints | /usr/games/cowthink

这样每次登录都会有一条关于Debian系统管理的Tips了。

 

 

Technorati 标签: , ,

 
 
Avatar_small
Ivan 说:
2012年4月15日 19:57

怎样让fortune随机的显示多个文件中的一条啊?
我自己做了几个文件,但只显示其中的一个文件中的句子,我估计它不把那个文件显示完就不显示一个文件的东西了。

Avatar_small
巴蛮子 说:
2012年5月05日 12:35

fortune缺省就是随机显示多个文件中的一条(除非指定,比如fortune 90% funny 10% not-funny将从funny和not-funny两个文件抽取显示,几率分别是90%和10%)。自己做的文件放在正确的位置了吗?Debian里是放在 /usr/share/games/fortunes 这个目录下


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter