Category Archives: Linux

Kile can not edit tex file

Sometimes when I use Kile to open tex files, kile just simply cannot edit them. I can move the cursor freely but cannot type in anything. In this case, you just need to uncheck Tools -> Read Only Mode.

If the read-only problem is caused by ‘The file xxx.tex was opened and contained too long lines (more than 1 024 characters). Too long lines were wrapped and the document is set to read-only mode, as saving will modify its content.’, you may walk around this by setting the line lenght to 0, under Settings -> Configure Kile -> Open/Save -> Line Lenght Limit.

The wield case I met is that my kile didn’t have menu bar, although kate has that. I searched online and found out that you can re-enable the menu bar by editing the kilerc under ~/.kde/share/config/. Changing ‘menubar=Disabled’ to ‘Enabled’ would make the menu bar re-appear.


install Fedora 16 from Ubuntu, network installation

I just switched to Fedora from Ubuntu. This time the installation is fairly easy. First, I copied vmlinuz and initrd.img from the isolinux folder of the Fedora installation CD to /boot, and then I rebooted the system to enter the grub command line. And typed:

grub> linux /vmlinuz
grub> initrd /initrd.img
grub> boot

then the Fedora installation begun. Later on you just need to choose network interface for installation. The whole installation lasted less than one hour in my case. One similar topic from my previous posts can be found at link .


You might meet the login problems, “Oh! No! Something has gone wrong. A problem has occured and the system can’t recover. Please contact a system adminstrator”, which could be solved by:

yum remove selinux-policy selinux-policy-targeted
yum update libsepol
yum --nogpgcheck install libsepol
      selinux-policy-3.10.0-55.fc16.noarch.rpm --enablerepo=u*g
yum --nogpgcheck install
      selinux-policy-targeted-3.10.0-55.fc16.noarch.rpm --enablerepo=u*g

Warning: Remote Host Identification Has Changed

I met this problem today morning after I started the sshd service. I think it is because I just updated my Fedora recently, and the ssh known_hosts file in your home directory should be updated too. There are 3 solutions to solve this,

The simple solutions to this problem are:
$ cd
$ rm .ssh/known_hosts
$ ssh
or just:
ssh-keygen -R

Fedora 14

Fedora 14 was released before I remembered that I should update my Fedora 12 to 13. So I was lucky to install Fedora 14 directly instead of 13. I tried the live CD and the installation was fast and pleasant, less than 5 mins. Later on, I found out it was very painful to use live CD as the installation media. Lots lots of packages are not there. So I spend hours in the afternoon to install the packages I need. Today when I planned to do some programming, and found out that GCC is not installed?? What the hell? Linux without GCC? Fortunately, you can use yum to install all these packages very easy, like:

yum groupinstall “Development Tools” “Development Libraries”

yum groupinstall “GNOME Software Development” “X Software Development” “Java Development” “Legacy Software Development” “KDE Software Development” “Fedora Packager” “XFCE Software Development” “Web Development”




# Training Projects
CC = icc  -xW -O3   #-march=i686 -mcpu=i686
#CPP = icc -ipo -xW -O3
CPP = g++ -w -O3 -march=pentium4
#CPP = icpc -O0 -xW
#CPP= icpc -xW -O3 -no-ipo
INC = -I/usr/include -I/usr/local/include -I/opt/intel/opencv/include/opencv  -I/opt/intel/ipp41/ia32_itanium/include
LIB = -I/usr/lib -I/usr/local/lib -L/opt/intel/opencv/lib  -L/opt/intel/ipp41/ia32_itanium/sharedlib
OPT = -lcxcore -lcvaux -lcv -lhighgui -lippcore -lipps -lippm -lippi -lstdc++ -lpthread
OBJ = extractfeatures.o learn.o main.o
BIN = train   # executables to create
all: $(BIN)      
$(BIN): $(OBJ)
        $(CPP) -o $(BIN) $(OBJ)  $(LIB) $(OPT)
main.o: main.cpp stdafx.h learn.h Makefile
        $(CPP) -c main.cpp -o main.o  $(INC)
learn.o: learn.cpp stdafx.h learn.h extractfeatures.h Makefile
        $(CPP) -c learn.cpp -o learn.o $(INC)
extractfeatures.o: extractfeatures.cpp stdafx.h learn.h wtfwd53.h extractfeatures.h Makefile
        $(CPP) -c extractfeatures.cpp -o extractfeatures.o  $(INC)
        rm *~ *.o $(BIN) core train




>kernel (sd0, 4)/boot/vmlinuz
>initrd (sd0,4)/boot/initrd.img


Setup Vncserver on Fedora6

1. configure firewall, add tcp ports 5900:5905

2. vi /etc/sysconfig/vncservers, uncomment the following 2 lines


3. under the user mode (not root), run "vncserver", this will generate ".nvc" in the home directory. Revise the file "xstartup", and uncomment the following 2 lines

exec /etc/X11/xinit/xinitrc

4. kill the vncserver by "vncserver -kill :1" and restart it. It would be OK now. Maybe you need to kill the vnc service during the configuration by "killall Xvnc".

How to Install Matlab R2006b on linux (Fedora Core 6)

First problem: matlab install requires library for xsetup and text-mode install does not work.

Solution: install xorg-x11-deprecated-libs rpm for fedora core from for instance This installs in /usr/X11R6/lib/ In order for matlab to be able to find this library, add in directory /etc/ a file xorg-x11-deprecated-libs.conf with a single line containing /usr/X11R6/lib. Then run /sbin/ldconfig. After this the installation procedure itself did not report any more problems.

Second problem: When trying to run matlab, it does not want to start. Error message:
/usr/local/Matlab_R2006b/bin/glnx86/MATLAB: error while loading shared libraries: /usr/local/Matlab_R2006b/bin/glnx86/ cannot restore segment prot after reloc: Permission denied
Solution: I found the solution on comp.soft-sys.matlab:
chcon -t texrel_shlib_t /usr/local/matlab2006b/bin/glnx86/*.so

Alternative solution is disabling SELinux