Jedit screenshot
Using Jedit and Mono on an Eee PC
R E L A T E D   C O N T E N T
ADVERTISEMENT

Hands On: Write applications for your Eee

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

Tim Anderson, Personal Computer World 16 Apr 2008
ADVERTISEMENT

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.


All Laptops & Portables
Tags: Write, Eee PC

Like this story? Spread the news by clicking below:

Post this to Delicious del.icio.us    Post this to Digg Digg this    Post this to reddit reddit!

Permalink for this story
R E A D E R   C O M M E N T S
M A R K E T P L A C E
Get your free demo of Numara Track-It! 8 - the leading help desk solution for IT related issues.
Make presentations, review documents & share your entire desktop. 30-day free trial! (cc required).
Discover how remote support can fuel your IT business in ways you've never thought of before.
Apply ITIL best practices at your service desk while eliminating integration cost. Learn more here.
WAN based, automated, daily vulnerability assessments. Click here to try and request our whitepapers.
Have your product or service listed here >   
Sponsored links
F E A T U R E D   J O B S
Nottingham, United Kingdom | ACAS
Project and Portfolio Managers, Nottingham, £35,847 - £46,357 The Advisory, Conciliation and Arbitration Service (ACAS) is a publicly-funded body with over 30 years experience of working with employers, employees and trade unions to deliver better ... more >
United Kingdom | Sumisho Computer Systems (Europe) Ltd
System Engineer Sumisho Computer Systems (Europe) Ltd provide customers with a world of enhanced IT solutions. The role will involve maintenance of Oracle database server and web application server. The candidate must be able to ... more >
London, United Kingdom | ACAS
Business Applications Analyst, London, £28,683 - £38,470 The Advisory, Conciliation and Arbitration Service (ACAS)] is a publicly-funded body with over 30 years experience of working with employers, employees and trade unions to deliver better employment ... more >
Leeds, United Kingdom | UKCRN
Application Development Team Leader, Leeds Part of the UKCRN IS Applications development team, you'll be responsible for leading the team behind a programme of IS developments to improve the IS environment for clinical research across ... more >
More job opportunities