[分享]Debian Linux Logo on Virtual Terminals and Network L

常言道:『飲水思源』,在 Open Source 的世界裡,我們常常需要別人的幫助,但是在您有所心得的時候請記得分享給大家,『幫助人是快樂的喔』。歡迎您在使用 debian 的過程中的任何心得分享給大家。

[分享]Debian Linux Logo on Virtual Terminals and Network L

文章moto » 週三 2月 12, 2003 10:05 am

Published by Linux Orbit, January 27, 2003
by Dan "OverrideX" McCombs

This Mini-HOWTO is something purely for fun, for those who are proud of which GNU/Linux distribution is on their box. It really doesn't serve much of a purpose besides looking cool, or letting people know exactly what distro you choose, along with displaying some hardware info.

There are different ways you can use this package, and I'm only listing the two I use. (Rest assured they're not the only two.) No matter which you use, you can kick off the install with an 'apt-get install linuxlogo' and then proceed to the steps below:

Showing the Logo Above Login Prompts (Good for Local Logins)

This method will show the logo above your logins on your virtual terminals, I.E. when you hit ctrl+alt+FX (where FX is F1-F6), and also on tty1 (F1) when you bootup if you like. After you've installed the linuxlogo package, edit the file /etc/inittab. For each terminal you want the logo on, add '-f /etc/issue.linuxlogo' to the getty command (issue.linuxlogo.ascii if you don't want color) so that the settings should look like this:

Original:
1:2345:respawn:/sbin/getty 38400 tty1

Logo:
1:2345:respawn:/sbin/getty -f /etc/issue.linuxlogo 38400 tty1

Do this to each terminal you want, and then reboot or change your runlevel to something else and back to what you were using with the 'init' command. If you use it on tty1, you probably want to run 'chmod -x /etc/init.d/linuxlogo' so that the logo isn't displayed on startup (since it would show twice).

Showing the Logo as the MOTD After You Login (Good for Remote Logins)

This method is nice for a machine you don't access locally, like a server box that you only login to remotely over your LAN. First, move your old motd out of the way and create a new one:

mv /etc/motd /etc/motd.old
/usr/bin/linux_logo > /etc/motd

Next, edit /etc/init.d/bootmisc.sh and change these lines:

uname -a > /etc/motd.tmp
sed 1d /etc/motd >> /etc/motd.tmp
mv /etc/motd.tmp /etc/motd

To:

# uname -a > /etc/motd.tmp
# sed 1d /etc/motd >> /etc/motd.tmp
/usr/bin/linux_logo > /etc/motd.tmp
sed 1,18d /etc/motd >> /etc/motd.tmp
mv /etc/motd.tmp /etc/motd

After you've edited it, run '/etc/init.d/bootmisc.sh' and you should now see the logo on login, as in Figure 1 below. If you want to add a message of the day to the file, just add the message to the end of /etc/motd, don't leave a blank line in between as it will add one on it's own.

Conclusion and Security Notes

This Mini-HOWTO is aimed towards Debian since that's what I've used it on, but you can use linuxlogo on any distribution. There are logos for most Linux distributions, as well as with generic GNU/Linux logos. The virtual terminal method should work the same on any distro, but the motd method will depend on how your distro handles the motd in its boot scripts.

One security concern about this is that if a potential attacker sees the logo (depending how you have it setup) they learn some hardware information about your machine and kernel version, which could help them in an attack against your machine. The /usr/share/doc/linuxlogo/USAGE.gz file provides a description of how to setup the logo with fake information to actually work in your favor, if you feel the need. I hope you found this to be a fun tweak to show your pride for your distro of choice, as always, have fun!

<img src="http://www.linuxorbit.com/graphics/debiannet.png">

--
data source from :
http://www.linuxorbit.com/modules.php?o ... 548&page=1
頭像
moto
摩托學園站長
摩托學園站長
 
文章: 2808
註冊時間: 週二 9月 03, 2002 3:37 am
來自: 台北

回到 share

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客