2008年12月31日星期三

Screen

09/01/01
screen是个好东西!
C-a c 创建新窗口
C-a 0-9 切换窗口
C-a d 进行detach动作
screen -ls 查看
screen -r 进行attach动作

IRC

今天有时间研究一下irssi,把#szlug自动登录研究了一下,同时加入了nicklist插件。

/network add freenode
/server add -auto -network freenode irc.freenode.org 6667
/channel add -auto #szlug freenode

/network add -autosendcmd "/^msg nickserv identify xxx" freenode

irssi还不错,插件挺多!

2008年12月16日星期二

chmsee-1.0.2 折腾两天,编译OK!

昨天晚上折腾了几个小时去编译chmsee,结果总是出错,还好在SZLUG友人的帮助下,一步步解决了。

checking for GECKO... no
*** You must have either the Mozilla, Firefox, Seamonkey or XulRunner
*** development libraries installed in order to build ChmSee!

SZLUG问题帖子
http://groups.google.com/group/szlug/browse_thread/thread/d77adfd925aaf79f
Chmsee bug报告
http://code.google.com/p/chmsee/issues/detail?id=3

2008年12月14日星期日

GTK探险 @)@

GTK是个难肯的骨头,用--prefix=/opt/gtk这种方法我没有成功!游走于十几个源代码包后,最后在make GTK library的错误信息中宣告失败!和我一样失败的兄台也有,linuxsir早有记载!
http://www.linuxsir.org/bbs/lastpostinthread336444.html
在编译之前要好好想想:
1 自己为什么要手动编译
2 编译了以后打算怎么挂掉

干脆靠ubuntu整理好的开发包!
sudo apt-get install libgtk2.0-dev这时候遇到了如下问题:

The following packages have broken dependencies:
libgtk2.0-dev: Depends: libgtk2.0-0 (= 2.12.9-3ubuntu4) but 2.12.9-4ubuntu3 will be installed
E: Broken Packages

解决方法如下:
sudo aptitude install libgtk2.0-dev

在下面文章指引下,我的第一个GTK程序 Helloworld诞生了! ^^
http://bo.majewski.name/bluear/gnu/GTK/plain/#sidenote2

夜深了,从18点折腾到现在。为了GTK的Helloworld值了!

2008年12月12日星期五

As a Ubuntu user, endless tuning!

I have to learn how to pause. I have to remind myself that my major task is not tuning ubuntu.

2008年12月9日星期二

安装Fedora10的硬盘会不会受风?

年初升级了PC,留下了一台旧的电脑主机。参加完Fedora10聚会后心血来潮打算把这个旧主机利用一下,至少要跑跑Fedora10,不能对不起bbbush的光盘。

旧机器的内存只有256M(DDR I),于是去南山赛格添了条256M的RAM,这样内存512M,跑Linux应该够用了。

借了公司的USB光驱,安装Fedora10的时候遇到了N多问题。首先是安装界面花屏。在bbbush的指导下进入text模式,顺利安装,不过text模式默认是字符启动模式3,于是我改成5,想看看X。不过进X后会死机,目前正在研究中...

两台PC了,但是只有一套键盘鼠标显示器,taobao拍了一个KVM。安装妥当后进入我的Ubuntu,在要进入Gnome桌面时竟然显示No Signal Input,晕死!对比用KVM进Windows XP一切正常。TMD连KVM都欺负Linux,上旺旺找店主发泄。没想到店主还有些经验,说之前Ubuntu + ATI显卡芯片有遇到这种问题,换个阳春的显卡驱动就正常了。一语点醒梦中人,我的Ubuntu有开启那个ATI非授权的驱动,Disable后KVM正常!AMD也够逊,没魄力搞开源,收购ATI就走末路,貌似和VIA收购S3有些雷同,看起来最好不要收购显卡晶片厂。

旧的机箱已经被我大卸八块,在B&Q的两个小凳子上躺着,突然发现目前架构是电源的出风口正好在对装有Fedora10的硬盘吹风,硬盘会不会受风?千万别得荨麻疹。

Tag 08/12/09
进入文本模式后输入gdm,进入图形登录界面,看起来分辨率至少是1024*768,显卡应该驱动上了。但是Fedora10没有xorg.conf文件,官方说是使用evdev,看来要从这里找些线索。
http://who-t.blogspot.com/2008/07/input-configuration-in-nutshell.html -- Evdev 配置。
Tag 08/12/11
Thanks God, Fedora10在i845显卡上终于跑起来了!
解决过程如下:
1. 到下面链接下载xorg-x11-drv-i810-2.5.0-3.fc10.i386.rpm
http://rpmfind.net/linux/rpm2html/se...g-x11-drv-i810
发现问题依旧,继续google,发现下面帖子,起到关键性作用
http://n2.nabble.com/Problem-with-xo...td1597767.html
2. 在/X11/目录下建立xorg.conf(Fedora10默认没此文件),内容如下:
+----------------+
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
EndSection

Section "Monitor"
Identifier "LCD Panel"
VendorName "Maya"
ModelName "X30 1024x768"
Option "dpms"
EndSection

Section "Device"
Identifier "Intel i845"
Driver "intel"
VendorName "Intel"
Option "AccelMethod" "XAA"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Intel i845"
Monitor "LCD Panel"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
Virtual 1024 768
EndSubSection
EndSection
+----------------+
再进X,一切正常!Thanks God,Fedora10,想说爱你不容易!

2008年12月7日星期日

VIM

Tag 12/08/2008

o : creates a new, empty line below the cursor and puts Vim in Insert mode.

w : move the cursor forward one word.Like most Vim commands, you can use a numeric prefix to move past multiple words. For example, "3w" moves three words.
e : moves to the next end of a word.
b : moves backward to the start of the previous word.

^ : moves to the first non-blank character of the line.
$ : moves the cursor to the end of a line

+---------------------------+
H --> | text sample text |
| sample text |
| text sample text |
| sample text |
M --> | text sample text |
| sample text |
| text sample text |
| sample text |
L --> | text sample text |
+---------------------------+

ZZ : save and exit.

CTRL-G : get a message like this (assuming the 'ruler'option is off):
"usr_03.txt" line 233 of 650 --35%-- col 45-52

Tag 12/20/2008

~/.bashrc
alias vi='gvim'

~/.vimrc

Tricks:

Alt+F10 Maxisize window
Ctl+i Go into selected file
Ctl+o Go back