6/18/09

Configuring EclipseME and Eclipse


This document provides instructions on how to configure EclipseME and Eclipse for J2ME development.

  1. Import the Device Definitions
  2. Change Eclipse's Debug Settings
  3. Configure ProGuard (Optional)
  4. Configure OTA options (Optional)

1. Import the Device Definitions

In order to use EclipseME, you must configure at least one Device Definition. In order to do this, perform the following steps:

  1. Select the Preferences menu item from Eclipse's Window menu.

  2. Expand the J2ME item in the pane to the left and click on Device Management.
    screenshot

  3. Select Import...

  4. In the resulting dialog, select the root directory to be searched to find known devices definitions.

    screenshot

    As you leave the search directory text field or select the Refresh button, EclipseME will begin looking for devices in the specified directory and all subdirectories. As of version 1.5.0 of EclipseME, it is no longer necessary to pick the "perfect" directory in order to have devices imported, as EclipseME should be able to locate them if they reside anywhere within the specified directory. EclipseME will display the devices that are found as they are found. If you wish to stop the search at any time, select the Cancel button.

    After the search has completed, use the checkboxes to select the device definitions to be imported. Only devices that have been imported into your configuration may be used by project definitions and for launching. Finally, choose Finish to complete the import process.

    If EclipseME fails to locate a device definition that you expected would be found, it may be that EclipseME does not support it for the time being. In this case, please feel free to submit an RFE to ask for support for this WTK to be added. See here for how to do this.

  5. When you have successfully completed adding the device, you should see the imported devices in the device management preferences.

    screenshot

    Save the definitions by selecting Finish.

2. Change Eclipse's Debug Settings

Because of some quirks in the wireless toolkits, Sun's in particular, if you are going to debug your MIDlet using Eclipse, you must change several of the default debug settings. To do this:

  1. Select the Preferences menu item from Eclipse's Window menu.

  2. Expand the Java item in the left pane and click on the Debug entry.

  3. Ensure that both Suspend execution on uncaught exceptions and Suspend execution on compilation errors near the top of the dialog are NOT checked.

  4. Increase the Debugger timeout near the bottom of the dialog to at least 15000 ms.

  5. The resulting settings should look something like this:
    screenshot

If you do not make these changes you will get errors when you try to run your MIDlet.

3. Configure ProGuard (Optional)

If you will be using ProGuard to produce obfuscated packages, you will need to configure it into the plug-in. To do this:

  1. Select the Preferences menu item from Eclipse's Window menu.

  2. Expand the J2ME and the Packaging items in the left pane and click on the Obfuscation entry.

  3. Configure the ProGuard Root Directory near the top of the dialog.

  4. Configure any other ProGuard-specific settings that you need. For more information on ProGuard, see the ProGuard SourceForge site.

    Important note for Microsoft Windows Users: By default, ProGuard assumes that you are using an operating system that can distinguish between two file names that differ only in their case (i.e. A.java and a.java are two different files. This is clearly not the case in Microsoft Windows. Windows users should be sure to specify the -dontusemixedcaseclassnames option to ProGuard. If you fail to do this, and if you have more than 26 classes in your project, ProGuard's default use of case-sensitive file names will cause classes to overwrite one another. For safety, beginning with release 0.9.0 of EclipseME, the -dontusemixedcaseclassnames option is included as one of the default arguments to ProGuard. UNIX users with projects with many classes may be able to achieve a small reduction in the final size of their JAR file by removing this option.

  5. The resulting settings should look something like this:
    screenshot

4. Configure EclipseME's Over The Air (OTA) options (Optional)

If you will be using EclipseME to debug your MIDlet in Over The Air (OTA) mode, you may want to adjust the OTA Preferences. To do this:

  1. Select the Preferences menu item from Eclipse's Window menu.

  2. Expand the J2ME item in the left pane and click on the Over The Air entry.

  3. The default settings look like this:
    screenshot

At this point, you are ready to use EclipseME to create MIDlet suites. Before you do so, however, we strongly recommend that you read the section on Best Practices.

Writing a Hello World Midlet(Eclipse)

Creating a "Hello word!" midlet using Bizu-Me


Create a new project by going to File-->New-->Project. Then choose J2ME Midlet Suite in the list and click the next button. Then, insert a name for your project in the Project. We will put Bizu-Me-Demo for this project.

Choose a device in from the combo box. We will stick to using the DefaultColorPhone for this project.

Right click on the Bizu-Me project, go to New-->Source folder and create a source folder. Name it src.

You should now have a project with the following hierarchy:


Next we need to set up the classpath and dependencies. Right click on Bizu-Me-Demo and select properties. If you checked out the Bizu-Me project in your eclipse, go to the Project's tab and add Bizu-Me.

If you don't have Bizu-Me project in your eclipse, you can either follow the Bizu-Me setup or download a jar'd version from the website and add it as an external jar.

Once the classpath has been set, right click on the Bizu-Me-Demo project source folder and choose "create a new class". Fill in the class name as Main, the SuperClass field as org.openbizu.me.MIDlet and a package name i.e "org.openbizu.demo".

When this is done, you should end up with the following code in your Main.java class;

public class Main extends MIDlet {


protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}

protected void pauseApp() {
// TODO Auto-generated method stub
}

protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}

You will find out that there will be a red cross at the top indicating that there is an error. Add the following lines to the Main.java class you just created to fix this.

public Main() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
super();
}

Since you are extending the org.openbizu.me.MIDlet class, you need to infer the org.openbizu.me.MIDlet super class constructor which throws three exceptions.

Next, we need to create a panel and add it to the container. There are two types of panels;

  • simple panel.

  • composite panel.

You can only do custom drawing operations on a simple panel whereas if you use a composite panel, you can both attach components, commands and custom drawing operations onto the panel.

Since we are only going to display a "Hello world !" string, we will use a simple panel. Next create a new class, name it HelloPanel. You should end up with the following hierarchy:

To draw anything onto the panel, implement the paint method by adding the following lines to the paint method.

public class HelloPanel extends SimplePanel{

public void hideNotify() {
// TODO Auto-generated method stub
}

public void paint(Graphics g) {
g.setColor(0);
g.drawString("Hello word !", getWidth()/2 , ( getWidth() - Font.getDefaultFont().getHeight() )/ 2,
Graphics.HCENTER | Graphics.TOP );

}

public void showNotify() {
// TODO Auto-generated method stub

}
}

We first set the font colour to black and draw the "Hello world!" String in the middle of the screen.

Lastly, we need to create the HelloPanel in the Main class and add it to the container. The main class should look like this:

public class Main extends MIDlet {

private HelloPanel helloPanel;

public Main() throws InstantiationException, IllegalAccessException, ClassNotFoundException {
super();
helloPanel = new HelloPanel();
getContainer().put(0, helloPanel);

}

protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
// TODO Auto-generated method stub
}

protected void pauseApp() {
// TODO Auto-generated method stub
}

protected void startApp() throws MIDletStateChangeException {
// TODO Auto-generated method stub
}
}

The getContainer() method creates a new container and the put method adds the HelloPanel to the container. To run the midlet, right click on the main method in the package explorer and choose run as emulated .


If you checked the Bizu-ME project's source code out and added it to this project's build path and you encounter a java.lang.NoClassDefFoundError similar to this one:

java.lang.NoClassDefFoundError: org/openbizu/demo/Main: org/openbizu/me/MIDlet
at com.sun.midp.midlet.MIDletState.createMIDlet(+29)
at com.sun.midp.midlet.Scheduler.schedule(+52)
at com.sun.midp.main.Main.runLocalClass(+28)
at com.sun.midp.main.Main.main(+116)

right click on the Bizu-Me-demo project you just created and make sure you export the Bizu-ME project in the build path configuration.

If you don't see any error then you should be able to see the emulator running. Congratulations, you just created your first midlet using Bizu-Me. Piece of cake right?

Lập trình J2ME trên Eclipse


I.Giới thiệu Eclipse
Những ai đã từng lập trình Java trên Eclipse thường chỉ có một nhận xét: hài lòng. Thật vậy, công cụ mã nguồn mở được viết bằng Java của anh cả IBM là một công cụ phát triển phần mềm mạnh mẽ. Eclipse được phát triển theo mô hình nền (platform), tự nó không cung cấp các chức năng cho người dùng cuối mà chỉ cung cấp một kiến trúc mở để các plugin gắn vào nó làm việc đó. Chính vì vậy Eclipse giống như một hệ điều hành để chúng ta cài đặt các công cụ cần thiết cho quá trình phát triển ứng dụng. Nó làm hài lòng giới lập trình viên Java vì có khá nhiều plugin mã nguồn mở phục vụ công việc. Hơn nữa, nếu thích, bạn còn dễ dàng phát triển một plugin phục vụ mục đích của mình.


II. EclipseME
EclipseME là một Eclipse plugin dành riêng cho phát triển ứng dụng J2ME được phát triển bởi Craig Setera. EclipseME có đầy đủ các chức năng của một J2ME IDE như: tạo J2ME project, tạo MIDlet, soạn thảo file jad, chạy ứng dụng MIDlet… Điều đặc biệt hơn cả là EclipseME thừa hưởng các tính năng Java IDE tuyệt vời từ Eclipse.

III. Cài đặt
1. Download: Xem địa chỉ download miễn phí ở cuối bài viết.
2. Yêu cầu:
3. Cài đặt EclipseME:

Để cài đặt EclipseME, bạn chỉ cần giải nén file zip đến thư mục plugins của Eclipse. Ví dụ, nếu bạn đã cài Eclipse trên C:\eclipse, bạn sẽ cài EclipseME trên C:\eclipse\plugins. Khởi động lại Eclipse nếu nó đang chạy để EclipseME đuợc khởi động.

4. Cấu hình:


Text Box: Hình 1 - Cấu hình WTKEclipseME đòi hỏi cần phải cấu hình ít nhất một WTK cho nó. Để cấu hình WTK, bạn hãy thực hiện theo các bước sau đây:
- Khởi động Eclipse
- Vào menu Window -> Preferences. Mở rộng mục J2ME, chọn mục Platform Components. Màn hình xuất hiện như trên hình 1.
- Trong khung bên phải, kích chuột phải vào mục Wireless Toolkits, kích vào Add Wireless Toolkit.
- Cửa sổ hiện ra yêu cầu bạn chọn thư mục cài đặt WTK. Nhấn nút Browse và chọn thư mục WTK bạn đã cài đặt, ví dụ: C:\WTK1.0
- Nhấn Finish rồi nhấn OK. Quá trình cài đặt và cấu hình đã hoàn tất.

IV.Tạo và chạy ứng dụng
1. Tạo J2ME project
Để tạo một J2ME project, bạn hãy làm theo các bước sau đây:

- Vào menu File -> New -> Project

- Cửa sổ New Project hiện ra. Hãy mở rộng mục J2ME, chọn J2ME MIDlet Suite. Kích Next.

- Trong cửa sổ kế tiếp, hãy gõ tên project (ví dụ HelloWorld) và chọn thư mục chứa project (ví dụ C:\projects\J2ME). Kích Next.

- Bước kế tiếp nầy cho phép bạn chọn nền WTK mà bạn đã cấu hình. EclipseME cho phép cấu hình nhiều nền J2ME (WTK1.0, WTK2.1…) nên bạn cần phải chọn một nền J2ME bạn muốn, chẳng hạn: J2ME Wireless Toolkit 1.0.4 Platform. Kích Next.

- Cuối cùng, bạn có thể thêm các thư viện cần dùng, thêm thư mục chứa source v.v… Cũng có thể để mọi thứ theo mặc định. Kích Finish để kết thúc quá trình tạo J2ME project. Bây giờ bạn đã có một J2ME project hoàn chỉnh trong workspace sẳn sàng để thực hiện mọi cái bạn muốn với J2ME.

2. Tạo MIDlet
MIDlet là lớp chính của toàn bộ ứng dụng J2ME. Có thể so sánh nó như một lớp có hàm main của J2SE, một Servlet của J2EE hay một Applet của ứng dụng applet. Để tạo mới một MIDlet, bạn hãy thực hiện theo các bước sau đây:
- Trong khung Navigator, kích chuột phải trên J2ME project (theo ví dụ ở trên là HelloWorld).
- Trong popup menu hiện ra, chọn New -> Other.

- Mở rộng mục J2ME, chọn J2ME Midlet. Kích Next.

- Nhập tên gói chứa MIDlet trong mục package, ví dụ: edu.eclipseme.helloworld

- Nhập tên lớp MIDlet trong mục Name, ví dụ: HelloWorldMIDlet.

- Nhấn nút Finish để kết thúc quá trình tạo MIDlet. Bạn đã có một MIDlet với đầy đủ các phương thức chính (constructor, startApp, pauseApp, destroyApp) trong J2ME project của mình.
Sau đây là ví dụ về chương trình HelloWorldMIDlet. Chương trình của chúng ta sẽ vẽ một dòng chữ Hello World in đậm màu đỏ ở giữa màn hình điện thoại. Trước khi in dòng chữ, chương trình hiển thị một màn hình intro trong 30 giây với một hình ảnh dạng png làm logo. Bạn có thể chọn bất kỳ hình nào bạn muốn. Ở đây, chúng tôi chọn logo của JavaVietnam.org.

a)HelloCanvas.java: Lớp vẽ dòng chữ Hello World

package edu.eclipseme.helloworld;

import javax.microedition.lcdui.Canvas;

import javax.microedition.lcdui.Font;

import javax.microedition.lcdui.Graphics;
/**

* Canvas vẽ chuỗi HelloWorld

*/
public class HelloCanvas extends Canvas{

/**
* Bạn hãy vẽ những gì bạn muốn ở đây
*/

protected void paint(Graphics g) {
clearScreen(g);
paintHello(g);
}

//Xoá màn hình (bôi màu trắng).
private void clearScreen(Graphics g){
g.setColor(0xFFFFFF);
g.fillRect(0, 0, getWidth(), getHeight());
}



//Vẽ chuỗi Hello World

private void paintHello(Graphics g){
//Chuỗi cần vẽ
String hello = "Hello World";
//Màu cần vẽ (đỏ)
g.setColor(0xFF0000);
//Font cần vẽ
Font font = Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD, Font.SIZE_MEDIUM);
g.setFont(font);

//Vị trí vẽ (giữa màn hình)

int x = (getWidth() - font.stringWidth(hello)) / 2;
int y = (getHeight() - font.getHeight()) / 2;

//Vẽ chuỗi
g.drawString(hello, x, y, Graphics.TOP | Graphics.LEFT);
}

}

b) IntroCanvas.java: Lớp hiển thị màn hình intro.
package edu.eclipseme.helloworld;
import java.io.IOException;
import java.util.Timer;
import java.util.TimerTask;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
/**
* Hiển thị màn hình intro
*/

public class IntroCanvas extends Canvas{
//Bạn có thể thay bằng logo bạn thích.
private static final String logoName = "javavietnam_logo.png";
private Display display;
private Displayable nextScreen;
private int timeout;
private Timer timer = new Timer();

public IntroCanvas(Display display, Displayable nextScreen, int timeout){
this.display = display;
this.nextScreen = nextScreen;
this.timeout = timeout;
}



/**
* Bắt đầu màn hình intro.
*/
public void startIntro(){
display.setCurrent(this);
}



/**
* Kết thúc màn hình intro
*/
public void endIntro(){
display.setCurrent(nextScreen);
}



protected void paint(Graphics g) {
try {
Image logo = Image.createImage(logoName);
g.drawImage(logo, 0, 0, Graphics.TOP | Graphics.LEFT);
}

catch (IOException e) {
g.drawString(“Logo Error”, 0, 0, Graphics.TOP | Graphics.LEFT);
}

}



/**
* Thiết lập bộ đếm thời gian.
*/

protected void showNotify() {
timer.schedule(new CountDown(), timeout);
}



/**
* Kết thúc intro nếu bất kỳ phím nào được nhấn.
*/

protected void keyPressed(int keyCode) {
endIntro();
}



/**
* Kết thúc intro nếu hết thời gian.
*/

private class CountDown extends TimerTask {
public void run() {
endIntro();
}

}

}

c) HelloWorldMIDlet.java: Lớp chính
package edu.eclipseme.helloworld;
import javax.microedition.lcdui.Canvas;
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
import javax.microedition.midlet.MIDletStateChangeException;



/**
* Day la lop chinh cua ung dung thua ke tu lop MIDlet.
*/

public class HelloWorldMIDlet extends MIDlet {
private Display display;
private IntroCanvas introCanvas;
private HelloCanvas helloCanvas;

/**
* Phuong thuc thiet lap.
*/

public HelloWorldMIDlet() {
super();
}



/**
* Phuong thuc nay thuc nay se duoc goi boi KVM khi nguoi
* dung nhan phim Launch tren dien thoai di dong.
* @see javax.microedition.midlet.MIDlet#startApp()
*/
protected void startApp() throws MIDletStateChangeException {
display = Display.getDisplay(this);
helloCanvas = new HelloCanvas();
introCanvas = new IntroCanvas (display, helloCanvas, 30000);
introCanvas.startIntro();
}



protected void pauseApp() {

}



protected void destroyApp(boolean arg0) throws MIDletStateChangeException {

}

}



3. Đóng gói
Để ứng dụng J2ME chạy được trên thiết bị thật, bạn cần phải đóng gói toàn bộ ứng dụng vào file jar và file jad.
Nếu bạn phát triển ứng dụng của mình trên chế độ command line thì đây quả là một công việc nhiều rắc rối. Với EclipseME, việc đóng gói trở nên rất dễ dàng. Bạn hãy thực hiện theo các bước sau đây:
- Kích chuột phải trên J2ME project của bạn.
- Trên menu hiện ra, chọn J2ME -> Create Package.
Hãy mở rộng mục deployed, bạn đã có file .jad và .jar cho ứng dụng của mình.

4. Chạy ứng dụng
Chạy một ứng dụng J2ME cũng đơn giản như việc chạy một ứng dụng Java khác trong Eclipse. Sau đây là các bước để chạy một ứng dụng J2ME:

- Vào menu Run -> Run

- Trong khung bên trái, chọn Wireless Toolkit Emulator

- Nhấn nút New.

- Bạn có thể chọn thêm các tuỳ chọn khác. Trong khung Excutable, chọn Midlet và nhấn nút Search để EclipseME tự tìm lớp MIDlet cho bạn. Nếu bạn chọn Over the Air, EclipseME sẽ thực thi file jad.


Text Box: Hình 2 - màn hình intro

Mọi ngườii có thể download EclipseME ở đây www.eclipseme.org
V. KẾT LUẬN


Trên đây chúng tôi đã giới thiệu các chức năng chính của EclipseME. Nếu bạn đã từng lập trình trên Eclipse, thì bạn chỉ cần biết chức năng và địa chỉ download của EclipseME là đủ. Ngược lại, nếu bạn chưa bao giờ dùng đến Eclipse, đây sẽ là một dịp để bạn làm quen với nó. Và chỉ cần một lần làm quen thôi, chúng tôi tin tưởng rằng bạn sẽ khó rời xa nó :-).

Lập trình cho Black Berry

Default Quote:
Originally Posted by BBSync View Post
Hi
Actually I am a newbie into Blackberry programming...I just want to know how to start programming for this!!!

And also can anyone please tell me how to open an example given in the SDK in JDE.Actually when I open it I dont get to see the .jdw file for the project...
I get to see all the .java files....

So I am not getting how to open......


Can anyone please help!!!


Regards
Amey
ADI
Hi,

You have 2 options. use BlackBerry JDK or NetBeans or Eclipse for building Midlets.

Here is my recipe for Midlets:

-You have to install NetBeans Mobility Pack.
-Then install BlackBerry JDK, then configure NetBeans to point to the BBJDK Simulator
-Then build your App (.jad and .jar)
-Create a Project in the BBJDK (change project property instead of CLDC to Midlet)
-Compile to generate the .cod file (also .alx for the BB Desktop Loader)
-Load the .cod with javaloader -usb load yourapp.cod (javaloader is in bin directory of the BBKD)

For BB Native Java

-Use BBJDK, self explained in the BB Developer Sites

I hope to give you a general map.

Regards!

6/16/09

Phân trang by S2DAO

SELECT * FROM (
SELECT ROWNUM AS S2DAO_ROWNUMBER, S2DAO_ORIGINAL_DATA.* FROM (
SELECT * FROM A
) S2DAO_ORIGINAL_DATA
) WHERE S2DAO_ROWNUMBER BETWEEN 1 AND 20 AND ROWNUM <= 20 ORDER BY S2DAO_ROWNUMBER

5/18/09

Running Two Tomcat Instances on One Machine


Introduction

GRIA is designed to allow the various services to be installed on different machines, and for this reason internal communication between services uses SOAP. Sometimes, it is desirable to install multiple war files (typically the basic application services and the service provider management services) on a single machine.

In GRIA 5.0, there is a known problem with this approach. In order to prevent tomcat from running out of memory and crashing when there are a large number of incoming requests to service, the number of threads should be limited using the maxThreads setting in the $TOMCAT_HOME/conf/server.xml file. But, this can cause dead-lock in the following situation:

  1. The service is configured to allow a maximum of n threads.
  2. A client makes n calls to a job or data service operation that requires confirmation from the SLA service.
  3. The job or data service tries to invoke the SLA service (over SOAP), but no threads are available.
  4. The service waits until a thread becomes free for the SLA service, but none of them ever will because they are all processing requests to an application service that are waiting for a free SLA thread.

The recommended solution to this problem is to run two instances of tomcat on the single machine, one running the management services and one running the application services. Because the threads are then not shared between the two, an SLA operation will never block because a thread is taken by an application service and the system will not deadlock.

Set Up

To install two instances of tomcat in this way:

  1. Download tomcat, and unpack it twice, into two separate directories.
  2. Edit the conf/server.xml file in one of the copies in the following way:
    1. Change the port on the root Server element to a different number (e.g. 8006)
    2. Change the port attributes on the Connector elements to a different number (e.g. 8010 instead of 8009, 8081 instead of 8080 and 8444 instead of 8443)

You should now be able to run the bin/startup.sh scripts in both installations to get two running tomcats. Connect using port 8080 and install the basic application services, and then connect using port 8081 to install the service provider management services.

5/8/09

9 thứ cần thực hiện sau khi cài đặt Ubuntu 9.04




Damien

Quản trị mạng - Sau khi đã download và cài đặt Ubuntu 9.04, những thứ tiếp theo bạn cần thực hiện là gì?

Cho Ubuntu vào ổ đĩa cứng của bạn chỉ là bước đầu tiên. Vẫn là tình trạng thô,chưa được gọt giũa. Để thực hiện tốt nhất những gì cho nó, bạn cần phải cấu hình và tùy chỉnh nó sao cho phù hợp với nhu cầu của mình. Trong phần ba của loạt bài này, chúng tôi sẽ giới thiệu cho các bạn những thứ quan trọng nhất cần phải thực hiện sau khi bạn đã thiết lập Jaunty và chạy nó.

1. Kích hoạt thư mục lưu trữ

Mỗi lần bạn thực hiện hành động cài đặt mới cho Ubuntu, thứ đầu tiên mà bạn cần thực hiện là kích hoạt các thư mục lưu trữ, những thư mục lưu trữ này mở ra các lựa chọn ứng dụng mới và cho phép bạn cài đặt phần mềm của các hãng thứ ba một cách dễ dàng và nhanh chóng.

Vào System -> Administration -> Synaptic Package Manager.

Kích Settings -> Repositories.

Tích vào tất cả các hộp kiểm bên trong.

synaptic-repositories

Vào tab Third-Party Software. Tích vào tất cả các hộp kiểm bên trong.

Đóng cửa sổ và nhấn nút Reload ở phía góc phía trên bên trái để cập nhật thư mục lưu trữ.

2. Điều chỉnh menu GRUB

Menu GRUB là một màn hình màu đen xuất hiện khi bạn khởi động máy tính. Bạn có thể thay đổi một cách dễ dàng thiết lập chẳng hạn như liệu nó sẽ được ẩn hay bao nhiêu giây trước khi nó khởi động. Một trong những ứng dụng hữu dụng cho phép bạn thay đổi menu của GRUB dễ dàng là Startup Manager.

sudo apt-get install startupmanager

Trước khi thay đổi menu GRUB của bạn, cách tốt nhất bạn cần phải thực hiện là back up nó để phòng những trường hợp không hay có thể xảy ra.

sudo cp /boot/grub/menu.lst /boot/grub/menu-backup.lst

Mở Startup Manager của bạn, đây là nơi bạn có thể thay đổi timeout, số lượng kernel entry được giữ và hiển thị hay ẩn màn hình.

startupmanager

3. Cấu hình tường lửa

Nếu bạn quan tâm đến vấn đề bảo mật, khi đó bạn cần phải kích hoạt tính năng tường lửa và ngăn chặn bất cứ sự truy cập bất hợp pháp nào vào máy tính của mình.

UFW được cài đặt mặc định nhưng nếu bạn cần một giao diện đồ họa, hãy cài đặt GUFW.

sudo apt-get install gufw
gufwl

Một lựa chọn khác ngoài GUFW là Firestarter, đây là một ứng dụng đơn giản nhưng rất mạnh,cho phép bạn kiểm tra lưu lượng.

sudo apt-get install firestarter

4. Wine

Wine là một ứng dụng xếp vào loại “phải có” cho những ai không thể sống mà không có các ứng dụng Windows của họ, nó cho phép bạn cài đặt ứng dụng Windows trong máy tính Ubuntu và chạy chúng giống như các ứng dụng Windows nguyên bản.

sudo apt-get install wine

Khi đã cài đặt Wine, bạn cần phải nhớ chạy cấu hình (Applications -> Wine -> Configure Wine) trước khi cài đặt ứng dụng Windows ưa thích của mình.

5. Ubuntu-Restricted-extras

Có trường hợp nào bạn không thể nghe được các file nhạc MP3 không? Không thể xem các đoạn video trên Youtube không? Đừng lo lắng gì, tất cả những gì bạn cần thực hiện ở đây là cài đặt gói ubuntu-restricted-extras và nó sẽ cài đặt tất cả các files/codec cần thiết cho bạn. Một số ứng dụng phổ dụng trong gói như MP3 codec, Adobe Flash player, Java runtime và Microsoft core fonts.

sudo apt-get install ubuntu-restricted-extras

6. Ubuntu Tweak

Ubuntu Tweak cho phép bạn điều chỉnh các thiết lập hệ thống của bạn. Bạn có thể cài đặt các ứng dụng mới, tuỳ chỉnh các thiết lập desktop của bạn, cấu hình các ứng dụng khởi động, thay đổi sự liên kết kiểu file hệ thống và nhiều điều chỉnh khác nữa.

ubuntu-tweak

Để cài đặt Ubuntu Tweak, hãy mở các file sources.list của bạn

gksu gedit /etc/apt/sources.list

Chèn các dòng dưới đây vào cuối file. Lưu và đóng.

deb http://ppa.launchpad.net/tualatrix/ubuntu jaunty main
deb-src http://ppa.launchpad.net/tualatrix/ubuntu jaunty main

Trong terminal, cập nhật thư mục lưu trữ và cài đặt Ubuntu Tweak

sudo apt-get update
sudo apt-get install ubuntu-tweak

7. VLC

Sau khi thử vài media player, chẳng hạn như Totem và MPlayer, chúng tôi nhận thấy VLC là thứ bạn cần thiết hơn cả để có thể chạy nhiều kiểu định dạng file.

sudo apt-get install vlc

8. Gnome Do

Gnome Do là một ứng dụng nhỏ cho phép bạn tìm kiếm và thực hiện những thứ nhanh hơn và hiệu quả hơn trong máy tính Ubuntu. Nó cũng giống như QuickSilver trong Mac và Launchy trong Windows. Với những ai chưa từng sử dụng Gnome Do từ trước, sẽ cần một chút thời gian để học cách sử dụng nó. Tuy nhiên, khi bạn đã làm chủ được ứng dụng này thì chắc hẳn bạn sẽ cảm thấy rất nhiều điều thú vị với nó.

Gnome Do cũng đi kèm với một giao diện dock để bạn có thể sử dụng nó giống như bất kỳ các dock khác.

sudo apt-get install gnome-do

9. Hiệu ứng đẹp mắt.

Một số người thích có những hiệu ứng đẹp mắt trên máy tính của họ trong khi một số khác lại chỉ muốn có một desktop ở mức độ tối thiểu nhất. Nếu bạn thuộc về nhóm trước, thì đây là một số ứng dụng có thể cài đặt và làm đẹp cho máy tính của bạn.

  • CompizConfigSettingsManager: Bộ quản lý cấu hình cho Compiz. Bên trong bạn có thể tìm thấy rất nhiều hiệu ứng desktop thú vị.
  • Avant Windows Navigator, Cairo dock - Mac OSX style dock cho desktop
  • conky, GKrellM - hiển thị thiết lập hệ thống trên desktop.

Kết luận

Không thể lập hoàn chỉnh được một danh sách về các ứng dụng phổ biến mà ở trong bài chúng tôi chỉ giới thiệu danh sách những thứ cơ bản mà bạn cần phải đó để cải thiện tốt hơn hiệu suất. Nếu bạn thực sự cảm thấy thích các ứng dụng nào đó vì tính hiệu của hay vì một vấn đề nào đó, hãy comment và chia sẻ với chúng tôi và cùng đông đảo bạn đọc khác.