|
中文版 Location: Homepage >> Xianghui Xue : CV - Publications - Blog |
Personal Note |
FAQ for ubuntu | See the following...... | |
|
|
1 About Latex Contents Top | Q: texlive mssing lineno style package for latex Answer from google While working on a latex file that required the package lineno.sty, I realized that texlive distribution does not have it. I therefore, went for looking for the file and found it on CTAN. However, after installing it in the correct directory: /usr/share/texmf-texlive/tex/latex/ the compiler would not find it, even when all the permissions were correct. In order for latex know that a new package has been installed, the command "sudo texhash" needs to be invoked in order for files in /var/lib/texmf be refreshed and reflect that a new package has been installed. Latex search these files instead of going through the actual directories, which results in a faster performance. What I do I just put the file into /usr/share/texmf-texlive/tex/latex/lineno/ and run sudo texhash. It's OK | |
|
2 SSH and Telnet Contents Top | 1。Telnet bbs的时候出现乱码解决:luit -encoding gbk telnet bbs.ustc.edu.cn 2。SSH 连接远程主机长时间不操作无响应: 编辑~/.ssh/config 文件,加入 ServerAliveInterval 15 | |
|
3 gnome花屏的处理 Contents Top | 提示loaded theme的时候找不到相应的文件。 解决方法: 如果可以进入登录页面,那么登录后,运行sudo gdmsetup,重新选择一个theme。 如果出现花屏,进入recovery ubuntu,选择fix graph,然后登录,运行以上操作。 | |
|
4 Vi & Vim Contents Top | 1. 多行注释 在编写代码的时候经常要注释一大段代码,一行行的注释当然是最傻的方法了,在vim里面可以这样做, 移到要开始注释的那行,Ctrl+v进入可视化列选择模式,移到光标到最后需要注释的行(注意,如果你知道行号,可以使用行号G(大写的G)快速跳到该行),然后按I(大写),进入插入模式,输入注释符,比如fortran 90利用!,然后按ESC键回到命令模式。 反注释怎么办呢?更简单了,同样Ctrl+v进入列选择模式,移到光标把注释符选中,按下d。 2.多行复制 在要复制的位置shift+V,然后利用方向键选定要复制的区域后,按y,在要粘贴的位置按p。 | |
|
5 Cisco VPN Client Contents Top | 1. Installation: Run vpnclient/vpn_install(version: vpnclient-linux-x86_64-4.8.01.0640-k9) [root@]# ./vpn_install For the linux kernel higher than 2.6.29, the VPN client for the linux won't compile with it. So the first thing is downloading a patch file (from http://projects.tuxx-home.at/ciscovpn/patches/vpnclient-linux-2.6.24-final.diff) and saving it in the vpnclient dir. Then you can use " patch < vpnclient-linux-2.6.24-final.diff" to patch the files. Thus ./vpn_install can install the VPN client successively. And Then: [root@]# /etc/init.d/vpnclient_init start Edit /etc/opt/cisco-vpnclient/Profiles/sample.pcf to be (with your own username) [main] Description=sample user profile Host=192.43.244.230 AuthType=1 GroupName=hao EnableISPConnect=0 ISPConnectType=0 ISPConnect= ISPCommand= Username=xhxue SaveUserPassword=0 EnableBackup=0 BackupServer= EnableNat=1 CertStore=0 CertName= CertPath= CertSubjectName= CertSerialHash=00000000000000000000000000000000 DHGroup=2 ForceKeepAlives=0 Rename this file to, say ucar.pcf, then you can connect with vpnclient connect ucar First it asks for HAO password, then Cryptocard. ================================================================= Problem: 有时返回一般连接时候,可能无法解析域名,此时修改/etc/resolv.conf文件即可。 2. Crash in multi-core cpus PC So setup successively, but when try to connect VPN using wireless, it often crash the system. Using google, it is caused by the multi-core CPUs, here is the tips: http://forum.tuxx-home.at/viewtopic.php?f=15&t=457&start=15. The VPN client does not freeze the computer anymore if: (1) I disable the multi-core option from the BIOS. or (2) I use the maxcpus=1 on the fly at the bootloader (Personally, I prefer this option...). However, my question is: why the VPN client does not freeze my computer even with the BIOS multi-core option enabled or without the maxcpus=1 option? Only the wireless connection seems to be affected by this dual core issue... =============================================== HOW TO? To use (2), you must restart the laptop, and when grub loaded, press "e" and then choose " kernel /boot/vmlinuz-2.6.** root=/dev/hda2 ro quiet splash". Press "e" again and add maxcpus=1. Press "b" to boot the system. ----- Then when you enter the system, check with cat /proc/cpuinfo |grep physical | uniq -c You can see 1 physical id : 0 | |
|
6 crontab 实现系统自动执行命令 Contents Top | ~# crontab -e # m h dom mon dow command 具体意义表示:分钟 小时 日期 月份 星期 命令,在某月(mon)的某天(dom)或者星期几(dow)的几点(h,24小时制)几分(m)执行某个命令(command),*表示任意时间。例如: 3 * * * * /home/xhxue/hello.sh 就是:每小时的03时执行/home/meng/下的hello.sh脚本。 在保存之后,根据屏幕下面的提示输入Ctrl+X退出,此时会提示是否保存,输入Y;提示输入文件名,并且有一个临时的文件名,由于只是测试,直接回车保存。 注意:在完成编辑以后,要重新启动cron进程: ~# /etc/init.d/cron restart 观察运行结果,会发现hello.sh会每隔一小时,在03分时被执行一次。 | |
|
7 ubuntu是否有损硬盘? Contents Top | 利用命令 sudo smartctl -a /dev/sda |grep 193 可以查看硬盘的load_cycle_count信息,理论值位60万次左右。 这个是我机器显示的结果: 193 Load_Cycle_Count 0x0032 100 100 000 Old_age Always 582 15分钟后结果相同,也是582。前面看到有人说每5分钟这个数值就会增长5-10左右,而我的似乎没有这么严重,看来9以后的版本这个问题已经不重要了。 | |
|
8 编码问题造成的linux和windows文件乱码解决 Contents Top | 在linux下使用的是UTF8的编码,而windows使用的gbk,因此对于一些文本文档在linux和windows互相访问时,会出现乱码。解决的办法是: 如果windows的文件text.txt在linux下访问,可以通过: iconv -f gbk -t utf8 text.txt > text.txt.linux 来实现正常的编码。 反之,如果linux文档在windows下访问,可以 iconv -f utf8 -t gbk text.txt > text.txt.windows 获得windows下的编码文件。在进行访问。 | |
|
Locations | Statistics | FAQ |
Best view under the 1024x768 resolution and with the normal size of fonts. Designed & developed by Yuming Wang, run for 6432 days since December 15, 2006, and last upgraded on May 28th, 2009. Powered by Apache + PHP coded cOpfOs 3.11.1 last upgraded on February 22nd, 2010. Copyright © 2006, all rights reserved. |