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
Warrington, United Kingdom | Environment Agency
Programme Manager, Warrington, Salary and package to attract the best Part of the Business Solution Department within the Environment Agency's Corporate Information Services Team, this position requires a highly capable and experienced programme manager to ... more >
Burnley, United Kingdom | HML
Business Project Manager, Padiham, Burnley Homeloan Management Ltd (HML) is the UK's leading provider of outsourced mortgage administration services. Our client portfolio includes some of the largest players in the UK financial market and we ... more >
Ross-on-Wye or Blackpool, United Kingdom | PGL & NST
IT Director, Ross-on-Wye or Blackpool, C£80,000 Holidaybreak Plc Education Division comprises market leading educational holiday's operator PGL and educational tours organiser NST. It is a £100m business employing over 3,000 staff across 2 head office ... more >
United Kingdom | Bloomberg LP
Desktop Support - 21284 The Company Bloomberg is the leading global provider of financial data, news and analytics. The BLOOMBERG TERMINAL and Bloomberg's media services provide real-time and archived financial and market data, pricing, trading, ... more >
More job opportunities