Sunday, February 25, 2007

 

xmame's parameter

http://my.opera.com/kliz/blog/xmame

### File I/O-related ###
rompath /media/hdb8/Emulation/mame100/roms #rom的位置
samplepath /media/hdb8/Emulation/mame100/samples #sample声音采样的位置
inipath $HOME/.xmame/ini
cfg_directory $HOME/.xmame/cfg
nvram_directory $HOME/.xmame/nvram
memcard_directory $HOME/.xmame/memcard
input_directory $HOME/.xmame/inp
hiscore_directory $HOME/.xmame/hi
state_directory $HOME/.xmame/sta
artwork_directory /media/hdb8/Emulation/mame100/artwork
snapshot_directory /media/hdb8/Emulation/mame100/snap
diff_directory $HOME/.xmame/diff
ctrlr_directory /media/hdb8/Emulation/mame100/ctrlr
cheat_file /home/kliz/.xmame/cheat.dat
hiscore_file /media/hdb8/Emulation/mame100/hiscore.dat
# record (not set)
# playback (not set)
log 0
### MAME Related ###
defaultgame dino #默认游戏,如果不指定游戏名称会使用这个
language english
fuzzycmp 1 #模糊游戏名称匹配,会自动载入名字最相近的游戏
cheat 1 #开启作弊
skip_gameinfo 1 #跳过游戏信息
bios default #
# state (not set)
autosave 0 #自动存档

Saturday, February 24, 2007

 

how to ignore case in vim

to make case insensitive matching in vim , just type :set ignorecase in vim command mode or set vimrc in home.
the vim also have the very useful function, syntax on, which can highlight the syntax by default
the compatible in vimrc is not recommended to check, for we only get the totally vi editing style after we confirm it. e.g. we will got A if we press up in editing mode; the u button only works at the first hit. That's not good at all.

Tuesday, February 20, 2007

 

cursor didn't show

after my shutting down my X, I restart X and found the curse doesn't shown anymore. and I found this to handle it:
in the file /etc/X11/xorg.conf
join in Section "Device"
Option "HWCursor" "false"

Thursday, February 15, 2007

 

bash script practice

while (( i<100 a="1" b="2" style="display: block; padding-left: 6em; text-indent: -1em;">for f in *
do i=`echo $f|iconv -f gbk -t utf-8 -c`
`mv $f $i`
done

grep mailto dispuser\(5* | sed '1,$s/.*mailto:\(.*\)\".*/\1/g'

Tuesday, February 13, 2007

 

gdesklets

http://www.gnome-look.org/content/show.php?content=13548
http://blog.guoshuang.com/showlog.asp?cat_id=40&log_id=3821
http://blog.vetcafe.net/2005/04/

Monday, February 12, 2007

 

make icewm look better

kk@kk-desktop:~$ grep ^[^#] .icewm/preferences
UseMouseWheel=1 # 0/1
TaskBarShowWorkspaces=0 # 0/1
WorkspaceNames=" 1 ", " 2 ", " 3 ", " 4 "
DesktopBackgroundImage="/home/kk/Firefox_wallpaper.png"

kk@kk-desktop:~$ grep ^[^#] .icewm/startup
/usr/bin/rox -p=wd &

kk@kk-desktop:~$ ll .icewm/startup
-rwxr-xr-x 1 kk kk 34 2007-02-12 21:14 .icewm/startup

plug Section "Monitor" to enable the dpms(...? I supposed the default option is on, it doesn't need emphasize)
Option "DPMS"


then change the standby time in the Section "ServerLayout" . I've no idea about the suspend and offtime, but the standby time works.

Option "StandbyTime" "20" # Turn off screen in 20 minutes
Option "SuspendTime" "30" # Full hibernation in 30 minutes
Option "OffTime" "40" # Turn off DPMS monitor

I've to admit that I made a big mistake. Last time I read the manual in icewm it mention about the gnome-look setting icewm-gnome-config is recommended to install. But I tried and failed.
This time I use startx instead of gdm to start icewm, the gnome-config works!

 

~/.gtkrc-2.0 for icewm

other not-gnome windows-manager may has font problem while using gtk user interface. saying ICEWM.
to avoid this problem we should config some issue, :
1. build a file ~/.gtkrc-2.0:
style "user-font"
{
# font_name="Tahoma,SimSun 9"
font_name="Bitstream Vera Sans, WenQuanYi Bitmap Song 12"
}
widget_class "*" style "user-font"

gtk-font-name = "Bitstream Vera Sans, WenQuanYi Bitmap Song 12"
# gtk-theme-name = "Clearlooks-DeepSky"
# gtk-icon-theme-name = "Sude"


make sure the follow parameter works, and we can write this in ./Xsession
export GTK2_RC_FILES="~/.gtkrc-2.0:$GTK2_RC_FILES"

and also, if we found that file doesn't work, we have to plug some sentence in it:

# create temp file for X resources
XRESOURCES=`mktemp /tmp/xrdb.XXXXXX`

# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
#test -r $HOME/.Xdefaults && cat $HOME/.Xdefaults >> $XRESOURCES

cat >> $XRESOURCES <<>> $XRESOURCES

# load all X resources
xrdb -nocpp -merge $XRESOURCES
rm -f $XRESOURCES


#注:这段代码是从 xfce 的启动脚本里提取出来的。(/etc/xdg/xfce4/xinitrc)


and if you are a left-hand and want the left and right key to be reserved, try this:
xmodmap -e "pointer = 3 2 1" # 设置为惯用左手鼠标


Sunday, February 11, 2007

 

how to play xmame with joystick

put this parameter in to the xmame config file
jt 1
jdev /dev/input/js0
usbpspad 1

echo -n "jt 1
jdev /dev/input/js0
usbpspad 1" >> ~/.xmame/xmamerc

 

what the hell is cp -a?

cp -a, the parameter -a include 3 parameter below
-R, -r, --recursive
copy directories recursively
-P, --no-dereference
never follow symbolic links
--preserve[=ATTR_LIST]
preserve the specified attributes (default: mode,owner‐
ship,timestamps) and security contexts, if possible additional
attributes: links, all

 

light GUI icewm+rox-filer

http://www.gnome-cn.org/documents/howto/set-default-gtk-font-theme/?searchterm=gtk%20%E5%AD%97%E4%BD%93%20%E5%B0%8F

IceWm is a Window Manager for X Window System. It is fast and
memory-efficient, and it provides many different looks including Windows'95,
OS/2 Warp 3,4, Motif. It tries to take the best features of the above
systems. Additional features include multiple workspaces, opaque move/resize,
task bar, window list, mailbox status, digital clock.
ROX-Filer is a simple and easy to use graphical file manager
for X11 based on the GTK2 library. It uses a uniform
drag-and-drop approach for every operation.
dpkg -L icewm and you should read the config file in /etc/X11/icewm location. Take these out of the folder and put it in home's corresponded position..
About the file manager's file double clicking function, we can refer it from right click-set key function. .

Monday, February 05, 2007

 

backup your apt deb packages for local source

http://forum.ubuntu.org.cn/viewtopic.php?t=32554

sudo apt-get install dpkg-dev
sudo dpkg-scanpackages packs /dev/null |gzip > packs/Packages.gz
main “.....DIR”/packs/dists/edgy/main/binary-i386/
restricted “.....DIR”/packs/dists/edgy/restricted/binary-i386/
universe “.....DIR”/packs/dists/edgy/universe/binary-i386/
multiverse “.....DIR”/packs/dists/edgy/multiverse/binary-i386/
we have make sure the packages index "Packages.gz" in the right position,
put the packages.gz under the binary-i386 document and change the /etc/apt/source.list setting.


Saturday, February 03, 2007

 

conflict between scim and wine

scim 1.4.4-4ubuntu6
wine 0.9.29-0ubuntu1~edgy1

http://forum.ubuntu.org.cn/viewtopic.php?t=36322&highlight=scim+easy+wine

Friday, February 02, 2007

 

a shell script for rename

i=1; for f in *; do mv $f ${i}.zip; (( i++ )); done

perl -le' $i = 1;foreach (@ARGV) { rename $_, $i++ }' *

Advanced Bash-Scripting Guide
http://www.linuxsir.org/main/doc/abs/abs3.7cnhtm/

and for change the character code from gb2312 to utf-8:

for f in *
do i=`echo $f|iconv -f gbk -t utf-8 -c`
`mv $f $i`
done


Thursday, February 01, 2007

 

Improve your chinese viewing

Almost all the guideline for chinese support must have this.
sudo fontconfig-voodoo -f -s zh_CN

This step is not trivial to correctly display your characters of other language such as chinese, korean, japanese. In order to configure correctly, you must have the locale support. Like for example above, you must have zh_CN locale installed.
List all fontconfig that you can configure.

sudo fontconfig-voodoo -l

Check you current fontconfig,

sudo fontconfig-voodoo -c
It's equal to following:

sudo ln -sf /usr/share/language-selector/fontconfig/zh_CN /etc/fonts/language-selector.conf


check the /etc/font/fonts.conf, the below sentance explain the job of the /etc/fonts/language-selector.conf

language-selector.conf


This page is powered by Blogger. Isn't yours?