修改 grub 背景图片
Posted 2 years, 5 months ago at 11:32 am. 0 comments
原文来自 grub splash howto
大约要注意这几个问题
640×480
14色
压缩为 xpm.gz 格式
menu.lst 内容为
splashimage (hd0,1)/boot/grub/grubsplash.xpm.gz
原文来自 grub splash howto
大约要注意这几个问题
640×480
14色
压缩为 xpm.gz 格式
menu.lst 内容为
splashimage (hd0,1)/boot/grub/grubsplash.xpm.gz
原文来自 Backup installed packages on ubuntu,蛮有趣的,大约内容如下:
所有通过 synaptic(新立得)、apt-get、aptitude(shell 模式的新立得)安装的软件,都会在
/var/cache/apt/archives
留下 .deb 安装包。备份这些文件就可以很方便的重装或者新装ubuntu。另外,作者还介绍了一个图形化的刻盘工具—APTonCD。
APTonCD is a tool with a graphical interface which allows you to create one or more CDs or DVDs (you choose the type of media) with all of the packages you’ve downloaded via APT-GET or APTITUDE, creating a removable repository that you can use on other computers.One thing you need to remember this will create backup all the packages installed using apt-get,synaptic because these package arcives are stored in /var/cache/apt/archives
APTonCD will also allow you to automatically create media with all of your .deb packages located in one especific repository, so that you can install them into your computers without the need for an internet conection.
1、处理特殊的文件名
假设Linux系统中有一个文件名叫“-ee”,如果我们想对它进行操作,例如要删除它,按照一般的删除方法在命令行中输入rm -ee命令,界面会提示我们是“无效选项”(invalid option),原来由于文件名的第一个字符为“-”,Linux把文件名当作选项了,我们可以使用“–”符号来解决这个问题,输入“rm — -ee”命令便可顺利删除名为“-ee”的文件。如果是其他特殊字符的话可以在特殊字符前加一个“”符号,或者用双引号把整个文件名括起来。
2、直接进行Linux的安装工作
在安装Linux操作系统时,可以利用该系统光盘中的一个名为“loadlin.exe”的软件,将Linux核心直接调入内存,由Linux核心代替当前操作系统来接管计算机,并进入Linux的安装界面。在安装Linux时,我们只要在运行对话框中输入“loadlin E:imagesvmlinuz root=/dev/ram initrd=E:imagesinitrd.img”这个命令就可以直接安装Linux了;其中“E:imagesvmlinuz”为Linux的核心名。
3、消除Xwindows下的死机现象
我们可以用两个常用的方法来消除这种现象:第一,用键盘上的复合键“Ctrl+Alt+Backspace”来关闭当前正在运行的任务;第二,首先按住键盘上的“Ctrl+Alt+F2”复合键,让系统切换到另一个操作台,然后登录到系统,再执行“#ps -ax/grep startx”命令,这将会列出你的Xserver的进程标识,接着在命令行中输入如下命令就能消除Xwindows下的死机现象:#kill -9 PID_Number,最后通过“Alt+F1”复合键返回到原来的平台。
4、快速关闭Linux系统
最新版本的Linux/UNIX系统借鉴了大型机的技术,采用了抗掉电的日志式文件系统,可以自动跟踪保存用户数据,自动同步刷新文件系统,用户完全可以随手关闭电源,从而达到快速关闭系统的目的。
5、巧妙使用“rm”命令
我们可以使用带“-r”参数的“rm”命令来删除一个非空目录,例如我们在命令行中输入“rm -r bbb”这样的命令,表示系统将把bbb目录中包含的所有文件和子目录全部删除掉。
6、巧妙使用“Tab”键
大家知道在Linux字符界面中输入命令时,有时需要输入很多字符,如果经常这样逐个地输入字符,比较麻烦。假设键入的字符足以确定该目录下一个惟一的文件时,我们只需按键盘上的“Tab”键就可以自动补齐该文件名的剩下部分,例如要把目录/ccc下的文件“ddddddd-1.2.3.tar.gz”解包时,当我们在命令行中键入到“tar xvfz /ccc/d”时,如果该文件是该目录下惟一以“d”打头的文件的话就可以直接按下“Tab”键,这时命令会被自动补齐为:tar xvfz /ccc/ddddddd-1.2.3.tar.gz ,从而提高了输入效率。
7、多用鼠标拷贝与粘贴来提高操作速度
Linux系统安装后,每次启动到字符界面时都会自动运行一个叫“gpm”的程序,该程序运行后就可以用鼠标来拷贝与粘贴了。具体做法是按住鼠标左键拖动使要拷贝的地方突出显示,这时突出显示的区域已经被拷贝,再按鼠标右键拷贝的内容就会被粘贴在光标所在位置了。如果我们在Xwindow下运行Linux 系统,拷贝与粘贴的操作与在Windows 9x系统下一样。
8、快速启动Linux系统
在DOS下,有一种简单快速启动Linux的方法,那就是load Linux。loadlin.exe是DOS下的可执行程序,它可以在纯DOS环境下迅速启动Linux,而且无需重启计算机,通常我们可以在光盘的 “/kernels”目录下找到这个程序。如果不知这个程序被放置于安装盘的何处,可以使用“find -name loadlin*”命令来寻找。找到之后将其复制到DOS分区中,同时还需要复制一份你所使用的Linux内核文件。可以通过Windows直接从光盘复制,也可在Linux环境下使用“mcopy”命令将文件复制到DOS分区;接着再编写一个名为“Linux.bat”的批处理文件,文件内容如下:c: loadlin c:vmlinuz root=/dev/hda1 ro(我们假设loadlin.exe和vmlinuz这两个内核文件都在c盘根目录下,“root”为Linux的根设备,而且Linux处于硬盘第一分区,所以设备名为“/dev/hda1”,“ro”意为readonly)。以后在DOS下要启动Linux时,运行“Linux.bat”就可以了。
via lupa
看到此文,原来就在 ~/.thumbnials/ 目录中。不象win下直接就在当前文件夹 thumbs.db,每次拷贝东西都浪费空间啊…:(
可能是因为从 dapper 升级到 edgy 的原因吧。启动后报告“scim launcher 异常关闭”
在 ubuntu.org.cn 找到这篇文章,说是
sudo im-switch -s scim
im-switch 参数
Input Method Switcher 0.3+debian1.10
“im-switch” configures the input method to be automatically switched based
on the locale (ll_CC) using Debian “update-alternatives” mechanism.
When “im-switch” is invoked from root user, it sets system wide alternatives.
Usage: im-switch [-v][-z ll_CC] -s inputmethodname
to set a specific input method for the language
im-switch [-v][-z ll_CC] -c
to set an input method for the language by menu
im-switch [-v][-z ll_CC] -a
to revert to the default input method for the language
im-switch [-v][-z ll_CC] -l
to list current settings and available input methods for
the language, and also all the available languages
im-switch -h
to show this help
The “ll_CC” argument of -z takes the form “
is used to override the current locale (ISO 639 / ISO 3188) : eg “-z ja_JP”
The use of -v option produces verbose outputs.
guoshuang2007-02-08+还是不行。每次启动仍然报告 crash。
原文来自 Set Up Ubuntu-Server 6.10 As A Firewall/Gateway For Your Small Business Environment
有意思的文章。学习笔记如下:
安装 SSH
apt-get install openssh-server
编辑网卡配置
Edit /etc/network/interfaces and add the following at the bottom:
参考下面
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
重启
/etc/init.d/networking restart
安装库文件
apt-get install libmd5-perl libnet-ssleay-perl libauthen-pam-perl libio-pty-perl shorewall dnsmasq
安装 webmin
wget http://surfnet.dl.sourceforge.net/sourceforge/webadmin/webmin_1.310_all.deb
“surfnet” is the dutch server. Change that to “heanet”(for Ireland), “belnet”(for Belgium), “mesh” (for Germany) and so on.
dpkg -i webmin_1.310_all.deb
安装 shorewall
cp /usr/share/doc/shorewall/examples/two-interfaces/* /etc/shorewall/
cd /etc/shorewall
gunzip interfaces.gz masq.gz rules.gz policy.gz
登陆 webmin 界面管理 shorewall(http://xxx.xxx.xxx.xxx:10000)
Now open your browser and login to webmin at https://192.168.1.1:10000 as root with your root password and, using webmin’s shorewall module, change the policy’s and rules of your firewall as needed (for now, I only set the policy file to the example as shown, you may copy and paste my policy file for starters, if you don’t like webmin).
Also set in /etc/shorewall.conf the line “IP_FORWARDING=Keep” to “IP_FORWARDING=On” (without quotes) and enable the firewall in /etc/default/shorewall.
My /etc/shorewall/policy now looks like this:
###############################################################################
#SOURCE DEST POLICY LOG LEVEL LIMIT:BURST
#
# Note about policies and logging:
# This file contains an explicit policy for every combination of
# zones defined in this sample. This is solely for the purpose of
# providing more specific messages in the logs. This is not
# necessary for correct operation of the firewall, but greatly
# assists in diagnosing problems.
#
#
# Policies for traffic originating from the local LAN (loc)
#
# If you want to force clients to access the Internet via a proxy server
# on your firewall, change the loc to net policy to REJECT info.
loc net ACCEPT
loc $FW ACCEPT
loc all REJECT info
#
# Policies for traffic originating from the firewall ($FW)
#
# If you want open access to the Internet from your firewall, change the
# $FW to net policy to ACCEPT and remove the ‘info’ LOG LEVEL.
# This may be useful if you run a proxy server on the firewall.
$FW net ACCEPT
$FW loc ACCEPT
$FW all REJECT info
#
# Policies for traffic originating from the Internet zone (net)
#
net $FW DROP info
net loc DROP info
net all DROP info
# THE FOLLOWING POLICY MUST BE LAST
all all REJECT info
#LAST LINE — ADD YOUR ENTRIES ABOVE THIS LINE — DO NOT REMOVE
启动防火墙
/etc/init.d/shorewall start
单色
# Monochrome: Renders fonts in black and
white only. The edges of characters might appear jagged in some cases because
the characters are not antialiased. Antialiasing is
an effect that is applied to the edges of characters to make the characters
look smoother.
最佳形状(普通CRT显示器)
#Best shapes: Antialiases fonts where
possible. Use this option for standard Cathode Ray Tube (CRT) monitors.
最佳对比
#Best contrast: Adjusts fonts to give
the sharpest possible contrast, and also antialiases fonts, so that characters
have smooth edges. This option might enhance the accessibility of the GNOME
Desktop to users with visual impairments.
次像素平滑(液晶显示器)
#Subpixel smoothing (LCDs): Uses techniques
that exploit the shape of individual Liquid Crystal Display (LCD) pixels to
render fonts smoothly. Use this option for LCD or flat-screen displays.
via Change Ubuntu System from DHCP to a Static IP Address
其实用图形工具就可以,在 系统管理 - 联网 中即可设置。命令行方式的操作大致如下:
sudo vi /etc/network/interfaces
DHCP 默认内容大致为
auto eth0
iface eth0 inet dhcp
修改为
auto eth0
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
重启网络即可
sudo /etc/init.d/networking restart
lighttpd 虚拟主机配置
编辑 /etc/lightpd/lighttpd.conf 文件,添加:
$HTTP["host"] == “wiki.guoshuang.com” {
server.name = “wiki.guoshuang.com”
server.document-root = “/var/www/guoshuang”
server.errorlog = “/var/www/guoshuang/cuowu.log”
accesslog.filename = “/var/www/guoshuang/cuowu.log”
}
保存。重启 lightpd 即可。
lighttpd(别名)虚拟目录配置
server.modules += ( “mod_alias” )
alias.url = ( “/cgi-bin/” => “/home/lighttpd/theos.in/cgi-bin/” )
Browse all documents installed at /usr/share/doc/ directory with following alias:
alias.url = ( “/docs/” => “/usr/share/doc/” )
alias.url += ( “/stats/” => “/home/theos.in/http/webalizer/” )
拒绝下载 ~ 和 .inc 文件。
url.access-deny = ( “~”, “.inc” )
wikipedia 虚拟主机以后需要修改 LocalSettings.php 的目录。否则报告 404 错误。