Jedit screenshot
Using Jedit and Mono on an Eee PC

Hands On: Write applications for your Eee

How to write code for the Eee PC; and we solve an Excel wrap problem

Written by Tim Anderson

For less than the cost of an iPhone, the Asus Eee PC gets you a highly portable computer that’s capable of most everyday tasks, including an office suite, internet, email and multimedia. Although Asus markets the Eee PC as an appliance, it’s a truly open device, which means you can write custom applications in the language of your choice.

You can install XP on the Eee, but for this article I’m presuming use of the default Linux OS, which is based on the Xandros distribution.

Preparing for development
There are a few changes you’ll want to make before you start programming. First, the official Eee repositories, for updating or adding software, are limited in scope. You’ll want to add something more comprehensive. A fairly safe choice is an official Xandros repository. Open a console and edit the file /etc/apt/sources.list with root permissions:

sudo nano /etc/apt/sources.list
and add the following to the end:
deb http://xnv4.xandros.com/
xs2.0/upkg-srv2 etch main
contrib. non-free

Run the command
sudo apt-get update
to refresh the index of available packages.

Next, you’ll want a means of escape from the Eee PC’s Easy Mode, which restricts your choice of applications to those in the tabbed menu on the home screen. From the console, type:

sudo apt-get install

ksmserver kicker

Now click the Shutdown button. A new icon called Full Desktop is available, and selecting this reboots into the full KDE Desktop in place of the default Easy Mode. The Eee has limited space, with its 4GB solid-state disk. The solution is to store as much as possible on an SD card. You can check free disk space by typing df in the console.

After installing support for Java, C++ and C#, our Eee still had 60 per cent free space. Most SD cards are formatted with Fat or Fat32 for Windows compatibility, and the Eee mounts SD cards noexec by default, which means you can’t execute applications from the card. You can modify this by editing the file /sbin/probdevice and changing the options for Fat from noexec to exec.

Whatever development environment you use, the Subversion version control system is useful. Install it with:
sudo apt-get install subversion

Coding with Java
The Eee has the Java runtime 1.5 installed, but not the JDK (Java Development Kit). If you are happy to develop on other machines and merely deploy to the Eee, that may be all you need. However, it can be useful to compile on the Eee itself. With the Xandros respository added as above, you can do:

sudo apt-get install
sun-java5-jdk

to install Java 1.5. Now you should be able to compile as well as run Java applications. Eclipse works on the Eee but is a little slow and unwieldy, and does not always work well with the Eee’s limited height screen. Use the Ctrl & M shortcut in the editor to maximise the edit window. A good alternative is Jedit .

Coding with C and C++
C and C++ are the most popular languages for Linux development. You can install the basic tools like this:
sudo apt-get install

build-essential

If you type gcc, you should get an error message ‘no input files’; or give it some source and it will compile it. Again, Jedit is a suitable editor. An advantage of installing gcc is that you can compile Linux applications from source, though getting all the dependencies in place may put pressure on the small drive.

Coding with C#
You can compile and run C# and Visual Basic on the Eee PC by installing Mono, the open-source implementation of Microsoft .Net. Run:

sudo apt-get install
mono-gmcs pkg-config gtk-sharp2

This installs the .Net 2.0 compiler and runtime, which has the system.windows.forms GUI libraries built in, as well as the C# bindings for the Gnome Toolkit, giving you a choice of GUI frameworks.

Resources
Download the Excel macro code.

Tags:

reader comments

related articles

 

related whitepapers

today's top stories

Learning from the credit crunch to avoid a broadband crunch

While it might be the most pressing issue de jour , the financial system isn’t the only area where government needs to... 10 Oct 2008

How careerism can warp IT procurement

Many working in IT put their career interests before those of their employer when weighing up purchasing options 10 Oct 2008

City in pressing need of skilled IT matchmakers

With the financial services sector plunging ever deeper into an M&A maelstrom, IT leaders are having their systems integration skills and due diligence expertise tested as never before 09 Oct 2008

The definitive guide to software development

Five key trends and five best practice tips to help you improve your programming capabilities 09 Oct 2008

Computing podcast - IT implications of the banking crisis, and the FSA clamps down on IT security

We discuss the effect of shotgun mergers and acquisitions on financial services IT staff, and examine the industry regulator's plan to fine directors for information security breaches 09 Oct 2008

Advertisement

Newsletter signup

Sign up for our range of FREE newsletters:

Existing User

Newsletter user login:

Jobs

Related jobs

Job of the week

Job alerts

Sign up here

Find your next job


IT Salary Checker

Check salary here

Advertisement

White papers

Search white papers

Top categories

VPN, Extranet and Intranet Solutions

WAN/ LAN Solutions

Network Security

Interoperability-Connectivity

Grid/ Utility Computing

Latest poll

Would you apply for a job that was advertised on Facebook or a similar social networking site?

Would you apply for a job that was advertised on Facebook or a similar social networking site?

The government is using Facebook to recruit IT staff - would you apply to such an ad?

Previous poll results

Latest audio and video articles

programming codeVideo

The definitive guide to software development

Five key trends and five best practice tips to help you improve your programming capabilities 09 Oct 2008

Podcast imageAudio

Computing podcast - IT implications of the banking crisis, and the FSA clamps down on IT security

We discuss the effect of shotgun mergers and acquisitions on financial services IT staff, and examine the industry regulator's plan to fine directors for information security breaches 09 Oct 2008

Latest in-depth articles

Financial Services Authority buildingAnalysis

FSA threatens executives with fines

Senior management to be held accountable for security lapses at banks 09 Oct 2008

Comment

Broadband must be a spending priority

For the economic health of the nation, the government would do better to bankroll an optical fibre rollout rather than prop up profligate banks 09 Oct 2008

Advertisement

Primary Navigation