LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 5041|回复: 10

个性化启动之图形篇

[复制链接]
发表于 2004-2-14 10:37:02 | 显示全部楼层 |阅读模式
我们的口号 -- 打造个性化的 Gentoo !
-------------------------------------------

厌倦了 linux 启动的呆板?OK,让我们给 Gentoo 的启动加点“颜色”    Let's go!

1. 牛牛 -- cowsay
下载 cowsay,安装:

  1. tar zxvf cowsay-3.03.tar.gz
  2. cd cowsay-3.03
  3. ./configure --prefix=/usr
  4. make && make install
复制代码


建立 /etc/init.d/issue 脚本,内容如下:

  1. #!/bin/sh
  2. # Local system initialization script
  3. RELEASE="release 1.4 RC4"
  4. COLOR1="\033[1;6m\033[32;40m" # bright green on red
  5. COLOR2="\033[1;6m\033[34;40m" # bright purple on red
  6. COLOR3="\033[1;6m\033[31;40m" # bright red on red
  7. COLOR4="\033[1;6m\033[33;40m" # bright yellow on red
  8. COLOR_RESET="\033[0m"
  9. rm -f /etc/issue
  10. /usr/bin/cowsay "Hello World" >> /etc/issue
  11. echo -e $COLOR1"Gentoo"$COLOR2 "Linux" $COLOR4"$RELEASE"$COLOR_RESET"(\l)">>/etc/issue
  12. echo -e $COLOR3"Kernel $(uname -r) on an $(uname -m)"$COLOR_RESET >> /etc/issue
  13. echo -e $COLOR1"Welcome to the Microweb!">>/etc/issue
  14. echo >>/etc/issue
  15. cp -f /etc/issue /etc/issue.net
复制代码

赋予执行属性:

  1. chmod a+x /etc/init.d/issue
复制代码

让 issue 在系统启动后执行:

  1. echo "/etc/init.d/issue &" >> /etc/conf.d/local.start
复制代码

这样系统启动后就会有一只可爱的 ASCII 小牛欢迎你啦!如下图:



如果不喜欢这只小牛,可以在 /usr/share/cows 中找到其他的 ASCII 图形,在 cowsay 后面加上参数,如:

  1. cowsay "Hello World" -f /usr/share/cows/tux.cow
复制代码


2. Linux_Logo
这个东西以前在 gentoo 1.4 rc1 见过,让我们来见识一下:
安装 Linux_logo

  1. emerge Linux-logo
复制代码

让 Linux-logo 随系统启动:

  1. echo "Linux_logo -L3 " >> /etc/conf.d/local.start
复制代码

效果如下图:


大家还有什么好的美化方法加上来吧!
发表于 2004-2-14 10:41:44 | 显示全部楼层
不错
发表于 2004-2-17 21:14:10 | 显示全部楼层
cool! The last picture is awesome. I'll try that.
发表于 2004-2-18 10:35:31 | 显示全部楼层
[PHP]echo "Linux_logo -L3 " >> /etc/conf.d/local.start[/PHP]


晕  楼主啊   linux_logo  开头的L应该是小写的
发表于 2004-2-18 19:30:41 | 显示全部楼层
蛮好玩的,呵呵
发表于 2004-2-25 20:46:25 | 显示全部楼层
好玩,谢谢!
发表于 2004-2-28 14:34:40 | 显示全部楼层
怎么样才可以让它开机时自已启动~

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2004-2-28 14:37:35 | 显示全部楼层
local.start 开机就会执行
发表于 2004-2-28 14:47:48 | 显示全部楼层
奇怪,我的/etc/conf.d/local.start下有
  # /etc/conf.d/local.start:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/local.start,v 1.4 2002/11/18 19:39:22 azarah Exp $

# This is a good place to load any misc.
# programs on startup ( 1>&2 )
               
linux_logo -L3

不过开机时看不到呀!?
 楼主| 发表于 2004-2-28 14:53:56 | 显示全部楼层
rc-update add local default
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表