2009年1月6日星期二
64位Linux下QQ无法输入中文
以下三步都需要用管理员权限,或者用 sudo 来执行
第一步:
把 32位版(附件):
/usr/lib/gtk-2.0/2.10.0/immodules/ 的
-rw-r--r-- 1 root root 67648 2008-07-31 15:31 im-scim-bridge.so
-rw-r--r-- 1 root root 143588 2008-07-31 15:31 im-scim.so
复制到64位系统下的lib32:
/usr/lib32/gtk-2.0/2.10.0/immodules/
第二步:
cd /etc/gtk-2.0
mv gtk.immodules.32 gtk.immodules.32.bak
/usr/bin/gtk-query-immodules-2.0 > gtk.immodules.32
第三步:
把 gtk.immodules.32 文件里的 /usr/lib/ 替换成 /usr/lib32/
附:64位下安装办法
sudo dpkg -i --force-all linuxqq_1.0-Preview1_i386.deb
另外,我第一次使用的时候,登陆很正常。后来退出后,又登录,换了几个号,都失败。
最后,把~/.Tencent 目录干掉,就OK了。
2008年12月6日星期六
2008年9月26日星期五
2008年8月26日星期二
ADSL on Ubuntu
sudo pppoeconfto configure user name and password.
Type
pon dsl-provider to turn on the connectionType
poff to turn it off
2008年8月8日星期五
Install Grub from Ubuntu Live CD
(This how to is written for Ubuntu but should work on other systems. The only thing to take note of, when you see "sudo" that will mean to you that the following command should be entered at a root terminal.)
Boot into the live Ubuntu cd. This can be the live installer cd or the older live session Ubuntu cds.
When you get to the desktop open a terminal and enter. (I am going to give you the commands and then I will explain them later)
Code:
sudo grub
This will get you a "grub>" prompt (i.e. the grub shell). At grub>. enter these commands
Code:
find /boot/grub/stage1
This will return a location. If you have more than one, select the installation that you want to provide the grub files.
Next, THIS IS IMPORTANT, whatever was returned for the find command use it in the next line (you are still at grub>. when you enter the next 3 commands)
Code:
root (hd?,?)
Again use the value from the find command i.e. if find returned (hd0,1) then you would enter root (hd0,1)
Next enter the command to install grub to the mbr
Code:
setup (hd0)
Finally exit the grub shell
Code:
quit
That is it. Grub will be installed to the mbr.
When you reboot, you will have the grub menu at startup.
Now the explanation.
Sudo grub gets you the grub shell.
Find /boot/grub/stage1 has grub locate the file stage1. What this does is tell us where grub's files are. Only a small part of grub is located on the mbr, the rest of grub is in your boot folder. Grub needs those files to run the setup. So you find the files and then you tell grub where to locate the files it will need for setup.
So root (hd?,?) tells grub it's files are on that partition.
Finally setup (hd0) tells grub to setup on hd0. When you give grub the parameter hd0 with no following value for a partition, grub will use the mbr. hd0 is the grub label for the first drive's mbr.
Quit will exit you from the grub shell.
Original Post: http://ubuntuforums.org/showthread.php?t=224351
2008年7月16日星期三
2008年7月3日星期四
To work around JVM 64 bug causing Eclipse crash
-XX:CompileCommand=exclude,org/eclipse/core/internal/dtree/DataTreeNode,forwardDeltaWith
to eclipse.ini
The above option did not work.
Try delete it and add
-Xint
So far so good.
Other cue:
Try to use JDK 5 to run eclipse and use JDK 6 to develop
Disable automatic compiling
2008年6月28日星期六
SCIM bridge
/etc/X11/xinit/xinput.d/scim
设置
GTK_IM_MODULE=scim-bridge
QT_IM_MODULE=scim-bridge
2008年6月16日星期一
安装fcitx
5、添加中文支持。
sudo apt-get install language-pack-zh
6、fcitx安装:
sudo apt-get install im-switch fcitx
im-switch -s fcitx -z default # 注意,前面千万不要加sudo
完成设置最好重启一下X,以便进行下一步设置
7、修改部分:
sudo gedit /etc/gtk-2.0/gtk.immodules
找到下面这个部份
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh"
改为下面这样
"/usr/lib/gtk-2.0/2.10.0/immodules/im-xim.so"
"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"
注意:就是这里加上了en环境下的输入法支持。"ko:ja:th:zh" -> "en:ko:ja:th:zh" 设置完毕,注销一下电脑。(系统 -> 注销 -> 注销)这时候,输入法(按Ctrl+空格键激活输入法)就应该可以使用了。
8、修改字体:
gedit ~/.fcitx/config #ubuntu
(提示:该文件使用GBK编码,很多人打开它可能显示乱码,在kate下点菜单 工具 -> 编码 -> 简体中文GBK即可正常显示。)设置选项为中文,英文界面下输入栏与输入文字为方块的现像,只需修改config中的字体即可,例如:
[程序]
显示字体(中)=WenQuanYi Bitmap Song
显示字体(英)=WenQuanYi Bitmap Song
显示字体大小=12
主窗口字体大小=12
字体区域=zh_CN.UTF-8
是否使用AA字体=1
是否使用粗体=1
9、去除fcitx多余码表
sudo gedit /usr/share/fcitx/data/tables.conf
里面的内容大致是这样的
#以#打头的为注释
[码表]
名称=五笔字型
码表=wbx.mb
拼音=1
拼音键=z
.........
.........
#[码表]
#名称=二笔
#码表=eb.mb
.........
.........
#[码表]
#名称=仓颉
#码表=cj.mb
.........
.........
2008年6月2日星期一
Steps to get around Evolution "summary and folder mismatch" bug
- Disable all accounts in Evolution and exit
- cd ~/.evolution/mail/local
- rm Inbox.ibex.index Inbox.ibex.index.data
- Restart Evolution
- Press Sent/Receive several times
- Enable accounts
https://launchpad.net/ubuntu/+source/evolution/+bug/27014
2008年5月16日星期五
2007年12月27日星期四
Install Ubuntu 7.10 from hard disk
2. add
c:\grldr="Install Ubuntu"
to c:\boot.ini
3. Put the iso file to the root directory of a fat32 partition
4. restart the system.
2007年11月23日星期五
another try to install wireless driver
2007年10月30日星期二
Using Windows wireless driver under Linux
clive@omniscience:~$ sudo ndiswrapper -r bcmwl5
Specify the path of the driver in Windows and install it:
clive@omniscience:~$ sudo ndiswrapper -i /media/sda1/DELL/drivers/R151519/DRIVER/bcmwl5.inf
installing bcmwl5 ...
sudo ndiswrapper -l
sudo modprobe ndiswrapper
2007年10月20日星期六
Sound problem with D630 in Gutsy
| wget http://www.gtlib.gatech.edu/pub/suse/projects/alsa/snapshot/driver/alsa-driver-hg20070804.tar.bz2 |
3. change directory to the directory with the extracted files
4. configure with
| ./configure --with-cards-hda-intel |
| make |
| sudo make install |
2007年8月15日星期三
chmod
该命令有两种用法。一种是包含字母和操作符表达式的文字设定法;另一种是包含数字的数字设定法。
1. 文字设定法
chmod [who] [+ | - | =] [mode] 文件名?
命令中各选项的含义为:
操作对象who可是下述字母中的任一个或者它们的组合:
u 表示“用户(user)”,即文件或目录的所有者。
g 表示“同组(group)用户”,即与文件属主有相同组ID的所有用户。
o 表示“其他(others)用户”。
a 表示“所有(all)用户”。它是系统默认值。
操作符号可以是:
+ 添加某个权限。
- 取消某个权限。
= 赋予给定权限并取消其他所有权限(如果有的话)。
设置mode所表示的权限可用下述字母的任意组合:
r 可读。
w 可写。
x 可执行。
X 只有目标文件对某些用户是可执行的或该目标文件是目录时才追加x 属性。
s 在文件执行时把进程的属主或组ID置为该文件的文件属主。方式“u+s”设置文件的用户ID位,“g+s”设置组ID位。
t 保存程序的文本到交换设备上。
u 与文件属主拥有一样的权限。
g 与和文件属主同组的用户拥有一样的权限。
o 与其他用户拥有一样的权限。
文件名:以空格分开的要改变权限的文件列表,支持通配符。
在一个命令行中可给出多个权限方式,其间用逗号隔开。例如:chmod g+r,o+r example
使同组和其他用户对文件example 有读权限。
2. 数字设定法
我们必须首先了解用数字表示的属性的含义:0表示没有权限,1表示可执行权限,2表示可写权限,4表示可读权限,然后将其相加。所以数字属性的格式应为3个从0到7的八进制数,其顺序是(u)(g)(o)。
例如,如果想让某个文件的属主有“读/写”二种权限,需要把4(可读)+2(可写)=6(读/写)。
数字设定法的一般形式为:
chmod [mode] 文件名?
例子:
(1)文字设定法:
例1:$ chmod a+x sort
即设定文件sort的属性为:
文件属主(u) 增加执行权限
与文件属主同组用户(g) 增加执行权限
其他用户(o) 增加执行权限
例2:$ chmod ug+w,o-x text
即设定文件text的属性为:
文件属主(u) 增加写权限
与文件属主同组用户(g) 增加写权限
其他用户(o) 删除执行权限
例3:$ chmod u+s a.out
假设执行chmod后a.out的权限为(可以用ls – l a.out命令来看):
–rws--x--x 1 inin users 7192 Nov 4 14:22 a.out
并且这个执行文件要用到一个文本文件shiyan1.c,其文件存取权限为“–rw-------”,即该文件只有其属主具有读写权限。
当其他用户执行a.out这个程序时,他的身份因这个程序暂时变成inin(由于chmod命令中使用了s选项),所以他就能够读取shiyan1.c这个文件(虽然这个文件被设定为其他人不具备任何权限),这就是s的功能。
因此,在整个系统中特别是root本身,最好不要过多的设置这种类型的文件(除非必要)这样可以保障系统的安全,避免因为某些程序的bug而使系统遭到入侵。
例4:$ chmod a–x mm.txt
$ chmod –x mm.txt
$ chmod ugo–x mm.txt
以上这三个命令都是将文件mm.txt的执行权限删除,它设定的对象为所有使用者。
(2)数字设定法:
例1: $ chmod 644 mm.txt
$ ls –l
即设定文件mm.txt的属性为:
-rw-r--r-- 1 inin users 1155 Nov 5 11:22 mm.txt
文件属主(u)inin 拥有读、写权限
与文件属主同组人用户(g) 拥有读权限
其他人(o) 拥有读权限
例2: $ chmod 750 wch.txt
$ ls –l
-rwxr-x--- 1 inin users 44137 Nov 12 9:22 wchtxt
即设定wchtxt这个文件的属性为:
文件主本人(u)inin 可读/可写/可执行权
与文件主同组人(g) 可读/可执行权
其他人(o) 没有任何权限
2007年8月5日星期日
Subversion server setup
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91 PHPChina 开源社区门户F.vio.fg9o r
文件为svn-1.2.0-setup.exe,然后执行安装,安装目录如:d:\develop\subversion,然后设置一下系统的环境变量Path,将Subversion的bin路径加入到系统的path中。 PHPChina 开源社区门户b!W}C*R6Ie7R0t
2 创建Subersion库:首先建立一个目录存放Subversion的库,在该库中存放所以的Subversion项目,如D:\repository\subversion
L.SA;?/i:A#| Ic0 3 创建一个新的Subversion项目。
,B!@K]�uKi0 只需执行: svnadmin create D:\repository\subversion\projectname PHPChina 开源社区门户eOOB6t;H&U;{]
下面需要设置项目的用户信息,只需打开Subversion项目conf目录下passwd文件添加新的用户即可,如 PHPChina 开源社区门户I4T7o8FI ?}9N
[users]
~@&l@'c0]{0VE$a0 admin = mypassword
f7[~D4bx|n0 接下来是设置项目的一些其他信息,打开conf目录下的svnserve.conf文件,然后进行如下设置即可:
9CE+y7J5uF�N/A0BD2k0 [general] PHPChina 开源社区门户f5Io3OE%S
anon-access = read
0ItFV M!x0 auth-access = write PHPChina 开源社区门户x1B q-q&SH2r
password-db = passwd PHPChina 开源社区门户L[8S?0K$d*\Wb%?}B
realm = projectname PHPChina 开源社区门户6K#I6{)UD[Y+E
4 启动Subversion,这里可以通过命令行启动,最好使用SVN Service Wrapper,你可以通过以下地址下载: http://dark.clansoft.dk/~mbn/svnservice ,将SVNService.exe拷贝到Subversion安装主目录的bin目录下即可,然后执行以下命令,就可以将Subversion以windows服务方式启动啦。 PHPChina 开源社区门户;Xr+_#j�}Qtzd
SVNService -install -d -r D:\repository\subversion PHPChina 开源社区门户,sMB/?3`
5 向Subversion中导入项目:现在我们需要将项目导入到Subversion的库中,只需执行一下命令: svn import d:\projectname svn://localhost/projectname -m “initial import” –username admin –password mypassword PHPChina 开源社区门户S't7m}o n^
这样项目就导入到subversion库中啦。 PHPChina 开源社区门户SH6] jY8@XS[
6 将项目导出:从Subversion项目中导出项目也很简单,只需执行以下操作: PHPChina 开源社区门户Z*Vqs^-L s%A
svn co svn://localhost/projectname –username admin –password mypassword
-------------------------------------------------------------------------
Svn配置
4.1 建立版本库目录
[root@localhost root] #mkdir –p /svn
svn是我自己建立的目录,各人根据具体情况设计名字
4.2 建立一个用户,用与管理这个版本库目录
[root@localhost root] #useradd -m -s /bin/bash lyl
lyl是建立的用户名,可以根据习惯改
4.3 用建立的用户管理我们刚建的版本库目录
[root@localhost root] #chown –R lyl.lyl /svn
用lyl来管理我们的版本库目录/svn
4.4 启动服务器
用用户lyl来管理版本库目录/svn,则须转为lyl,命令如下:
[root@localhost root] #su lyl
启动svn服务
[root@localhost root] #svnserve -d -r /svn/;
-d表示以daemon方式(后台运行)运行
-r/svn/指定根目录是/svn/
检查服务器是否启动正常:
[svn_leader@localhost root]$ ps –ef|grep svnserve
如果显示如下,即为启动成功:
lyl 6941 1 0 15:07 ? 00:00:00 svnserve -d ——listen-port 9999 -r /svn
-----------------------------------------------------一旦你有了树形结构和数据你就可以继续了,使用svn import导入数据到版本库
$ svn import /home/kouyujie/project file:///home/kouyujie/repos -m "initial import"
Adding /home/kouyujie/project/branches
Adding /home/kouyujie/project/tags
Adding /home/kouyujie/project/trunk
Adding /home/kouyujie/project/trunk/foo.c
Mount Windows Partitions in SuSE
菜单-系统-YaST-系统-分区管理器,把Windows的某个分区选中,双击或点“编辑”,在装入点写上挂载目录,比如Windows的C 盘,挂载点可以写/windows/C(需要注意,Linux中的目录表示方式,是 / 而不是 \ ,跟windows不同)。千万不要选格式化!否则 后果……。设置好点应用就可以了。
如果你的系统没有使用UTF-8编码,而是cp936编码,在挂载的时候有一些需要注意的地方,否则挂载后Windows分区目录会是乱码。
1 如果Windows分区是NTFS格式,在以上编辑分区时选“Fstab选项”,任意选项值里原有的users,gid=users, umask=0002,nls=utf8修改为users,gid=users,umask=0002,nls=cp936
2 如果Windows分区是Fat32格式,在以上编辑分区时选“Fstab选项”,任意选项值里原有的users,gid=users,umask=  0002,utf8=true修改为users,gid=users,umask=0002,utf8=no,iocharset= cp936
2007年6月17日星期日
HOWTO Install fonts on Ubuntu
1a. using kfontview
The easiest way to install fonts is using kfontview. Try running "kfontview" from the command line.
If you do not have kfontview installed, as root run:
# apt-get install kcontrol This will download a few dependencies, so if you are short on disk space or simply do not want to install KDE, use the instructions in step 1b
Run "kfontview" from the command line
From the kfontview window, open the font you have downloaded.
Click on the "Install" button
NOTICE: You will probably need to resize the window to see the "Install" button which is in the lower right hand corner.
Click on the "Personal" button
1b. by hand
If ~/.fonts does not exist, create it:
$ mkdir ~/.fonts Copy the font, from the command line, run the following:
$ cp [fontfile] ~/.fonts From the command line, run the following:
$ fc-cache -f -v ~/.fonts or alternatively, log out, and log back in.
2. Installing for system wide use
Make the following directory as root:
# mkdir /usr/share/fonts/truetype/myfonts Copy the font(s) into the newly created directory:
# cp [fonts] /usr/share/fonts/truetype/myfonts Run the following:
# fc-cache -f -v 3. Installing Windows Fonts (eg. Times New Roman)
Make sure you have the "universe" repository added. If not, as root, modify your /etc/apt/sources.list and uncomment the deb line which will look something like this:
# deb http://us.archive.ubuntu.com/ubuntu dapper universe Then update apt-get:
# apt-get update Run the following as root:
# apt-get install msttcorefonts
