Thứ năm, ngày 12 tháng mười một năm 2009
Xnest
[dix] Could not init font path element /usr/share/fonts/X11/cyrillic, removing from list!
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
(EE) config/hal: NewInputDeviceRequest failed (2)
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":0.0"
after 152 requests (152 known processed) with 0 events remaining.
$ cat /etc/X11/xorg.conf
# xorg.conf (X.Org X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# Note that some configuration settings that could be done previously
# in this file, now are automatically configured by the server and settings
# here are ignored.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
# sudo dpkg-reconfigure -phigh xserver-xorg
Section "Device"
Identifier "Configured Video Device"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
EndSection
Thứ tư, ngày 11 tháng mười một năm 2009
Meld Diff and merge tool

Source
http://meld.sourceforge.net
Thứ tư, ngày 04 tháng mười một năm 2009
CuteCom - Serial terminal
Currently it runs on Linux, FreeBSD and Mac OS X.
It is aimed mainly at hardware developers or other people who need a terminal to talk to their devices. It is free software and distributed under the GNU General Public License Version 2, which can find in the file COPYING. It is written using the Qt library by Trolltech. Follow this link to visit the sourceforge project page.
CuteCom doesn't use the autotools (autoconf, automake, libtool, etc.) Instead "configure" is simply a wrapper script which calls qmake. To uninstall CuteCom simply delete the file "cutecom" and the file "cutecom.desktop" and you're done. The config file is ~/.config/CuteCom/CuteCom.conf (was ~/.qt/cutecomrc in the Qt3-based versions).
Features:
- easy to use GUI
- no cryptic keyboard shortcuts
- lineoriented interface instead of character-oriented
- Ctrl+C, Ctrl+Q and Ctrl+S control sequences work
- input history
- a cute GUI ;-)
- xmodem, ymodem, zmodem support (requires the sz tools)
- easy to differentiate between typed text and echoed text
- select between read/write, read-only and write-only open mode
- open the device without changing its settings
- hexadecimal input and output
- configurable line end characters (LF, CR, LFCR)
- configurable delay between characters
http://cutecom.sourceforge.net/

Ubuntu
sudo apt-get install cutecom lrzsz
The lrzsz package contains tools for zmodem/xmodem/ymodem file transfer.
Alternatively you can get Cutecom (and Lrzsz) via Synaptic.
Now you may or may not have a Cutecom menu item under Applications-Accessories depending on whether Xubuntu or Ubuntu is running. To create a new menu item right-click on Applications in the task bar and select 'Edit Menus'. Click on 'System Tools' in the new window that opens and then 'New Item'. Enter the following information
- Type - Application
- Name - Cutecom
- Command - cutecom
- Comment - Serial port terminal
https://help.ubuntu.com/community/Cutecom
Chưa thử dùng nó trên các Linux distro khác ngoài Ubuntu, tôi nhận thấy nó làm việc tốt với các thiết bị chuyên dụng của Cisco, Telco, Alcatel-Lucent
Thứ ba, ngày 03 tháng mười một năm 2009
Install and configure djbdns
Os : Linux
Distro : Slackware
URL : -
i. Install Daemontools
# mkdir -p /var/package
# chmod 1755 /var/package
# cd /var/package
# wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
# gunzip daemontools-0.76.tar
# tar -xpf daemontools-0.76.tar
# rm daemontools-0.76.tar
# cd admin
# wget http://moni.csi.hu/pub/glibc-2.3.1/daemontools-0.76.errno.patch
# cd daemontools-0.76
# patch -p1 < ../daemontools-0.76.errno.patch # package/install
ii. Install ucspi-tcp
# cd /tmp
# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
# gunzip ucspi-tcp-0.88.tar
# tar -xf ucspi-tcp-0.88.tar
# http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/ucspi-tcp-0.88.errno.patch
# cd ucspi-tcp-0.88
# patch -p1 < ../ucspi-tcp-0.88.errno.patch
# make
# make setup check
iii. Editing daemontools
# mkdir /var/services
# cd /command
# vi svscanboot
-- Notes :
Add /var infront of all the /service directory /command/svc -dx /var/services/* /var/services/*/log env - PATH=$PATH svscan /var/services 2>&1 | \
# vi /etc/inittab
-- Notes : Comment out SVSCAN part
# init q
# vi /etc/inittab
-- Notes : Uncomment out SVSCAN part
# ps -aux
-- Check and see SVS is running on /var/services
iv. Edit /etc/resolv.conf
-- Add in --
domain xwings.net
nameserver 10.0.0.1
----
v. Preparing for djbdns
# mkdir /var/dns
# groupadd dns
# useradd dnscache -g dns -d /var/dns -s /bin/false
# useradd dnslog -g dns -d /var/dns -s /bin/false
# useradd dns -g dns -d /var/dns -s /bin/false
vi. Install djbdns
# cd /tmp
# wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
# tar xvzf djbdns-1.05.tar.gz
# http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/djbdns-1.05.errno.patch
# cd djbdns-1.05
# patch -p1 < ../djbdns-1.05.errno.patch
# make
# make setup check
vii. Bringing up djbdns - dns server
# tinydns-conf dns dnslog /var/dns/namedb 127.0.0.1
# ln -s /var/dns/namedb /var/service
# cd /var/dns/namedb/root
# ./add-ns xwings.net 127.0.0.1 #
./add-ns 0.0.10.in-addr.arpa 127.0.0.1
# vi data
Before: .xwings.net:127.0.0.1:a:259200
After: .xwings.net.127.0.0.1:ns1:259200
# ./add-host ultraman.xwings.net 10.0.0.21
# ./add-host cpteo.xwings.net 10.0.0.132
# ./add-host kjlau.xwings.net 10.0.0.144
# ./add-alias www.xwings.net 10.0.0.21
# make
viii. Bringing up djbdns - dns cache server
# dnscache-conf dnscache dnslog /var/dns/dnscache 10.0.0.21
# ln -s /var/dns/dnscache /var/service
# touch /var/dns/dnscache/root/ip/10.0.0
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/xwings.net
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/1.0.0.127.in-addr.arpa
# echo 127.0.0.1 > /var/dns/dnscache/root/servers/0.0.10.in-addr.arpa
# wget ftp://ftp.internic.net/domain/named.cache
# awk '$1 ~ /.ROOT-SERVERS.NET/ {print $4}' named.cache > /var/dns/dnscache/root/servers/@
Testing :
# dnsqr a kjlau.xwings.net
1 kjlau.xwings.net:
50 bytes, 1+1+0+0 records, response, noerror
query: 1 kjlau.xwings.net
answer: kjlau.xwings.net 85740 A 10.0.0.144
Maintain SVC
Restart Service
# svc -t /var/dns/dnscache
Stop
# svc -d /var/dns/dnscache
The rc.dns file
#!/bin/sh
# M.J. Prinsen
#
# description: the djbdns DNS
PATH=/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH
case "$1" in
start)
echo "Starting dns"
if svok /service/dnscache ; then
svc -u /service/dnscache
else
echo dnscache service not running
fi
if svok /service/tinydns ; then
svc -u /service/tinydns
else
echo tinydns service not running
fi
if svok /service/axfrdns ; then
svc -u /service/axfrdns
else
echo axfrdns service not running
fi
if [ -d /var/lock/subsys ]; then
touch /var/lock/subsys/dns
fi
;;
stop)
echo "Stopping dns ..."
echo " dnscache"
svc -d /service/dnscache
echo " tinydns"
svc -d /service/tinydns
echo " axfrdns"
svc -d /service/axfrdns
if [ -f /var/lock/subsys/dns ]; then
rm /var/lock/subsys/dns
fi
;;
stat)
svstat /service/dnscache
svstat /service/dnscache/log
echo "--"
svstat /service/tinydns
svstat /service/tinydns/log
echo "--"
svstat /service/axfrdns
svstat /service/axfrdns/log
;;
reload|hup)
echo "Sending HUP signal to dns."
svc -h /service/dnscache
svc -h /service/tinydns
svc -h /service/axfrdns
;;
pause)
echo "Pausing dnscache"
svc -p /service/dnscache
echo "Pausing tinydns"
svc -p /service/tinydns
echo "Pausing axfrdns"
svc -p /service/axfrdns
;;
cont)
echo "Continuing dnscache"
svc -c /service/dnscache
echo "Continuing tinydns"
svc -c /service/tinydns
echo "Continuing axfrdns"
svc -c /service/axfrdns
;;
restart)
echo "Restarting dns:"
echo "* Stopping dnscache."
svc -d /service/dnscache
echo "* Stopping tinydns."
svc -d /service/tinydns
echo "* Stopping axfrdns."
svc -d /service/axfrdns
echo "* Restarting dnscache."
svc -u /service/dnscache
echo "* Restarting tinydns."
svc -u /service/tinydns
echo "* Restarting axfrdns."
svc -u /service/axfrdns
;;
help)
cat <
Source : kerneltrap
Thứ bảy, ngày 31 tháng mười năm 2009
Project Joomla! của tôi
- Thiết kế web form cho client nhập thông tin cần thiết
- Sau khi thông tin được nhập vào sẽ được lưu trữ trên server dưới dạng tập tin .pdf
- Thiết kế form cho người quản trị biết tình trạng thông tin đã xử lý, chưa xữ lý, tên người dùng, ngày tháng yêu cầu, tên người yêu cầu..
Ngoài ra : Phân quyền hạn cho người dùng, nhóm người dùng .
Server được chạy trên môi trường nội mạng, sử dụng Centos
Hình ảnh demo tham khảo :

Nói chung project này rất thích hợp với công ty viễn thông chuyên kinh doanh các dịch vụ như ADSL, truyền số liệu, FTTx, PSTN vì tiết kiệm tiền bạc như giấy in, fax, mực in hàng tháng . Ngoài ra làm việc theo công nghệ số thay vì công nghệ truyền thống trước đây.
Chủ nhật, ngày 25 tháng mười năm 2009
Về quê
Nghe bài hát này xong, tôi phải xuống nhà, vệ sinh cá nhân để sau đó sang nhà em yêu rước em yêu đi chơi cùng tôi. Chủ nhật tuần này quả thật là 1 trong những ngày đáng nhớ trong cuộc đời của tôi ....
Phiên chợ nghèo nơi đó có dáng chị, dáng mẹ tôi dầm sương dải nắng ...Bao nhiêu năm theo dòng đời xuôi ngược, phiêu bạt nơi phồn hoa, cát bụi ... Ôi ....quê hương
Theo em, theo em anh thì về
Thăm Lại miền quê
Nơi có một triền đê có hàng tre ru khi chiều về
Đưa nhau, đưa nhau ta thì về
Nơi mẹ đưa nôi
Nơi sáo diều chơi vơi
Với dòng sông bên lở bên bồi...
Ơi quê ta bánh ta bánh đúc
Nơi thảo thơm đồng xanh trái ngọt
Nơi tuổi thơ ta trài qua đẹp như giấc mơ
Ơi quê ta dầu sương dãi nắng
Phiên chợ nghèo lều mái tranh xiên
Kìa dáng ai như dáng mẹ dáng chị tôi
Theo em, theo em anh thì về
Thăm Lại miền quê Nơi có một triền đê có hàng tre ru khi chiều về...
Đưa nhau, đưa nhau ta thì về
Nơi mẹ đưa nôi
Nơi sáo diều chơi vơi
Với dòng sông bên lở bên bồi...
Ơi quê ta bánh ta bánh đúc
Nơi thảo thơm đồng xanh trái ngọt
Nơi tuổi thơ ta trài qua đẹp như giấc mơ
Bao nhiêu năm rời xa quê hương
Phiêu bạt nơi thành đô cát bụi
Đôi khi cánh cò xưa
Lạc vào giấc mơ tôi
Nước trôi qua cầu
Đời người đi mãi về đâu
Thiếu quê hương... Biết về.... Biết về đâu...
Đưa nhau..... Biết về đâu...
Một chiều bưng bát cơm quê... Rưng rưng ta hát giọng quê dãi dề...
Thứ năm, ngày 15 tháng mười năm 2009
joomlaXplorer
- Browse Directories & Files
- Edit, Copy, Move and Delete files
- Search, Upload and Downloading files
- Create new files and directories
- Change file permissions (chmod) and much more This script is based on QuiXplorer 2.3.1 (available at http://quixplorer.sourceforge.net/)
http://extensions.joomla.org/extensions/102/details
Thứ ba, ngày 13 tháng mười năm 2009
Vietnamese unicode utf-8 for PDF print - tạo pdf tiếng Việt
- Tải về font unicode tại - download unicode font package:
- http://sourceforge.net/project/showfiles.php?group_id=128076 - bạn phải chọn gói cho php5 hay php4 - you should choose packages for PHP4 or PHP5.
- Copy các bộ font trên vào thư mục - copy some fonts onto the folder
language/pdf_fonts/
Ví dụ cho 1 bộ font: for example of one fo
http://www.mediafire.com/download.php?nw0tlny2y0n
- Thay đổi nội dung file - modify this file: language/en-GB/en-GB.xml và/hoặc vi-VN/vi-VN.xml
Tìm - findxxx
và chuyển thành - and change it as:DejaVuSans
Bạn nên thử 1 vài font thích hợp cho hiển thị của mình

Sưu tầm
Thứ sáu, ngày 09 tháng mười năm 2009
Những phút xao lòng
Có thể vợ mình xưa cũng có một người yêu
(Người ấy gọi vợ mình là người yêu cũ)
Cũng như mình thôi, mình ngày xưa cũng thế
Yêu một cô, giờ cô ấy đã lấy chồng
Có thể vợ mình vì những phút mềm lòng
Nên giấu kín những suy tư, không kể về giấc mộng
Người yêu cũ vợ mình có những điều mình không có được
Cô ấy không nói ra vì sợ mình buồn
Mình cũng có những phút giây cảm thấy xao lòng
Khi gặp người yêu xưa với những điều vợ mình không có được
Nghĩ về cái đã qua nhiều khi nuối tiếc
Mình cũng chẳng nói ra vì sợ vợ buồn
Sau những lần nghĩ đâu đâu mình thương vợ mình hơn
Và cảm thấy mình như người có lỗi
(Chắc vợ mình hiểu điều mình không nói
Cô ấy cũng thương yêu và chăm chút mình hơn)
Mà có trách chi những phút xao lòng
Ai cũng có một thời để yêu và một thời để nhớ
Ai cũng có những phút giây ngoài chồng ngoài vợ
Đừng có trách chi những phút xao lòng
THUẬN HỮU
(Trích trong tập thơ Biển gọi, NXB Đà Nẵng - 2000)
Thứ năm, ngày 08 tháng mười năm 2009
Google Chrome trên Ubuntu 9.04 và Fedora 11
Ubuntu
i386
http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_i386_deb
64
http://www.google.com/chrome/intl/en/eula_dev.html?dl=unstable_amd64_deb
Tôi dùng Ubuntu 9.04 nhưng tôi phải Update các package xong thì mới cài đặt Google Chrome thành công .
Trên Fedora thì
# vi /etc/yum.repos.d/google.repo
[google] name=Google – i386
baseurl=http://dl.google.com/linux/rpm/stable/i386
enabled=1
gpgcheck=0
# yum install google-chrome-unstable
Để bật Adobe Flash thì
$ sudo updatedb $ sudo locate libflashplayer.so
/usr/lib/adobe-flashplugin/libflashplayer.so
$ sudo aptitude install flashplugin-installer
Tạo thư mục chứa plugin của trình duyệt Google Chrome
$ sudo mkdir /opt/google/chrome/plugins
$ sudo cp /usr/lib/flashplugin-installer/libflashplayer.so /opt/google/chrome/plugins
Nhấn chuột phải ở menu Applications chọn Edit Menus tìm Google Chrome ở phần Command nhập vào /opt/google/chrome/google-chrome --enable-plugins %U
OK , bây giờ thử truy cập vào Youtube.com xem 1 bài nhạc nào đó thử xem