Permalink 08:01:35 pm, by neilb Email , 184 words, 4468 views   English (US)
Categories: Announcements [A]

Lid Manager

I like to use my 701 Eee PC as a portable music player. I especially like playing FLACs which is my music ripping codec of choice. The relatively bulky size of the Eee PC is not an issue for me as I throw the Eee PC in my backpack. The main pain is the shenanigans necessary to stop the closing of the lid from switching off the processor.

lidman on the taskbar

So to solve the problem I wrote a cool tool - aka lidman. Lidman sits in the EeePC system tray and with a click of the right mouse you can control whether shutting the lids switches off the processor - or not.

After a few months of testing, it has operated flawlessly. So now to release it.

I’ve put the downloads on a separate page. The tool is free – though a small donation is always appreciated!

I’ll be releasing the code as open source soon via my repo.

Please add feedback/issues as comments.

[Edited 2009-01-01 Note I developed this on the 701. Feedback I’m getting says it works on later versions eg 901. Let me know if you have any issues.]


Permalink 04:53:23 pm, by neilb Email , 229 words, 5035 views   English (US)
Categories: Announcements [A]

Adsense and EeePC : oil and water

As a recent upgrade to my EeePC blog musings I decided to sign-up for AdSense. The hit rates to the site suggested that I should just be able to cover my web costs. However, due to the way that AdSense integrates with a webpage, any one surfing to my site with a standard EeePC will not see any ads. So not only am I way late to the AdSense party, I forgot the beer and they won’t let me in. Of course to many the ads will be no great loss, but not good for me.:'(

The reason behind this problem is that AdSense uses iframes to wire up its context sensitive ads with a given webpage. Unfortunately the default firefox browser on the EeePC does not support this technique and consequently no ads appear to those who read my blog using an EeePC which given that that is the topic of my blog is not very useful. In the process I’ve discovered that about 10% of the people who do visit the site are not using firefox, so I’m still getting some page count revenue but not at the level I was hoping.

Now I need to figure out if there is a “google-legal” way around the issue.

Out of interest here is user-agent info on the EeePC default browser.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20070914 Firefox/


Permalink 07:29:13 pm, by neilb Email , 723 words, 4204 views   English (US)
Categories: Developing for the Eee

Adding a UI Entry in a package

More on the process of packaging. Here is how to automatically add an entry into the desktop that will launch an application in your package.

If you have developed any UI code for the Eee PC, you are likely aware that the Eee PC stores its desktop entries in a file called


Take a look at this file on your system. It is an XML format file. Each entry is composed of a block of XML of the element <parcel>, so for example here is the entry for firefox

<parcel simplecat="Internet" shortcut="/opt/firefox/firefox.desktop"
<name lang="en">Web
<name lang="zh_TW">網路瀏覽器
<name lang="zh_CN">网页浏览器
<name lang="es_AR">Web
<name lang="de_DE">Web
<name lang="es_ES">Web
<name lang="fr_FR">Web
<name lang="it_IT">Web
<name lang="nl_NL">Web
<name lang="pt_PT">Internet
<name lang="ru_RU">Веб
<name lang="th_TH">เว็บ
<name lang="tr_TR">Web

This adds the firefox application to the Internet page of the desk top and associates icons for the selected and unselected states. The various names entries add names for various languages.

So to add a UI entry, we need the package to automatically add a parcel entry to the simpleui.rc file for your application.

Since XML uses end tags to close off the data format we need to effectively edit the file (as opposed to just appending to the file). The best tool to use is therefgore sed. Here is some sed code that automatically adds an entry to the UI.

sed -e '/<\/simpleui>/i\
<!-- MySpecialProgram version=1.0 { -->\
<parcel simplecat="Play" extraargs="/usr/bin/sudo /home/user/bin/myspecialprogram" \
icon="sysinfo_norm.png" \
selected_icon="sysinfo_hi.png"> \
<name lang="en">My Special Program</name>\
<name lang="zh_TW">My Special Program</name>\
<name lang="zh_CN">My Special Program</name>\
<desc lang="en">Does some cool stuff</desc>\
</parcel> \
' simpleui.rc

This code inserts a chunk of XML prior to the end of the UI control file that will add an entry to the “Play” tab to run the program /home/user/bin/myspecialprogram. In this case, I’ve assumed that myspecialprogram does some system stuff and so is launched with sudo. I’ve used the technique of wrapping the XML block in structured comments. This allows future edits to the UI file to move the XML block and yet it can still be located.

Of course, your users may not actually like your app and want to uninstall it. Here is the code to do just that.

sed -e '/<!-- MyTool version=1.0 {/,/<!-- } MyTool version=1.0 -->/d' /opt/xandros/share/AsusLauncher/simpleui.rc

To use this as part of the package we need to call the code from the scripts in the package DEBIAN directory. I use the postinst script file to perform the add and the prerm script to do the remove. So in the package DEBIAN directory

put the file postinst with the code

#! /bin/sh
sed -e '/<\/simpleui>/i\
<!-- MySpecialProgram version=1.0 { -->\
<parcel simplecat="Play" extraargs="/usr/bin/sudo /home/user/bin/myspecialprogram" \
icon="sysinfo_norm.png" \
selected_icon="sysinfo_hi.png"> \
<name lang="en">My Special Program</name>\
<name lang="zh_TW">My Special Program</name>\
<name lang="zh_CN">My Special Program</name>\
<desc lang="en">Does some cool stuff</desc>\
</parcel> \
<!-- } MySpecialProgram version=1.0 -->\
' /opt/xandros/share/AsusLauncher/simpleui.rc > /tmp/lidman-simpleui.rc
mv /tmp/lidman-simpleui.rc /opt/xandros/share/AsusLauncher/simpleui.rc

and put the file prerm with the following contents

#! /bin/sh
sed -e '/<!-- MyTool version=1.0 {/,/<!-- } MyTool version=1.0 -->/d' /opt/xandros/share/AsusLauncher/simpleui.rc
mv /tmp/lidman-simpleui.rc /opt/xandros/share/AsusLauncher/simpleui.rc

NOTE that both files use the absolute location of the simpleui.rc file.

As a final piece, ensure that the package depends on “sed” by putting

Depends: sed

in the DEBIAN/control file. This is a just for completeness issue. Eee PCs come with sed installed.

More on packaging to follow in future blog entries.


Permalink 09:14:19 pm, by neilb Email , 349 words, 10930 views   English (US)
Categories: Developing for the Eee, Cool Eee

Using USB-Audio

Setting up an external usb device for use with the eeepc music manager (aka amarok) can be challenging. The following steps should work. Unfortunately, you will need to use the command line.

Ensure your usb audio player is plugged in and powered up. I have an m-audio audiophile.

m-audio audiophile usb

Type control-t to bring up the terminal to enter commands.

Into the terminal window, type:

cat /proc/asound/cards

This will list the target cards that can be used by the music manager. Your usb device should be listed. If not, check cabling and that the device is powered up and working. If the device is not listed in this list none of the following steps will work. I’ll assume that you only have the standard device and your usb device. Therefore your card should also be numbered card 1.

Now edit the file ~/.asoundrc. BTW the ~ is a short cut for your home directory.

If you have a favourite editor use that, otherwise type the following into the terminal window:

kate ~/.asoundrc

Kate is an easy to use visual editor. Add the following lines.

pcm.intel8x0 {
type plug
slave.pcm "hw:0"

ctl.intel8x0 {
type hw
card 0

pcm.usb-audio {
type plug
slave.pcm "hw:1"

ctl.usb-audio {
type hw
card 1

This associates card 1 with the name usb-audio. If your card is not card 1, then change each of the two 1s in the pcm.usb-audio and ctl.usb-audio sections.

Now save the file and start up the music manager (if it was already running, restart it).

Select the Setting/Configure Music Manager… dialog and the engine tab.

If the xine engine is not in use, select it and hit the apply button. If alsa is not the selected output plugin, then select it from the drop-down and hit apply.

In the stereo field, type:


and hit apply.

Eeepc Music Manager Engine Settings

Your usb-audio device should now be the target of your eeepc music manager. You should now be able to enjoy music via your usb-audio device.

To change back, use default as the stereo field value. If you run into problems, delete the ~/.asoundrc file.


Permalink 02:18:41 pm, by neilb Email , 82 words, 7021 views   English (US)
Categories: Announcements [A]

Eee Network Performance

Highly acceptable! Very subjective but here’s the scene: My trusty old Xbox with Xecutor 3 running xbmc wirelessly streaming a hdtv show off Eee via an SMB share as the Eee simultaneously wirelessly streams it off the web. Flawless.

Of course you might ask why not direct to Xbox? It doesn’t do a good job of simultaneous downloads and play.

Even better the Eee consistently streams faster from the web than my dual 3GHz XP box. Small amounts (few 10KB/s) but noticeable.

:: Next Page >>

Digital Annealing Eee PC Blog

| Next >

August 2017
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    


Choose skin



XML Feeds

What is RSS?

Who's Online?

  • Guest Users: 2

powered by b2evolution free blog software