Posts

Showing posts from September, 2010

[Level 2] How to display GUI to remote host.

If you want to display GUI from remote host to local host. You can enable it as following steps: 1. enable gdm tcp listener. local# vi /etc/gdm/gdm.schemas ... <schema> <key> security/DisallowTCP < key > <signature > b <signature > <default> false <default> <schema> ...   PS. default is true. 2. restart local gdm. local# pkill -HUP X 3. enable remote session. local# xhost + 4. setting remote display remote# export DISPLAY=local_ip:0.0 or login remote server with ssh -X local# ssh -X remote-host 5. try with xclock remote# xclock Wish this helps. regards, Stanley Huang

Setting vim with press "tab" key as 4 spaces in VIM.

How to let vim to type "tab" as 4 spaces? Add following setting in ~/.vimrc set smartindent                                                                                            set tabstop=4                                                                       set shiftwidth=4                                                                                   ...

[Level 2] Use ffmpeg to record desktop in Ubuntu.

You can use ffmpeg to record your desktop. 1. install ffmpeg first. # atp-get install ffmpeg 2. use command to record. # ffmpeg -f x11grab -s wxga -r 25 -i :0.0 -sameq /tmp/out.mpg 3. play it # vlc /tmp/out.mpg with this helps. regards, Stanley Huang

[Level 1] How to flush memory cache in Ubuntu?

How to use command to flush memory cache? #echo 1 > /proc/sys/vm/drop_caches  ## flush by command #echo 0 > /proc/sys/vm/drop_caches  ## restore to system default value Wish this helps. regards, Stanley Huang

[Installation] Chrome auto reload extension.

If you need to refresh your chrome periodically, you can install chrome reload extension. https://chrome.google.com/extensions/detail/njoipeaphfnaplplihpbgndfojhdhmjo Wish this helps. regards, Stanley Huang

[Level 1] How to get the package file list which is installed by apt-get

If you want to get the file list of package which is installed by apt-get. You can use "dpkg" command, Ex. # dpkg -L memcached /. /etc /etc/default /etc/default/memcached /etc/init.d /etc/init.d/memcached /usr /usr/share /usr/share/doc /usr/share/doc/memcached /usr/share/doc/memcached/changelog.gz /usr/share/doc/memcached/NEWS.gz /usr/share/doc/memcached/README /usr/share/doc/memcached/protocol.txt.gz /usr/share/doc/memcached/README.Debian /usr/share/doc/memcached/copyright /usr/share/doc/memcached/changelog.Debian.gz /usr/share/doc/memcached/memory_management.txt.gz /usr/share/memcached /usr/share/memcached/scripts /usr/share/memcached/scripts/start-memcached /usr/share/memcached/scripts/memcached-tool /usr/share/memcached/memcached.conf.default /usr/share/man /usr/share/man/man1 /usr/share/man/man1/memcached.1.gz /usr/bin /usr/bin/memcached /usr/include /usr/include/memcached /usr/include/memcached/protocol_binary.h # Wish this helps. reg...

[Level 2] Repication in Cassandra 0.7 Beta

In Cassandra 0.7, it supports online change schema. So, when you want to create a keyspace, the steps are as following: 1. Connect to Cassandra  # ./bin/cassandra-cli  2. Create keyspace # create keyspace keyspace_name with replication_factor = n PS. In here, 'n' is integer, and the number of cassandra node must great or equal than 'n'. You can set replication factor Wish this helps. regards, Stanley Huang

[Level 2] Use apt-get to Install VritaulBox from official repository

If you want to use apt-get command to install VirtaulBox from official resposity. The steps are as following: 1. Use browser to connect official website: http://www.virtualbox.org/ 2. Click the left side menu bar with item "download" 3. Select "VirtualBox 3.2.8 for Linux hosts" 4. Then you can see a section call "Debian-based Linux distributions" 5. add respository to your system. (modify /etc/apt/sources.list) Ex. lucid version # echo "deb http://download.virtualbox.org/virtualbox/debian lucid non-free" >> /etc/apt/source.list 6. get keys by wget # wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add - 7. update your apt # sudo apt-get update 8. install by apt-get # sudo apt-get install virtualbox-3.2 Wish this helps. regards, Stanley Huang

[Level 1] Install openvpn in Ubuntu

How to setup openvpn client in Ubuntu? The steps as following: 1. Install openvpn package: # apt-get install openvpn 2. Setup client configuration: # vi ./my.ovpn 3. Run openvpn with root permission: # sudo openvpn --config ./my.ovpn Wish this helps. regards, Stanley Huang

[Level 1] ntpclient in Ubuntu

If you want to sync system time. You can use command ntpdate. # sudo ntpdate ntp.ubuntu.com Wish this helps. regards, Stanley Huang

[Info] Riptano Cassandra Summit 2010 Vedios

Good for you to reference. http://www.riptano.com/summit-2010 Wish this helps. regards, Stanley Huang

[Level 1] Widget on Ubuntu

If you like the widget of Mac, and you want your Ubuntu has widgets too. You can try the following widgets. 1. screenlet: # sudo apt-get install screenlets screenlets-doc # screenlets 2. gdesklets: # sudo apt-get install gdesklets gdesklets-data # gdesklets 3. google gadgets: # sudo apt-get install google-gadgets-gtk # ggl-gtk Wish this helps. regards, Stanley Huang