mlterm && vim && black && bold

这里有很多 vim 的颜色设置(scheme),我在其中找了一个顺眼的,想在其基础上作一点小修改。 因为我已经习惯了在终端中使用 vim,所以有些没设置 ctermfg/ctermbg 而只设置了 guifg/guibg 的 scheme 我就忽略了。 终端我现在用的是 mlterm,感觉很好。只是在 UTF-8 格式下启用 fcitx 有点问题:公司的机器好好的,家里的机器就不行。 要想...

2007-03-05 · wuan

sh脚本中if条件

文件 含义 -r True if file exists and is readable -w True if file exists and is writable -x True if file exists and is executable -f True if file exists and is a regular file -d True if file exists and is a directory -c True if file exists and is a character special file -b True if file exists and is a block special file -p True if file exists and is a named pipe (FIFO) -u True if file exists and is a SETUID file -g True if file exists and is a SETGID file -k True if file exists and the sticky bit is set -s True if file exists and has a size greater than zero 逻辑 含义 ! Not -a And -o Or (has lower precedence that -a) ( )...

2007-03-03 · wuan

undefined symbol cairo_xlib_surface_create

一份 Gtk 代码,分别编译成 X 和 DirectFB 两份程序 1$ gcc -o gtk_hello hello.c `pkg-config gtk+-2.0 --cflags --libs` 2$ export LD_LIBRARY_PATH=/usr/gtkdfb/lib; \ export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig; \ gcc -o dfb_hello hello.c `pkg-config gtk+-directfb-2.0 --cflags --libs` 运行 gtk_hello 程序时出错: ./gtk_hello: symbol lookup error: /usr/lib/libgdk-x11-2.0.so.0: undefined symbol: cairo_xlib_surface_create 我做了以下操作: 1$ vi /etc/ld.so.conf -- 8< ------ #注释 #/usr/gtkdfb/lib -- 8< ------ 2$ sudo ldconfig 3$ export LD_LIBRARY_PATH=""; \ export PKG_CONFIG_PATH="" 4$ gcc -o gtk_hello hello.c `pkg-config gtk+-2.0 --cflags --libs` 5$ ./gtk_hello 一切正常 之前出错的原因我估计是,在编译 hello.c 时,系统从 /usr/gtkdfb/lib 中加载了 libcairo 库造成的。 因为在 /usr/gtkdfb/lib...

2007-02-14 · wuan

95fcitx

% more /etc/X11/Xsession.d/95fcitx -- 8< ------ export LC_CTYPE=zh_CN.UTF-8 export XMODIFIERS=@im=fcitx export XIM=fcitx export XIM_PROGRAM=fcitx export GTK_IM_MODULE=fcitx # 下面这行要注释掉,要不在QT程序中无法激活fcitx! #export QT_IM_MODULE=fcitx fcitx -- 8< ------

2007-02-13 · wuan

GTK_on_DirectFB

参照这里的指导:http://directfb.org/wiki/index.php/Projects:GTK_on_DirectFB apt 源中没有 libdirectfb-0.9-25 apt-get install libglib2.0-0 libglib2.0-dev libatk1.0-0 libatk1.0-dev libpango1.0-0 libpango1.0-dev libdirectfb-dev 后来我下载并编译 DirectFB-1.0.0-rc4,在编译时我的经验是把 prefix 指定为/usr 目录,否则会引起当前编译版...

2007-02-13 · wuan