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 http://kojipkgs.fedoraproject.org/
      packages/selinux-policy/3.10.0/55.fc16/noarch/
      selinux-policy-3.10.0-55.fc16.noarch.rpm --enablerepo=u*g
yum --nogpgcheck install http://kojipkgs.fedoraproject.org/packages/
      selinux-policy/3.10.0/55.fc16/noarch/
      selinux-policy-targeted-3.10.0-55.fc16.noarch.rpm --enablerepo=u*g

http://fedoraforum.org/forum/showthread.php?t=271999&page=2

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,
http://www.cyberciti.biz/faq/warning-remote-host-identification-has-changed-error-and-solution/

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

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”

DDD

 程序编译过了就要调试了,没想到以前对linux的一点点了解都忘光了,运行gdb后只想到了r,b,l这几个命令和help,其他都忘了。更可恶的是,装了ddd后,只会用next,查看变量值的命令也忘了,太郁闷了。

以前用过的一个Makefile

# 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)
clean:
        rm *~ *.o $(BIN) core train