Google
 
My visitors : Hit Counter by Digits

2007/07/31

Đọc file .chm trong Ubuntu

Các file ebook hay các file help thường được viết dạng file .chm( Compiled HTML Help). Hôm nay, mở file ebook ra, mình không coi được, search ra cách cài zô, Thật đơn jản, khỏ 1 dòng lệnh sau zô :

sudo apt-get install xchm
Nhưng máy mình thì làm zậy coi không được( không hỉu sao nữa), cái này là mình coi trên mạng có 1 site chỉ zậy. Sau đó, mình tìm ra cách này. Mình khỏ zô lệnh sau :
sudo apt-get install gnochm
Các bạn có thể thử cả 2 chiu coi cũng được. Zậy là coi được ròi. Chúc các bạn thành công !

2007/07/29

Cài Stardict trong Ubuntu, bộ Từ điển miễn phí đa ngôn ngữ

Nhắc đến từ điển thì mọi người đều phải công nhận rằng đó là “vật bất ly thân” đối với người học ngoại ngữ. Nếu bạn đang sử dụng máy tính thì bạn sẽ nghĩ ngay đến Lạc Việt hay English Study, nhưng ngặt nỗi đó lại là những bản từ điển phải trả tiền.

Có rất nhiều phần mềm từ điển miễn phí giúp bạn tra từ điển ngay tại máy tính của mình. Và trong số những bộ công cụ từ điển vượt trội phải nói đến StarDict. Có thể nói, đây chính là loại từ điển chạy cực nhanh và có những tính năng đặc biệt nhất hiện nay trong số các loại từ điển miễn phí.
* Địa chỉ tải:
Để sử dụng StarDict, bạn tải bộ chương trình chính, dung lượng 13MB (bao gồm chương trình hỗ trợ từ điển, từ điển StarDict, dữ liệu từ điển Anh – Việt, Việt – Anh, Việt – Việt) hay phần mở rộng, dung lượng 93MB (các dữ liệu từ điển khác và phần âm thanh của từ điển – không bắt buộc) tại http://www.echip.com.vn.
Hoặc bạn cũng có thể tải từng phần tại các địa chỉ sau:
- Chương trình hỗ trợ cho từ điển chạy trên Windows: xem thêm tại http://stardict.sourceforge.net/
- Dữ liệu từ điển: Anh – Việt, Việt – Anh, Việt – Việt http://dotpups.de/hacao/stardict/dic.zip (7,7MB). Bạn có thể lấy các dữ liệu từ điển Pháp – Việt, Việt – Pháp, Nga – Việt, Đức – Việt, Nauy – Việt tại http://dotpups.de/hacao/diendan.htm. Các ngôn ngữ khác như Trung Quốc bạn xem trên http://stardict.sourceforge.net/
- Phần âm thanh của từ điển (bạn có thể tải tập tin này nếu thấy cần): http://prdownloads.sourceforge.net/stardic...ar.bz2?download (80MB).
* Cài đặt trên Window:
- Trước tiên, bạn cài chương trình hỗ trợ cho từ điển. Tại bước cài đặt cuối cùng, bạn chọn ngôn ngữ trong ô Current user’s language và All users’ language là Vietnamese (vi).

- Tiếp theo, bạn cài từ điển vào máy. Sau khi cài xong, bạn giải nén tập tin dic.zip vào thư mục C:\Program Files\StarDict\dic (tương tự cho các dữ liệu từ điển khác).
*Cài đặt trên Ubuntu :
1.Mở Terminal lên : (Application -> Accessories -> Terminal).
2.Khỏ vào lệnh sau để download source về :

wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-2.4.8.tar.bz2

3.Giải nén gói trên, vào thư mục chứa file trên bằng lệnh cd, ròi khỏ :
tar -xjvf stardict-2.4.8.tar.bz2

Chuyển vô thư mục :
cd stardict-2.4.8

4.Chạy các lệnh cài đặt :
./configure
Chú ý là sau khi chạy lệnh này rất có thể các bạn sẽ gặp lỗi, tuỳ vào tình hình từng máy do thiếu các thư viện cần thiết. Ví dụ : bị báo là: "error: No package 'libgnomeui-2.0' found" tui đã giải quyết vấn đề này như sau tui khỏ zô sudo apt-get install libgnomeui-dev thế là tui chạy lệnh nầy xong rồi chạy lại lệnh ./configure và không nhận được báo lỗi nào nữa.
Nhắc lại là các bạn fải chạy ./configure ko bị lỗi ròi mới wa bước típ theo.
khỏ típ :
make
sudo make install
5.Cài các package thêm vào( như gói Anh-Việt, Trung-Anh ...):
mkdir /home/username/.stardict
username là tên account trong Ubuntu của bạn.
Chúng ta sẽ download về và giải nén các file package đó trong folder này để xài.
Các bạn hãy download các gói Anh-Việt và Việt -Anh với 2 địa chỉ sau :
wget http://jaist.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_anh-viet-2.4.2.tar.bz2
wget http://nchc.dl.sourceforge.net/sourceforge/stardict/stardict-dictd_viet-anh-2.4.2.tar.bz2
Vậy là xong cài đặt trong Ubuntu ròi.
* Hướng dẫn sử dụng:
Sau khi hoàn tất, bạn khởi động lại máy và nhấn vào biểu tượng cuốn tự điển màu xanh trên desktop. Từ điển StarDict sẽ xuất hiện với danh sách từ cần tra cứu nằm bên trái, còn bên phải là các nút ẩn/hiện danh mục từ. Phía dưới từ trái sang phải là các nút: tự động quét từ cần chọn khi đưa chuột qua một từ bất kỳ, hướng dẫn sử dụng, thoát khỏi từ điển, tìm từ cần tra trong từ điển nằm trên Internet, mở trang Web của StarDict, quản lý các bộ từ điển và cấu hình từ điển.

Một số tính năng đặc biệt của chương trình:
- Tự động tra từ và chọn loại từ điển phù hợp với từ mà bạn vừa nhập vào. Bạn có thể tra từ tiếng Anh, tiếng Việt hay bất kỳ từ của ngôn ngữ nào (dùng font Unicode).
- Nếu bạn muốn xem các từ mình đã tra cứu trước đó thì nhấn vào nút thứ 4 từ phải qua.
- Bạn có thể sử dụng dấu “*” và dấu “?” để tra nghĩa thông minh. Ví dụ, nếu bạn nhập vào “*iger” thì bạn sẽ thấy 1 loạt các từ có phần đuôi là “iger”. Còn nếu bạn thay dấu “*” bằng dấu “?” thì bạn sẽ nhận chính xác từ “tiger”. Nếu muốn tra các từ gần giống từ “tiger” (thông qua thuật toán truy vấn mờ) thì bạn chỉ cần thêm dấu “/” phía trước từ cần tra.
- Khi bạn đưa trỏ chuột đến bất cứ vùng văn bản nào thì một cửa sổ nhỏ xuất hiện nghĩa ở bên trong. Bạn có thể cố định cửa sổ này tại vị trí nào đó bằng cách nhấn nút Lock. Trong cửa sổ nổi này, bạn có thể thực hiện các chức năng như: chép vào bộ nhớ, lưu nghĩa, phát âm, truy vấn tra chéo nghĩa hay truy vấn mờ nghĩa này. Bạn cũng có thể tra nghĩa của thanh tiêu đề, menu, chữ trên các nút, biểu tượng trên desktop, nút Start... Tuy nhiên, chưa nhận biết được chữ dưới dạng hình ảnh.

- Nếu bạn không muốn khi đưa chuột đến một từ nào đó sẽ xuất hiện bảng tra nghĩa của từ thì chỉ việc bỏ chọn mục “Quét từ” trong cửa sổ chính của từ điển hoặc nhấp phải chuột lên biểu tượng của từ điển trên khay hệ thống và bỏ chọn mục “Quét”.
- Việc tra từ rất đơn giản, tại cửa sổ chính của chương trình, bạn chỉ cần nhập từ cần tra với kiểu font chữ Unicode trong trình gõ Unikey hay VietKey.
- Nếu bạn muốn từ điển này phát âm khi tra từ thì bạn check vào Pronouce the word when it pops up trong cửa sổ “Phân loại” (trước khi bật chế độ phát âm thì bạn cần tải tập tin âm thanh 80MB tại địa chỉ nêu trên, sau đó giải nén vào thư mục C:\Program Files\ "trong Window", con2 trong Ubuntu là /usr/share/ hay bạn có thể định nghĩa lại trong Preferencws\Sound trong StarDict ).
- Nếu cần, bạn có thể tra từ thông qua các từ điển trực tuyến. Bạn cũng có thể thêm bớt các từ điển trực tuyến nào mà bạn thích.

- Để tra chéo giữa các từ, bạn chỉ cần nhấp đúp chuột vào phần tra nghĩa.
- Một chức năng khác nữa là tra từ cần tìm thông qua các từ điển trực tuyến trên Internet. Bạn nhấn chuột phải lên nút “Tìm trong một từ điển Internet - Bấm phím phải chọn danh mục Website” và chọn từ điển trực tuyến mình muốn.
Sau đó, một trang Web của từ điển bạn vừa chọn xuất hiện giải thích nghĩa của từ cần tra.
Trên đây là những tính năng chính của từ điển StarDict, còn nhiều tính năng và tùy chọn cấu hình sử dụng đặc biệt khác đang chờ bạn khám phá.

2007/07/26

Hướng dẫn cài Nvu để thiết kế Web dễ dàng.

Nvu là một môi trường tạo Web mới, dựa trên nền Mozilla và cơ chế Gecko của nó. Chủ yếu ban đầu là làm cho Linspire và các phiên bản khác của Linux. Tính hỗ trợ cao các hệ điều hành( OS) của nó cho nó trở nên khả thi với mọi OS khác. Hiện nay, Nvu đã chạy trên các OS : Window, Linux, Mac, FreeBSD.
Nvu dựa trên Gecko, cơ chế trong Mozilla, nó là một cơ chế tiện ích chuẩn, rất tin cậy, và siêu nhanh, được bảo trì hằng ngày dựa trên sự mở rộng của cộng đồng phát triển. Nó hỗ trợ mạnh cho XML, CSS, JavaScript. Kiến trúc của nó dựa trên XUL làm cho nó được mở rộng không ngừng.
Bây giờ bạn mở Terminal ra và khỏ vào các lệnh sau để các :

sudo apt-get install nvu
sudo rm -f /usr/share/applications/nvu.desktop
sudo gedit /usr/share/applications/nvu.desktop
Khi bạn khỏ lệnh cuối zô thì sẽ hiện ra GEdit cho bạn sửa file, bạn thêm các dòng sau vào :

[Desktop Entry]
Name=Nvu
Comment=Web Development Editor
Exec=nvu
Icon=nvu.xpm
Terminal=false
Type=Application
Categories=Application;Network;

Nếu bạn muốn thấy Nvu liền thì hãy khỏ lệnh sau để refesh lại GNOME panel :
killall gnome-panel
Sau đó bạn sẽ thấy nó ở MainMenu\Programming\Nvu.
Chúc bạn thành công !

2007/07/24

Convert .flv (Google Videos) to .mpg using ffmpeg

FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can compiled under most operating systems, including Windows. In ubuntu This package contains the ffplay multimedia player, the ffserver streaming server and the ffmpeg audio and video encoder. They support most existing file formats (AVI, MPEG, OGG, Matroska, ASF, …) and encoding formats (MPEG, DivX, MPEG4, AC3, DV, …).

ffmpeg Features

  • ffmpeg is a command line tool to convert one video file format to another. It also supports grabbing and encoding in real time from a TV card.
  • ffserver is an HTTP (RTSP is being developped) multimedia streaming server for live broadcasts. Time shifting of live broadcast is also supported.
  • ffplay is a simple media player based on SDL and on the FFmpeg libraries.
  • libavcodec is a library containing all the FFmpeg audio/video encoders and decoders. Most codecs were developped from scratch to ensure best performances and high code reusability.
  • libavformat is a library containing parsers and generators for all common audio/video formats.

Install ffmpeg Ubuntu

sudo apt-get install ffmpeg

convert .flv to .mpg using ffmpeg

First you need to download your .flv file to a folder and you need to Open a terminal window and go in to the .flv file folder and type the following command

ffmpeg -i jokes.flv -ab 56 -ar 22050 -b 500 -s 320×240 jokes.mpg

jokes.flv is the file you want to convert, so the name must be the same as the source file.You can name jokes.mpg whatever you want as long as it has the .mpg extension.

-b bitrate: set the video bitrate in kbit/s (default = 200 kb/s)

-ab bitrate: set the audio bitrate in kbit/s (default = 64)

-ar sample rate: set the audio samplerate in Hz (default = 44100 Hz)

-s size: set frame size. The format is WxH (default 160×128 )

.Mình đã dịch bài này sang tiếng Việt các bạn có thể xem tại đây .

by ubuntugeek.com

What is Wine ?

1.2.1. Windows and Linux

Different software programs are designed for different operating systems, and most won't work on systems that they weren't designed for. Windows programs, for example, won't run in Linux because they contain instructions that the system can't understand until they're translated by the Windows environment. Linux programs, likewise, won't run under the Windows operating system because Windows is unable to interpret all of their instructions.

This situation presents a fundamental problem for anyone who wants to run software for both Windows and Linux. A common solution to this problem is to install both operating systems on the same computer, known as "dual booting." When a Windows program is needed, the user boots the machine into Windows to run it; when a Linux program is then needed, the user then reboots the machine into Linux. This option presents great difficulty: not only must the user endure the frustration of frequent rebooting, but programs for both platforms can't be run simultaneously. Having Windows on a system also creates an added burden: the software is expensive, requires a separate disk partition, and is unable to read most filesystem formats, making the sharing of data between operating systems difficult.

1.2.2. What is Wine, and how can it help me?

Wine makes it possible to run Windows programs alongside any Unix-like operating system, particularly Linux. At its heart, Wine is an implementation of the Windows Application Programing Interface (API) library, acting as a bridge between the Windows program and Linux. Think of Wine as a compatibility layer, when a Windows program tries to perform a function that Linux doesn't normally understand, Wine will translate that program's instruction into one supported by the system. For example, if a program asks the system to create a Windows pushbutton or text-edit field, Wine will convert that instruction into its Linux equivalent in the form of a command to the window manager using the standard X11 protocol.

If you have access to the Windows program's source code, Wine can also be used to recompile a program into a format that Linux can understand more easily. Wine is still needed to launch the program in its recompiled form, however there are many advantages to compiling a Windows program natively within Linux. For more information, see the Winelib User Guide.

1.2.3. Wine features

Throughout the course of its development, Wine has continually grown in the features it carries and the programs it can run. A partial list of these features follows:

  • Support for running Win32 (Win 95/98, NT/2000/XP), Win16 (Win 3.1) and DOS programs

  • Optional use of external vendor DLL files (such as those included with Windows)

  • X11-based graphics display, allowing remote display to any X terminal, as well as a text mode console

  • Desktop-in-a-box or mixable windows

  • DirectX support for games

  • Good support for various sound drivers including OSS and ALSA

  • Support for alternative input devices

  • Printing: PostScript interface driver (psdrv) to standard Unix PostScript print services

  • Modem, serial device support

  • Winsock TCP/IP networking support

  • ASPI interface (SCSI) support for scanners, CD writers, and other devices

  • Advanced unicode and foreign language support

  • Full-featured Wine debugger and configurable trace logging messages for easier troubleshooting

Mình đã dịch bài này ra tiếng Việt tại đây
by winehq.org

Kitco Gold live chart

Kitco Gold live chart
Kitco Gold live chart