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.

Advertisement

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

刚刚配好了Fedora6

今天有点时间,装了一直期待中的Fedora6。这样写AI的hw,做research会方便很多。花了不少时间来配置fedora,整了一会中文输入,又装了Matlab2007,还又配了vncserver。但最为得意的是今天是用grub启动时的菜单来硬盘安装fedora的,感觉很爽。

装的时候,先把第一张cd里的isolinux解压出来,然后装个grub(这个grub不是我专门装的,在装dos硬盘版时产生的,就是因为dos引导不了,才到grub菜单下的),在grub菜单里依次输入

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

然后就开始装了,爽。

Setup Vncserver on Fedora6

1. configure firewall, add tcp ports 5900:5905

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

VNCSERVERS=
VNCSERVERARGS[2]=

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

unset SESSION_MANAGER
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".

http://fedorasolved.org/network-solutions/vncserver-setup/

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

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

Solution: install xorg-x11-deprecated-libs rpm for fedora core from for instance rpmfind.net. This installs libXp.so.6 in /usr/X11R6/lib/libXp.so.6. In order for matlab to be able to find this library, add in directory /etc/ld.so.conf.d 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/libmwlapack.so: 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

http://www.nin.knaw.nl/~heimel/computers/HowToInstallMatlabR2006b.html