Technology news and Jobs
The Linux distillery
Developing for Linux netbooks
The Linux distillery
Developing for Linux netbooks | Developing for Linux netbooks |
|
| by David M Williams | |
| Monday, 07 July 2008 | |
|
Page 2 of 3 Now, netbooks are priced at a low level; I think that’s been said enough times already. Linux certainly was a major enabler in this because it eradicates any reason to pay licensing fees for the software driving the device. Yet, let’s be reasonable: Linux can’t take all the credit for the low price. The fact is netbooks have much lower specifications than any modern laptop.Featured Whitepaper
5 Best Practices for Smartphone Support
Perhaps tellingly, the more expensive Windows XP version of the Aspire One is equipped with 1.5Gb RAM. One option canvassed on varying forums is to purchase the Windows XP version and then trash the Windows XP installation, replacing it with one’s preferred Linux distro, or perhaps BSD UNIX in some cases. This isn’t the best route given you’re not just paying for better hardware but also for Windows XP. Nevertheless, it emphasises the general consensus that netbooks aren’t typically regarded as having available memory in elephantine quantities. Let’s get onto some actual matters of code. First, it may be helpful to work out how much RAM you have to play with so that your application can make different decisions. Say, for instance, you were writing a chess game. Your computer controlled player would want to make reasonably intelligence moves and you can achieve this by calculating the state of the chess board in advance and then placing pieces according to the routes which seem to lead to more favourable outcomes. Knowing the amount of RAM available will permit you to increase or decrease the number of moves ahead the computer player can peek. Under Linux you can view the current state of memory on the running system by examining the plain text file /proc/meminfo. The format varies somewhat depending on the distro but if you inspect the version on your system now you will see it includes both some high-level statistics and then a longer list of individual statistics. The MemFree figure is, as you might expect, the amount of free memory at the time of checking. Check it out directly via the command grep MemFree /proc/meminfo. To work out the available screen resolution you should inspect the output of the xdpyinfo command. Specifically, search for the line containing the string “dimensions:” like so: [david@dmw ~]$ xdpyinfo | grep ‘dimensions:’ Dimensions: 800x480 pixels (283x170 millimetres) xdpyinfo is a little-known utility that displays information about an X-Windows server. It examines the capabilities of the server and can give detailed information about the screens and visuals available. For our immediate purposes, being able to determine the screen size at run-time is very useful because an app can then sensibly resize itself to suit. Perhaps it may shrink the icons used on a toolbar, or make toolbars floating instead of docked or do other things to avoid the bottom of the window falling off the screen. It’s possible, depending on your needs, xdpyinfo has other valuable information for you too. What else should you consider when coding for a netbook? CONTINUED |
| < Next story in category | Previous story in the category > |
|---|








