Tag Archives: linux

32bit Cisco VPN client on 64 bit linux systems

I’ve just encountered a strange problem with Cisco VPN Client: # ll /opt/cisco-vpnclient/bin/ total 4224 —x–x–x 1 root bin 1241184 Feb 23 12:35 cisco_cert_mgr* —s–x–x 1 root bin 2181976 Feb 23 12:35 cvpnd* —x–x–x 1 root bin 226700 Feb 23 12:35 ipseclog* —x–x–x 1 root bin 666260 Feb 23 12:35 vpnclient* # /opt/cisco-vpnclient/bin/vpnclient zsh: no [...]

Replace a string in all files recursively within a directory

Power of NIX: find /some/dir -type f | xargs sed -i ‘s|string1|string2|’ Even stronger, replace a string in all files that match a regex: grep -rlE “^regexhere$” /some/dir | xargs sed -i ‘s|string1|string2|’ Note that grep uses POSIX regex, not perl-like regex. But i think POSIX regex is sufficient for most cases. Or you can [...]

Php-fpm error after reinstall PHP

Error: lamnk@lamnk:~% sudo php-fpm start Starting php_fpm Error in argument 1, char 1: no argument for option – Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f ] php-cgi [args...] -a Run interactively -C Do not chdir to the script’s directory -c | Look for php.ini file in this directory -n No php.ini file will be [...]

Almost there …

Yesterday I wanted to clean around my home directory: rm dmesg.txt feh_02 * boot.txt test.txt test.txt~ xxxtest.txt And this is the result: zsh: sure you want to delete all the files in /home/lamnk [yn]? n zsh: sure you want to delete all the files in /home/lamnk [yn]? y rm: cannot remove `feh_02′: No such file [...]

How to install Cisco VPN client on Ubuntu Jaunty Jackalope and Karmic Koala 64 bit

Update 2011-05-09: There is a new patch that works (I still recommend the vpnc client instead of Cisco client). I’ve mirrored the patch to my server: fixes-2.6.38.patch. Please note that you should apply the patch against a vanilla vpnclient setup directory (no other patch applied). cd vpnclient/setup/directory/ wget http://www.lamnk.com/download/fixes-2.6.38.patch patch < ./fixes-2.6.38.patch sudo ./vpn_install Again, [...]

Compile rtorrent on CentOS 64bit

Update 10.03.2011, 2 years later on a new Macbook: brew install rtorrent on Mac OS X (Snow Leopard 10.6.6) also falls for this error. The habit of writing work logs saves me a lot of time again I always fall for this error when compile rtorrent, so … : Error: checking for STUFF… configure: error: [...]

XML-Mapping gem has permission problem

You may have this error when require ‘xml/mapping’ in your ruby script: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require’: no such file to load — xml/mapping (LoadError) Solution: go to the gem directory of XML-Mapping (mine is /usr/lib/ruby/gems/1.8/gems/xml-mapping-0.8.1/lib/) and chmod all files in this directory to 644. Who is to point finger at here ? Rubygem or XML-Mapping authors ?

Screen: cannot find terminfo entry about rxvt-unicode

This error eccors if you use screen et cetera and don’t have a terminfo file for urxvt in /usr/share/terminfo/r/, especially if you are ssh’ing into another box. You just need to create a terminfo file named rxvt-unicode in this directory. More info about terminfo and how to compile it from a source file Update (09. [...]

Cisco VPN Client freezes system with dual core CPU

It’s annoying as hell ! Not only we need to patch to use Cisco client on 64 bit systems, recently i find out Cisco don’t support SMP (multi core) in its VPN client. It means after you load the cisco module, there’s a big chance you will run into a kernel panic: oops, the whole [...]

2.6.26+ Kernel, fglrx, compiz fusion and the annoying small pauses when using those 3

Man, these freezes really bug me off … After setting up my laptop i realized every time i turn compiz on, the system would hang for 1-2 second then continue working. The time interval between two freezes is random. This problem happened with both closed source or open source drivers (for an ATI Mobility x2300 [...]