2007-09-27 11:21
1 到
http://www.virtualbox.org/ 下载安装deb包
2 按说明安装VirtualBox
3.添加用户组sudo usermod -G vboxusers -a username 要注销重新登陆
4.去除Qt WARNING: QObject::connect: Cannot connect...
sudo /etc/init.d/vboxdrv setup
5.现在可以运行VirtualBox了
2007-02-11 10:53
$ cat .bashrc|grep 'alias tar'
alias tar_delete='tar --delete -f '
alias tar_list='tar tf '
alias tar_update='tar uPvf '
alias tar_extract='tar xPvf '
$ tar_update sys.tar /etc/fstab /etc/X11/xorg.conf
/etc/fstab
/etc/X11/xorg.conf
$ tar_list sys.tar
/etc/fstab
/etc/X11/xorg.conf
$ tar_delete sys.tar /etc/X11/xorg.conf
$ tar_list sys.tar
/etc/fstab
$ tar_extract sys.tar
$tar xvf sys.tar -C /tmp
还可用tar来备份系统,如windows XP,不过备份后再恢复时..
2007-01-24 17:16
在一段时间的迷茫后,终于从茫茫的代码中,理出了头序,主要是unique的处理框架及事件处理流程
希望对正在此方面研究的同胞提供方便,网上的资料太粗了
窗口管理器主要工作是实现CoreWMFuncs(在src/core/wm_module.h中定义)中定义的接口,其中Grab由wm_grab实现(处理捕捉到的信号),输入信号经由unique.c的wm_grab函数处理,而wm_grab函数又调用window.c的unique_window_grab处理在unique_window_grab中信号被分类(CWMGT_KEYBOARD,CWMGT_POINTER,CWMGT_KEY)处理当输入的是由鼠标触发的信号时,调用CWMGT_POINTER分支的处理,即调用..
2007-01-19 16:13
The following parameters may be specified in the directfbrc file:
system=<system>
Specifies the graphics system to use. The default is to use the Linux frame buffer (fbdev) but you can also run DirectFB applications on SDL (sdl). Other systems might be added in the future.
fbdev=<device>
Opens the given frame buffer device instead of /dev/fb0.
mode=<width>x<height>
Sets the default screen resolution. If unspecified DirectFB will use the fi..
2007-01-10 18:12
单个文件
diff -uN old-file new-file > new-file.patch
已知old-file和new-file.patch,将old-file改为new-file
patch -p0 < new-file.patch
已知new-file和new-file.patch,将new-file还原为old-file
patch -R -p0 < new-file.patch
多个文件含目录
diff -uNr old-dir new-dir > new-dir.patch
打补丁
patch -p1 < new-dir.patch
恢复
patch -R -p1 < new-dir.patch
2007-01-10 17:58
将文本按行倒序
tac urfile
sed '1!G;h;$!d' urfile
awk计算行值
awk '{print $1+$2}' urfile
awk计算列值
awk 'BEGIN{total=0}{total+=$1}END{print total}' urfile
perl计算行值
perl -ane '{$total=@F[0]+@F[1];print $total;print "\n"}' urfile
perl计算列值
perl -ane '{$total+=@F[0];}END{print $total;print "\n"}' urfile
删除包含aaa但不包含bbb的行
sed '/aaa/{/bbb/!d}' urfile
文件列转行..
2007-01-10 14:24
默认的窗口管理器是metacity
现在我将把它换为enlightenment
由于gnome-wm脚本使得切换窗口管理器很不方便,故发此文
#apt-get install enligntenment
编辑/usr/bin/gnome-wm,修改
if ! which "$WINDOW_MANAGER" > /dev/null; then
# Get --default-wm
if which "$DEFWM" > /dev/null; then
WINDOW_MANAGER=$DEFWM
if [ "$WINDOW_MANAGER" = x-window-manager ]; then
WINDOW_MANAGER=`readlink /etc/alternatives/x-window-manager 2>/dev..
2006-12-27 09:43
1.生成udeb包(debian/control)
在Package的一段中加入
XC-Package-Type: udeb
2.控制次序(debian/control)
XB-Installer-Menu-Item: n{1..n}
n表数字
3.生成templates(debian/rules)
binary-arch: build install
...
dh_installdebconf
...
4.main-menu的执行
在mini.iso中的initrd.gz中
/lib/debian-installer.d/S70menu-linux
中有/lib/debian-installer/main-menu这就是main-menu开始执行了
在/lib/debian-installer/main-menu中执..
2006-12-18 18:20
制作救护启动系统, 呵呵, 这是一篇简单的文章,希望对初学者有用, 好了,费话就不说了,我们开始吧
如果你忘了密码,这将很有用
你的系统启动时也许会只有几个很实用但很宠大的系统,现在让我们来制作一个简单的吧,呵呵,简单万岁
$cat /boot/grub/menu.list
default 0
timeout 5
color cyan/blue white/blue
gfxmenu=(hd0,0)/boot/grub/boot.message
title RAYS LX 2.6.17
root (hd0,0)
kernel /boo..
2006-12-18 18:10
最简单的iso制作, 费话就不说了, 下面开始吧
1. cd /tmp
2. mkdir myiso && cd myiso
3. cp /boot/vmlinuz .
vmlinuz为核
4. cp /boot/initrd.img .
initrd.img为镜像文件
5. vi isolinux.cfg 并输入以下内容
DEFAULT myiso
label myiso
kernel /bzImage
append video=vesa:ywrap,mttr vga=788 initrd=/initrd.gz load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=60000 rw root=/dev/ram
PROMPT 1
TIMEOUT 0
6. 拷贝isolinux..
2006-12-18 17:58
1. BOS自检
2. 内核初始化
3. 内核初始化完成后将控制权交给/sbin/init,这时实现了内核空间向用户空间的转化
/sbin/init程序可以是程序,也可以是脚本,但其都要对/etc/inittab进行解析,当然
如果你不想系统这样做也可以,那你就自己改/sbin/init吧
4. /sbin/init的执行意味着用户空间程序开始,你可以对他进行控制了
文字很简短,不过启动过程序也就是这样
2006-12-18 17:41
gtk-directframebuffer的使用
1. 找一个有libgtk-directfb-2.0-dev的源,例如修改源/etc/apt/sources.list
deb
http://rays.openrays.org/RAYSLX zidian main contrib
2. apt-get update
3. 安装gtk-directfb
apt-get install libgtk-directfb-2.0-dev
4. 测试
建目录test
$mkdir test
在test目录中建文件
$ls
helloworld.c
helloworld.c来源于
http://www.gtk.org/tutorial/c39.html#SEC-HELLOWORLD 编译
$gcc -o mai..