关于作者

用户名:休想
笔名:休想
地区:
行业:其他

日历  

快速登录

+ 用户名:
+ 密 码:

在线留言



Debian相关

喜爱网站

朋友Blog

访问统计:
文章个数:72
评论个数:6
留言条数:0




Powered by BlogDriver 2.1

乖乖的天空-Life From Scratch

 

我有很多理想,无奈,就他妈的两只手+24小时,本领又有限。很多時候,想做的,沒本事做,能做的,时间又不够,只能尽力而为罢了。

Email-1: MSN邮箱
Email-2: Gmail邮箱

OICQ:38447
MSN:evinmask@msn.com
猪猪的天空-Life From
Scratch

文章

自动配置Grub
今天在IRC,听到几个牛人在对话,发现牛人为什么了解lilo比grub多,难道真的是lilo出现的时间比grub长吗,结果一个人说了,我用grub的原因就是因为他基本上不用我手动去写什么,全部都自动了,所以才有了下文......

每次装了或者升级了内核,都要手动改改配置文件,实在是很不爽的......

grub的确是很简单的,Debian下安装了内核以后,连启动项都会自己为你添加进去,根本不需要你手动去修改什么......但是很多人喜欢在启动的时候跟一些参数。这样我们就比较困难了......那些参数适合自己呢,例如启动分辨率拉之类的......

这是我的menu.lst

# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.          
default        0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout        10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

# SplashImage
splashimage    /boot/grub/splashimages/debsplash.xpm.gz

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
#      password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title        Windows 95/98/NT/2000
# root        (hd0,0)
# makeactive
# chainloader    +1
#
# title        Linux
# root        (hd0,1)
# kernel    /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hda4 ro                 //这里就是启动的内核后面跟的参数了......大家可以加入自己喜欢的是不是很爽呀......

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,3)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery mode) single

## nonaltoption boot targets option
## This option controls options to pass to only the
## primary kernel menu item.
## You can have ONLY one nonaltoptions line
# nonaltoptions=quiet splash

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## ## End Default Options ##

title        Ubuntu, kernel 2.6.10-5-686
root        (hd0,3)
kernel        /boot/vmlinuz-2.6.10-5-686 root=/dev/hda4 ro quiet splash vga=0x315
initrd        /boot/initrd.img-2.6.10-5-686
savedefault
boot

title        Ubuntu, kernel 2.6.10-5-686 (recovery mode)
root        (hd0,3)
kernel        /boot/vmlinuz-2.6.10-5-686 root=/dev/hda4 ro single vga=0x315
initrd        /boot/initrd.img-2.6.10-5-686
savedefault
boot

title        Ubuntu, kernel memtest86+
root        (hd0,3)
kernel        /boot/memtest86+.bin 
savedefault
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title        Other operating systems:
root


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda2
title        Microsoft Windows XP Home Service Pack 2
root        (hd0,1)
savedefault
makeactive
chainloader    +1

还有其他的什么问题可以看看grub的文档

- 作者: 休想 2005年03月23日, 星期三 16:50  回复(0) |  引用(0) 加入博采

如何固定系统DPI
一般來說X的啟動預設都是96dpi了
但是有的windows manager 剛開始安裝好,硬是不給你預設的96dpi的解析度設定值
譬如KDE 一開始裝完字都很小(解析度都只有70多),字型點數都要設到16 才有正常的10pt 的大小
後來不知道怎麼改的和怎麼搞的,就改回來了 困惑中 困惑中
可能是要在GDM 中指定 -dpi 100

譬如xfce 4.2 也是相同狀況,是因為增加設定到使用者home目錄的設定腳本好像沒有寫好,漏掉了
解決方法是自己在 ~/.config/xfce4/Xft.xrdb 增加一個設定 Xft.dpi: 96
不然即使把gtk的字設到16仍然有一些地方字型會不正常跑掉變很小
,譬如firefox看簡體中文網頁時

我定的DPI为96,差不多了把,因为我最喜欢的还是Gnome,既然他默认是96,那就96了,不过用 了GDM以后,他好像自作多情的给我改了。所以一直没有办法控制各种X-Windows的DPI,导致字体这边设置了那边设置,特别是QT和Gtk程 序......用完了KDE回来Gnome还要改半天......

Debian Sarge 的Gnome 一開始就設定的好好的,而且有圖形字型設定介面
首先,关闭GMD启动,rcconf,把GDM前面的*取消就可以了
如果没有rcconf
apt-get install rcconf

然后使用startx -- -dpi 96启动X-window

我们的目的是管理GDM,让他用我们指定的DPI启动......
选择修改/etc/X11/XF86config-4

要設定時,可能需要用 xdpyinfo 指

令查看一下你最喜歡的字型大小是在設定螢幕為多大的時候

例如:
在我最喜歡的dpi設定值下
在我的電腦執行 xdpyinfo | grep dimension
會有下面的輸出

dimensions: 1024x768 pixels (274x203 millimeters)
  dimensions:    1024x768 pixels (274x203 millimeters)
  resolution:    96x96 dots per inch

所以我可以在 XF86Config-4 的 Monitor section 加上
DisplaySize   274 203

ok完全搞定了,这样来回KDE和Gnome,字体好像没有什么问题了......
当然,为了完美,大家可以安装一个
gtk2-engines-gtk-qt

apt-get install gtk2-engines-gtk-qt

开源软件都是跨平台的,在KDE中我们也可使用GNOME平台(基于GTK+)的程序。在Debian系统的KDE中有一个软件包叫gtk2- engines-gtk-qt,可帮我们在KDE平台下管理GTK+程序的主题和字体配置,使GTK+程序就就像QT程序一样方便地进行配置。该套软件包 中的主题配置引擎叫GTK-Qt Theme Engine,是由Freedesktop.org维护的,Freedesktop.org通过开发软件和制定标准,志在消除各X window桌面平台间的差异。

安装完成后,就可在KDE的"控制中心"-->"外观和主题"-->"GTK Styles and Fonts"中配置GTK+程序的主题和字体。通过该工具,GTK+程序就可使用QT丰富的主题,并可在控制中心中方便地修改GTK+程序的字体。

关于DPI的详细说明,大家可以看看

http://www.mozilla.org/unix/dpi.html

- 作者: 休想 2005年03月21日, 星期一 21:56  回复(0) |  引用(0) 加入博采

Debian Linux的核心處理
前言:此篇不算是一個news,只是對Debian對kernel的處理整理,文章理的步驟大家都很清楚了,所以改以介紹觀念為主,另外一方面,也是請大家幫忙Debug內容

** Using APT
經過前面的apt指令介紹,應該對Debian安裝軟體的方式有所了解了,而本章節是要介紹如果透過apt來生及系統的kernel。

筆者的PC是P4的機器,所以要升級的套件名稱是kernel-image-2.4.20-686,然後請開一個terminal,執行

apt-get install kernel-image-2.4.20-686

可以看到圖中有詢問到是否要停止安裝,這是因為Debian official package tree所附的kernel-image是有使用initrd.img,所以在update kernel-image的時候會有此警告,要避免此訊息可以在/etc/kernel-img.conf中加入:
do_initrd = Yes

grub的使用者請修改/boot/grub/menu.lst

title Debian GNU/Linux, kernel 2.4.20-686
root (hd0,1)
kernel /vmlinuz-2.4.20-686 root=/dev/hda7 ro
initrd /initrd.img-2.4.20-686 savedefault
boot

然後請重跑:grub-install /dev/hda

重開機之後,選用新的kernel,這樣就算是完整的使用APT升級Kernel的方法了。
** Building Kernel
編譯核心!!!

這個動作對於新手是相當害怕且興奮的事情,害怕的是因為在Kernel選單中有太多東西不認識了,且不清楚該怎麼選擇才是正確的,在這一節中,我們不詳細解釋Kernel選單中的意思,重點擺在如何利用Debian中的技巧來快速編譯自己的核心。

首先,先確定好系統已經安裝好下列的package。

1. libncurses5-dev
2. kernel-package
3. kernel-source-2.4.20
4. 目前所使用的kernel的config檔案,位置放在/boot/下面,檔名以config-xx.xx.xx

然後切換到/usr/src下,會發現有一個kernel-source-2.4.20.tar.bz2,注意:此檔案已經是Debian patch過後的,跟http://www.kernel.org/所放的kernel-source並不一樣,請先注意此點,會在後面做解釋。

接下來,跟著筆者所寫的指令完成kernel building的動作。

1. tar -jxf kernel-source-2.4.20.tar.bz2
2. cd kernel-source-2.4.20
3. make-kpkg clean
4. make-kpkg --revision 2.4.20.custom-1 --append-to-version -custom --config menuconfig
5. make-kpkg binary-arch


步驟一:當然是解開kernel-source的壓縮檔摟。
步驟二:切換到以解開的kernel-source目錄下。
步驟三:make-kpkg是Debian自己實作的tool,主要是用來簡化編譯kernel的步驟,執行make-kpkg clean相當於make distclean(請參照 kernel source 中的 Makefile)的動作。
步驟四:在這個指令中,會發現筆者使用了兩個參數,--revision,--append-to-version,後面又加入了一些奇怪的數字,這到底是什麼意思呢,讓筆者好好的解釋一下吧。

--revision這個參數會影響到此deb的Version。
這樣講似乎有點模糊,可以先看一下kernel-image-2.4.20-686的例子。

dpkg -l kernel-image-2.4.20-686

||/ Name Version Description
+++-=================================-=================================-=======================================================
ii kernel-image-2.4.20-686 2.4.20-5 Linux kernel image 2.4.20 on PPro/Celeron/PII/PIII/PIV.

在這個例子中,Version對應的就是-revision所產生的編號,-append-to-version會在安裝好核心的時候驗證,繼續往下看。

步驟五:binary-arch會產生kernel-image.deb和kernel-headers.deb,並用dpkg -i來安裝編譯好的kernel。

再來驗證一次剛剛的地方。
dpkg -l kernel-image-2.4.20*

||/ Name Version Description
+++-=================================-=================================-=======================================================
ii kernel-image-2.4.20-custom 2.4.20.custom-1 Linux kernel image 2.4.20 on PPro/Celeron/PII/PIII/PIV.

可以看出變化嗎?以上就是在Debian上自行編譯kernel的方法,很簡單吧。^_^...

** Patching Kernel

Patch Kernel!! 為什麼要patch kernel呢?用好好的還需要更換嗎?
是的,使用正常的核心基本上是不建議更換,除非是臭蟲修正或是新的功能要求為主。

以下筆者以2.4.20的kernel且加入preempt和low latency的功能來實現patch的步驟。

Package:

1. kernel-source-2.4.20
2. kernel-patch-2.4-preempt
3. kernel-patch-lowlatency-2.4

以上這些package皆可以用apt-get install安裝。 ok,萬事具備,請跟著筆者的動作一步一步完成patch kernel的動作。

1. tar -jxf kernel-source-2.4.20.tar.bz2
2. cd kernel-source-2.4.20
3. make-kpkg clean
4. make-kpkg --revision 2.4.20.custom-2 --add-patches=lowlatency,preempt --config menuconfig
5. make-kpkg binary-arch

看到這裡,是否覺得被筆者騙了呢?...微笑

patch的步驟只差在第四步中的--add-patches而已,後面所填的是所要修正的patch name,可以在/usr/src/kernel-patch/all/apply中的目錄找到,想要增加patch的file請用','分開,接下來就跟前一節手動編譯核心的動作一樣了。

** 我還是不懂-revision的意思,能告訴我好處在那嗎?
-revision的作用最主要是要建立此kernel的版本數字,比如-revision 2.4.20,這表示編譯好的deb檔案,它在dpkg的資料庫中的version是2.4.20。

舉個例子來說,Debian的package tree中有2.4.20-1,2.4.20-2的kernel-image,以上兩者皆為2.4.20的版本,而後面用-(dash)連結的數字表示此2.4.20的第幾個release。

也就是說原本2.4.20的kernel image釋出之後,該維護者會利用-revision 2.4.20-1,這樣的方式來編譯新的kernel,往後如果維護者要釋出修正版,就可以改成-revision 2.4.20-2,最大的好處在於可以簡易的用apt的方式直接升級到下一個release。

最重要的一點,使用 APT 升級 kernel 之後,切記一定要馬上重新開機載入修正好的 kernel,以免系統出現當機的現象

以上三節介紹了在Debian上安裝,編譯,修訂核心的辦法,很炫吧,使用Debian就是如此神奇與方便呢。

--PS:
Excellent tutorial
--
補充一下: 有要作 initrd.img的話, 下參數 --initrd
--
用make-kpkg 的好處是,他會把 .config<version> , vmlinuz<version>
等copy到 /boot 去.而且簡化了make xconfig, make dep, make clean, make modules,make modules_install 的步驟.

- 作者: 休想 2005年03月19日, 星期六 17:52  回复(0) |  引用(0) 加入博采

关于Gnome的splash画面的修改
arg.gnome.org上说
To change the splash screen, put the downloaded image in an unobtrusive location (since it will need to remain there as long as you want it to be the splash screen). A logical location would be ~/.gnome/splash.png (or .jpeg if the image is a JPEG). Then, edit the GConf key /apps/gnome-session/options/splash_screen using the Configuration Editor (Panel menu->System Tools->Configuration Editor) or the commandline tool gconftool-2.


打开篇配置编辑器,Gnome好多东西都要在这里编吧......
在Gnome菜单目录的系统工具里面,是不是看到了一个类似Windows注册表的东东,呵呵就是它了
键名:/apps/gnome-session/options/splash_image
键所有者:gnome
简短描述:登录启动画面的首选图像
详细描述:这是以 $datadir/pixmaps/ 目录出发的相对路径值。子目录及图像名称都是有效的值。对此值的更改将会在下次登录时生效。

当然,可以借助第三方工具。

$ sudo apt-get install gtweakui
$ gtweakui-session
这样就ok了。方法很多吧,可以告别那不好看的splash了......自己换一个PP的......

- 作者: 休想 2005年03月19日, 星期六 16:47  回复(0) |  引用(0) 加入博采

Debian Bootsplash 安装
* 参考网站
   * www.bootsplash.de
   * www.bootsplash.org
 
 * 主要步骤
   * 编译支持 bootsplash 的内核
   * 配置grub或者lilo
   * 安装支持 bootsplash 的启动脚本,和相关程序
   * 安装 bootsplash 启动主题,一陀一驼的

 * 最重要的事情
   * 把这一行 deb http://www.bootsplash.de/files/debian unstable main 
     加入你的/etc/apt/sources.list
   * apt-get update
   * apt-cache show bootsplash 看看有没有软件说明

 * 编译内核
   * 懒人可以直接到 http://bbs.buaa.edu.cn/kernel-image-2.6.10-1-386_2.6.10-99
bootsplash_i386.deb 下载我编译的for 386的内核,dpkg -i 安装之

   * 勤快人可以自己定制内核
     * apt-get install kernel-patch-bootsplash (bootsplash内核补丁)
     * apt-get install kernel-source-2.6.xx
     * cd /usr/src; tar jvxf kernel-source-2.6.xx*bz2
     * cd kernel-source-2.6.xx*
     * 打上 bootsplash 的补丁
       ../kernel-patches/all/apply/bootsplash
     * make menuconfig (确保以下参数正确设置)
     * make-kpkg --initrd kernel_image
     * 上一步将在 /usr/src/ 下面生成一个 kernel-image-2.6.xx-xx.deb, 用dpkg -i
       kernel-image-2.6.xx-xx.deb 安装之

   * 中不溜的人可以尝试 apt-src (太麻烦了,以后再说)

 * 配置grub
   * 内核装完之后,需要通过grub配置内核启动参数
   * vi /boot/grub/menu.lst
     * 找到有kopt那行,修改成
       # kopt=root=/dev/hda2 ro vga=0x314 splash=silent
     * 注意不要把kopt前面的#去掉
     * 不要照抄我的root参数
     * vga指定的是console的分辨率,取值参照下表

    | 640x480  800x600  1024x768 1280x1024
----+-------------------------------------
256 |  0x301    0x303    0x305    0x307
32k |  0x310    0x313    0x316    0x319
64k |  0x311    0x314    0x317    0x31A
16M |  0x312    0x315    0x318    0x31B

     * 记得加上 splash=silent 参数

   * 修改完配置文件之后记得 update-grub

 * 安装支持 bootsplash 的启动脚本
   * apt-get install sysv-rc-bootsplash bootsplash
   * 上面会安装一个默认的启动主题,并且会出现 bootsplash 的配置界面
     应该很好懂的
   * 安装到这一步就可以重启看看效果了

 * 安装新的启动主题
   * apt-cache search bootsplash-theme 可以搜索到很多,总共90多M
   * bootsplash-theme-debian-sarge bootsplash-theme-debian-tux 还比较漂亮
   * 注意有的主题只能支持有限的几种分辨率,如果分辨率不对,就不能显示图形了
   * 每次安装新主题以后请用 dpkg-reconfigure bootsplash 重新配置启动界面

原文:
Kernel stuff

ATTENTION!
Please read the following information very carefully. This kernel patch is free software; you may redistribute it under the terms of the GNU General Public License. This kernel patch comes with absolutely no warranty.

Requirements

* To use the Linux bootsplash screen, you have to recompile your kernel. The bootsplash patch is available for 2.4.18-2.4.22 and 2.6.0-test9. The patches should also apply to newer versions of the Linux kernel.

If you are not familiar with this procedure, please ask one of your geek friends or get hold of a distribution that already comes with the bootsplash screen.

* You need to have a working framebuffer device with 16bit colordepth, preferably vesafb (i.e. vga=0x317 for 1024x768)

* You need a bootsplash theme. Get one here or make one yourself.

* You need the splash utility, see user space stuff.

If all requirements are met, lets get started:

Patching and Compiling the Kernel

First off, make sure, your kernel sources are installed in /usr/src/linux. Now download the version of the bootsplash patch that fits to your kernel.

* bootsplash version 3.1.3 (2003/11/14, Linux 2.6.0-test9)
ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.1.3-2.6.0-test9.diff

* bootsplash version 3.0.7 (2003/03/10, Linux 2.4.22)
ftp://ftp.openbios.org/pub/bootsplash/kernel/bootsplash-3.0.7-2.4.22-vanilla.diff.bz2

Note: check ftp://ftp.openbios.org/pub/bootsplash/kernel/ for bootsplash patches not mentioned here. The patches might work well with other kernel versions. However, this is not tested.

 

yourbox:~ # cd /usr/src/linux
yourbox:/usr/src/linux # patch -p1 < /path/to/bootsplash-3.0.7-2.4.20-vanilla.diff
patching file drivers/char/console.c
patching file drivers/char/keyboard.c
patching file drivers/char/n_tty.c
patching file drivers/video/Config.in
patching file drivers/video/Makefile
patching file drivers/video/fbcon-jpegdec.c
patching file drivers/video/fbcon-jpegdec.h
patching file drivers/video/fbcon-splash.c
patching file drivers/video/fbcon-splash.h
patching file drivers/video/fbcon-splash16.c
patching file drivers/video/fbcon.c
patching file include/video/fbcon.h
patching file kernel/panic.c
yourbox:/usr/src/linux #

Now you have to change your kernel configuration, using make config, make menuconfig or make xconfig. Go to "Console drivers" -> "Frame-Buffer support" and select "VESA VGA graphics console" (or possibly another framebuffer driver, if one is available for your graphics hardware) and turn on "Use splash screen instead of boot logo". Also be sure to enable "Initial Ramdisk support" in "Block Devices" Save your new config and compile a new kernel. Copy the kernel to your /boot directory and make sure that you have a boot entry for it in your bootloader config.

Preparing the picture

As there are no filesystems accessible when the bootsplash is first shown, it can be attached to an initial ramdisk. If you dont have an initial ramdisk normally, just use an empty one.

Get the sources of the bootsplash utilities from:
ftp://ftp.openbios.org/pub/bootsplash/rpm-sources/bootsplash/bootsplash-3.0.7.tar.bz2

# cd ~/splash
# tar xvjf splashutils.tar.bz2
splashutils/
splashutils/Makefile
splashutils/splash.c
[..]
splashutils/ChangeLog
splashutils/COPYING
# cd splashutils
# make splash
gcc -Os -Wall -c -o splash.o splash.c
gcc -Os -Wall -o splash splash.o
strip splash
# cp splash /sbin/
# cd ..

Next you need to attach the picture plus a header, defining text windows and such to the initrd (in the example, this is done for 1024x768. specify other resolutions, if available) :

/sbin/splash -s -f /etc/bootsplash/themes/yourtheme/config/bootsplash-1024x768.cfg >> /boot/initrd.splash

If you want to use more than one resolution for the bootsplash, call the above command several times, once for each resolution config file.

Finishing up

run lilo, if appropriate, and reboot your system. You should get the bootsplash screen.

During boot you will likely see the following in your messages:

vesafb: framebuffer at 0xf0000000, mapped to 0xdc816000, size 65472k
vesafb: mode is 1024x768x16, linelength=2048, pages=41
vesafb: protected mode interface info at c000:5137
vesafb: scrolling: redraw
vesafb: directcolor: size=0:5:6:5, shift=0:11:5:0
Looking for splash picture.... silenjpeg size 11165 bytes, found (1024x768, 4912 bytes, v3)
Got silent jpeg.

User space stuff

  1. When you have a kernel with bootsplash capability (see Kernel stuff) you can use the bootsplash and control it's behaviour with a set of userspace utilities:


    • "splash" is used to attach a picture to an initrd or change the picture while the system is running. splash can also be used to trigger command execution when a specified runlevel script is reached. This can for example be used to show animations during bootup.

    • "fbresolution", written by Florent Villard (warly@mandrakesoft.com) shows the currently used resolution.

    • "fbmngplay" is a utility to display mng animations on the framebuffer console using libmng. fbmngplay is official part of libmng.

    • "fbtruetype" is a utility to render text using a truetype font to the framebuffer console.

      The kernel bootsplash can be configured using the /proc/splash interface. To be able to use script triggered startup actions such as moving a progress bar, you have to patch your runlevel scripts to call the "splash.sh" script.
    • Download these utilities at ftp://ftp.openbios.org/pub/bootsplash/rpm-sources/bootsplash/bootsplash-3.0.7.tar.bz2



  2. The "splash" utility. The splash utility is a multifunction tool that allows you to:


    • attach pictures to an initrd.
    • attach a jpg picture including the bootsplash config header to an initrd with:
      splash -s -f \ /etc/bootsplash/themes/current/config/bootsplash-1024x768.cfg \ >> /boot/initrd
      You can add several pictures like this, if you intend to boot your machine with several resolutions.


    • use a new picture on the fly

    • show a new bootsplash graphics on the fly on the first console by using
      splash -s -u 0 \ /etc/bootsplash/themes/current/config/bootsplash-1024x768.cfg
      any other console can be used by specifying -u [console number] where the console number starts at 0 (i.e. by default you have 0-5)

    • trigger events during bootup

      we suggest that you add a function to your init scripts that is called every time an init script is started. This can either be done in the runlevel scripts themselves or by the script/program scheduling it (i.e. /etc/init.d/rc)

      function rc_splash()
      {
      test "$SPLASH" != "no" && test "$_rc_splash" -eq 1 && /sbin/splash "$1"
      progress=$(( $progress + 1 ))
      }
      when adding the rc_splash call to your runlevel script scheduler, do it
      about like this:
      for i in $runrc/S${rex}*; do
      [..]
      # send information to bootsplash handler.
      rc_splash "$i start"
      [..]
      done

      the splash program will look for the file
      /etc/bootsplash/themes/current/config/animations.cfg which looks like the following:

      [ .. ]
      fsck start:bootanim start fsck.mng
      fsck stop:bootanim stop
      [ .. ]

      so when %i is "fsck" and the runlevel script is executed during system start, the bootanim start fsck.mng

      Basically, it's a list of bootup hooks that are associated with a command to be executed when a certain service is started/stopped during boot/shutdown.

      The syntax is this:
      [service] [start|stop]:[command-to-execute]

      "Service" is almost always the name of an executed init script. There are some additional hooks for finetuning. See the SuSE 8.1 theme's config file "animations.cfg"


  3. The splash scripts


    • The splash.sh wrapper script, which:

      - paints a truetype rendered text during bootup and shutdown at predefined coordinates
      - moves a progress bar, if there is one, using the proc interface.
      - reads the config file /etc/bootsplash/themes/current/config/bootsplash-[X]x[Y].cfg

    • The bootanim wrapper script.
      This script starts/stops animations played with fbmngplay. It looks for these animations in /etc/bootsplash/themes/current/animations/ per default. It will likely be called from the file animations.cfg. When you want to play an animation when apache is started, you would write: apache start:bootanim start animation.mng To fade out an animation, run 'bootanim stop'. Bootanim can also play multiple animations in a row, each synchronized to a certain point in bootup. This can be used to keep the last picture of an animation visible after playing the animation. To achieve this, use 'bootanim start' with option -m and multiple mng files. To move on to the next animation, use 'bootanim next' later on. Before playing the next animation (esp. at the same position as before), you need to find a hook that can properly stop the boot animation (esp. when playing looped animations). It's also advised to have an entry in your config file that stops running animations as soon as the final system runlevel is reached: master:bootanim stop


  4. Progress bar handling in the init scripts.


  5. To have a progress bar during bootup you need the following

    • A theme that contains a progress bar. Look in the Theme section
      for information on how to add a progress bar and for example themes.

    • The above function rc_splash (or comparable functionality)

    • The splash.sh script (called from rc_splash as a wrapper to the splash utility)
      Additionally you need to make your runlevel script scheduler (i.e. /etc/init.d/rc) aware of the number of scripts to be executed in the current runlevel:

      #
      # initialize boosplash progressbar variables
      #
      runrc=/etc/init.d/rc${RUNLEVEL}.d
      prerc=/etc/init.d/rc${PREVLEVEL}.d

      SSC=($runrc/S*)
      case "$SSC" in
      *\*) sscripts=0 ;;
      *) sscripts=${#SSC[*]}
      esac
      export sscripts
      if test "$PREVLEVEL" != "N" ; then
      KSC=($prerc/K*)
      case "$KSC" in
      *\*) kscripts=0 ;;
      *) kscripts=${#KSC[*]}
      esac
      export kscripts
      fi

      if [ "$PREVLEVEL" == "N" -a "$RUNLEVEL" == "5" ]; then
      export progress=16
      sscripts=$(( $sscripts+15 ))
      else
      export progress=0
      fi

      To switch the bootsplash off when the final runlevel is reached you can add the following to the runlevel script scheduler at the according place:

      rc_splash "master"

      This will cause most themes to switch off the bootsplash screen.


  6. What distributions support this per default?
  7. Currently only SuSE Linux 8.2 supports all features of the bootsplash v3. Please note that SuSE Linux 8.2 holds the themes in /usr/share/splash/themes. It keeps a temporary copy of the currently used config files in /etc/bootsplash to be used when /usr is not available (i.e. on a different partition). Patches to runlevel scripts of all distributions are welcome and can be linked here, if desired. Contact stepan@bootsplash.org.


- 作者: 休想 2005年03月19日, 星期六 16:25  回复(0) |  引用(0) 加入博采

米兰内罗
按 照贝鲁斯科尼的要求整个重建和翻新的米兰内罗(Milanello)现在已经成为欧洲享有最高声誉和最新颖的体育中心。米兰内罗距离米兰城只有50公里, 坐落在一座300米高的小山丘上,它靠近瓦雷泽(Varese,意大利北部城市),从通往科莫湖的高速公路可以很容易到达。

米兰内罗始建于1963年,位于一片160,000平方米的绿茵之上,其中包含一片松林、一个小湖。它的位置在Carnago镇、Cassano Magnago镇和Cairate镇之间,而这几个小镇的边界线正好从米兰内罗的更衣室中穿过。

米兰内罗现在不仅仅是Ac米兰俱乐部,而且也是整个意大利足球系统的重要资产。这也是当初建造它的当时米兰老板安德列.里佐利所追求的目标。贝鲁斯科尼的 牢固信念使这个目标继续贯彻下去:为教练、和球员提供一个能满足他们所有需要的体育中心。米兰内罗最高级的设施经常被意大利足协(Federazione Italiana Giuoco Calcio)用于国家队重大赛事的赛前准备,1988、1996和2000年的欧洲杯前意大利队都是在这里集训的。

米兰内罗共有六块正规场地,一块是人造草皮(35 x 30m),一块人造地面的场地(42 x 24 m),还有一块小规模的室外草地,这块场地被称作"鸟笼",因为它四周围着2.3米高的墙和2.5米高的栅栏。在"鸟笼"里,比赛永远不会停止,球始终保 持运动,用这样的方法提高球员的攻击速度。一条穿过树林、高低不平的的小路大约有1200米长,在赛季中它被用于球员的身体训练以及受伤球员的恢复性训 练。中心的主要建筑是一栋两层楼高的小楼,里面包括办公室、球员房间、会议室、洗衣房、熨衣间和康复中心。

紧靠主楼的是"来宾楼",那里也住着一些青年队的球员。这些年轻人来自意大利和世界各地,他们像所有其他少年一样到学校上课,但在下午他们可以到专用的场地上训练课。

一座从主楼独立出来的建筑拥有两个更衣室(一个是一队用的,另一个是青年队用的)和一个非常现代化的体育馆,它拥有最高级的运动技术设备,这也是米兰的骄傲之一。

这 座体育馆在米兰内罗是最经常被翻新的:在2000—2001赛季,室内训练场就扩大了一倍。这是一座高科技的体育馆,它为每个球员设计训练日程和评估训练 进度。在这个充满创新的中心里,球员们和工作人员可以使用到世界上最新颖和最精密的设备。体育馆还配有以下设备:训练全身肌肉力量以及心血管系统的设备、 关节复原和检测(REV 9000)的设备、体育技术训练系统(TGS)——它是制订个人训练规划和复原计划的关键所在。

近来,米兰内罗在世界范围内被所有权威人士公认为是世上最好的运动中心。意大利国家队经常指定它作为重要赛事(如世界杯和欧洲杯)前的集训基地。

最 高级的技术设备以及最完善的服务可以保证球员获得最佳的训练效果, 同时也更加有利于技术人员对球员训练的管理。在中心内部,信息部门刚刚完成改造,近3000米长的电缆已铺设完毕,米兰频道(俱乐部的主题频道)的照相机 已在各个"战略要点"安装就绪——这是为了能看到整个运动中心发生的一切事情,更是为了米兰球迷的需要。 

怎样到达米兰内罗

从Linate 机场前往:沿着向东或者向西的公路走,直到你到达到Varese(瓦雷泽)—Como(科莫)—Chiasso的高速公路(A8),沿着这条高速公路来到 Varese(瓦雷泽),然后在Solbiate Arno出口下高速公路,跟着路标到Carnago镇,之后就到达米兰内罗。

从意大利各地开汽车前往:上从米兰到Laghi的高速公路,朝Varese方向(A8)。在Solbiate Arno出口下高速公路,按路标指示到Carnago镇,然后就到米兰内罗了。

没有到米兰内罗的公交车。

- 作者: 休想 2005年03月17日, 星期四 00:37  回复(0) |  引用(0) 加入博采

俱乐部



 

俱乐部名称  Associazione Calcio Milan s.p.a
成立年份 1899
俱乐部总部 Via Filippo Turati 3, 20121 Milano.
电话 +39 0262281
传真 +39 026598876
圣西罗体育场 San Siro

组织结构图
 
副主席兼首席执行官 Adriano Galliani
副主席 Paolo Berlusconi
副主席 Gianni Nardi
审计委员 Leandro Cantamessa
审计委员 Michele Carpinelli
审计委员 Alfonso Cefaliello
审计委员 Giancarlo Foscale
审计委员 Livio Gironi
总经理 Francesco Vittadini
总经理 Francesco Antonio Giampaolo
总经理 Giancarlo Polerani
总理事 Ariedo Braida
副主席 Leonardo de Araujo Nascimento
组织部长 Umberto Gandini
教练秘书 Mary Buscaglia
教练秘书 Cristina Moschetta
副主席助理兼首席执行官 Daniela Gozzi
传播总监 Vittorio Mentana
传播副总监 Giuseppe Sapienza
商业及市场总监 Laura Masi
销售总监 Mauro Tavola
财务总监 Alfonso Cefaliello
行政经理 Massimo Campioli
人事经理 Raffaella Di Tondo
特别事务经理 Lino Burgaretta
采购总监 Roberto Patrassi
票务总监 Angelo Destro
青少年项目 Angelo Colombo
青少年项目 Alberto Ceresa
米兰内罗主管 Antore Peloso

- 作者: 休想 2005年03月17日, 星期四 00:35  回复(0) |  引用(0) 加入博采

米兰实验室
球队的科技服务支持

米兰实验室是由AC米兰俱乐部特别设立的高科技研究中心, 2002年7月正式投入使用。为了对运动员的心理和身体状况进行最优化的管理,俱乐部将此重任交托给了米兰实验室——科技、IT、控制论和心理学完美结合的代表。 



目标:在最高级别上获得并保持最好的表现
米兰实验室在球队成绩的许多方面都作出了积极的贡献:无论是为了保证运动员竞技状态的受伤风险预估,或是向俱乐部技术人员提供的人力资源信息支持,米兰实验室特别制定的调查与研究工作都功不可没。

球员的健康:最宝贵的资产
米兰实验室建立的初始目的就是为了保护每一位球员的健康。无论是从球场上的成绩还是球场外的经济因素来看,冠军球员们的心身健康都毫无疑问的是一支球队最为宝贵的资产。

系统化视野:组织是多元化个体的构成结果
米 兰实验室的工作是在不断开发球队"系统化视野"概念的同时进行的。一个组织,无论是企业公司还是足球俱乐部,都可以被看作是一个由许多相互关联的子系统结 合而成的整体,而所有子系统的运转状况也就决定了整个基本系统的总产出结果。因此,要想得到总产出的最大化,就需要搜集进程中所有相关领域尽可能多的信 息,来推进每一个子系统的功效发挥。

应对伤病的信息技术和类神经网络
米兰实验室在信息搜集处理方面采用的是最 先进和最具创新性的软件技术。人工智能系统可以搜集和处理数据,并能自学般的在处理所储存的信息时不断获得新知。目标是找出哪些因素在球员遇到的"危险事 件"中占主导地位,以对未来的发展作出更为现实的预测。运动员的安宁是由三个子系统共同影响的:结构、生化和精神。因此,有关每个球员心身健康的信息都被 米兰实验室通过一个由Unysis开发和AMD提供硬件设备的精细布线系统搜集起来,然后由Computer Associates开发的软件系统对获得的信息进行分析,最终的结果则是由极具创新性的Pas(Predictive Analysis Server,预测分析服务器)独家技术分析得出,而该系统的功能主要是用来预见和提示球员可能遇到的风险事件。 米兰实验室主要职员
米兰实验室总管 Daniele Tognaccini
米兰实验室医疗主管 Jean Pierre Meersseman
米兰实验室科技主管 Bruno De Michelis
联系方式 milanlab@acmilan.it
   

- 作者: 休想 2005年03月17日, 星期四 00:33  回复(0) |  引用(0) 加入博采

好久没有Show自己了……
   
我的样子很平凡,也许会有人说我丑,很少人说我还可以......自卑ing,所以我也很少Show我自己在网上,不知道这样会不会好过一点,至少现在,我学会了
不在虚伪,人的样子是父母给的,有什么关系,大脑里面装的东西才是自己最大的财富......所以,Show一下自己,看到的朋友给点意见先,各位PS大仙级人物
就不要再改我了,我快要没面目见人了......

- 作者: 休想 2005年03月12日, 星期六 07:01  回复(0) |  引用(0) 加入博采

基于Firefly补丁的字体配置文件修改笔记
    Firefly,台湾的一位大大!呵呵,暂时用这个词吧,至少现在我没有他那么厉害......由于反正现在Debian-uo源那么多,个个都有,而且更新速度 也挺快的,所以我的Debian sagre(会不会太老了)正在准备使用sid,一直使用firefly的粗体补丁,不过Openoffice.org没有用firefly修改过的...... 我懒拉......还需要一些字体配置文件。一边调试一边修改了!我不太热衷于美化,更知道Linux下绝对不是仅仅美化中文这么一点点可以做的......但是,一个中 国人,在自己用的系统环境里面看到自己的母语显示还没有M$的好,难免会有点郁闷,所以了,改改就好拉,而且这东西可以一边完善一边用的......
    关于方法,和字体代替显示粗体的不太一样了(仅仅显示粗体的不一样而已)然而呢......其他字体的首选还是差不多的吧,firefly的补丁可以实现任何自己 的粗体?正在实验,好像是的说。......感觉很不错,我可以不用方正粗宋体来代替,Ubuntu下没办法,我的怪毛病,好了,显示粗体已经是一个问题了,我们 还要继续调试出让我们的眼睛舒服的环境......

不过,既然libxft2和freetype6补丁修改了一些文件,难免破坏默认的一些关系,一句话,不是firefly的补丁不好,只是我怕麻烦,既然 修改配置文件就可以达到很好的效果,为什么还要用补丁呢,其实,也不是我变化的很快,主要是今天测试了一下轻量级桌面,哎哟我的天,显示中文的不行,原来 是firefly补丁的问题,要手动指定,看,麻烦吧 ,我无语了,第一次感到firefly补丁给我带来的麻烦......
然后就开始配置咯配置咯,终于可以显示好看的中文了,结果字体大小和Gnome下的不一样,晕AA没关掉,看上去发虚,天阿,我最怕麻烦了......但是,我的 确感谢firefly给我带来的好东西,说实话,如果我不打算用icewm的话,firefly的patch我会一直用的,也许是我懒得修改 fontconfig的配置文件了!

不是firefly的补丁不好,只是我怕麻烦,还是自己写文件修改吧......

大家如果觉得自己的电脑够呛,不需要用什么轻量级桌面,就用firefly的patch吧,Debian下用超级简单
添加一个debian-uo源,然后apt-update就好了

我会把我的配置文件传上来给大家......然后复制文件倒/etc/fonts/ 目录下就ok了......

虽然我不使用firefly的补丁,不过他的字体我的确非常喜欢的。

我附上我以前用的配置文件
附件 fonts.tar.gz:http://blog.blogchina.com/upload/2005-03-14/2005031418464667416.gz

到了这里,大家已经可以用粗体了,而且中文效果也不错的......下面有两张效果图
http://lfsky.blogchina.com/blog/article_144875.863310.html

我的Debian笔记里面的效果图在里面
大家可以把关闭AA的字体范围调小一点,最小值可以设大一点,最大值不要动,不然GDM的登录界面字会很难看。

- 作者: 休想 2005年03月12日, 星期六 06:44  回复(0) |  引用(0) 加入博采