Warning this article may contain opinions of the author that you and iTWire don't agree with.
Visit the last page to have your say in our forum.

No. 1 Story

Telstra adds one million mobile services, but Sensis plummets

Telstra has revealed the addition of almost one million new mobile services in the six months to December 2011, but Sensis revenues plummeted 24 percent in 12 months.

read more

Fix Wikipedia, add Facebook to the ASUS Eee Linux PC

Opinion and Analysis

Moving away from web sites, the 3G network wizard, pre-update read


/usr/bin/sudo /usr/bin/xncswizard


and post-update becomes


/opt/xandros/bin/eeepc-3g.sh


free hit counter
The eBook reader, originally, read


/opt/bin/XandrosFileManager ~/My\ Documents/My\ Ebooks -caption File\ Manager -maximized


whereas subsequent to the patch has become the inscrutable


asus-eeepc-ebook.desktop


The solution to all these missing icons is to restore the entry to the original wording. The best option is to make your own copy of the configuration file in your home directory, leaving the system-wide config file untouched. You can do this by calling up a terminal window by pressing CTRL + ALT + T and then entering the following commands:


mkdir ~/.AsusLauncher
cp /opt/xandros/share/AsusLauncher/simpleui.rc ~/.AsusLauncher
kate ~/.AsusLauncher/simpleui.rc


Kate is a graphical text-file editor. Find the erroneous entries in your simpleui.rc and correct them by replacing them with the entries above.

Note that for the eBook reader the format is slightly different. The two web sites and the 3G wizard commands just need to replace their counterparts. In the case of the eBook reader you need to change

shortcut=”asus-eeepc-ebook.desktop”


to


extraargs=”/opt/bin/XandrosFileManager ~/My\ Documents/My\ Ebooks -caption File\ Manager -maximized”


Be careful about the direction of the slashes in the command above; a forward slash (“/”) in Linux represents a folder or directory. A backslash (“\”) is used to escape a special character. In this case, it precedes a space which makes the space, and the text following, as part of the text string. For example, the window caption is “File Manger”, as indicated by the text File\ Manager. Without escaping the space the caption would be “File” and the word “Manager” would be considered another, syntactically-incorrect, parameter to the XandrosFileManager command.

So, why the switch? Why did ASUS take a working config file and break it? I believe the intentions were positive, even though clearly the execution was poor.

Originally, the Wikipedia icon – for example – merely loaded the Firefox web browser, as above. However, with the update ASUS farmed out this simple instruction to a specialised shell script (namely /opt/xandros/bin/eeepc-wikipedia.sh); the fact they then neglected to bundle this script with the update was the cause of the missing icon.

Looking at other scripts in the /opt/xandros/bin directory gives insight. One example is /opt/xandros/bin/p701-yahoo.sh which according to simpleui.rc is the command called when the Yahoo webmail icon is clicked. This script reads as follows

#!/bin/sh


locale=`printenv LC_ALL`
if [ “$locale” = “zh_CN.UTF-8” ]; then
  /opt/firefox/firefox
http://cn.mail.yahoo.com
elif [ “$locale” = “zh_TW.UTF-8” ]; then
  /opt/firefox/firefox
http://tw.mail.yahoo.com
else
  /opt/firefox/firefox
http://login.yahoo.com
fi


What this script does is check the system locale, ie the user's region setting, and then load a different version of Yahoo for Chinese and Tiawanese users than for the rest of the world.

The other scripts in /opt/xandros/bin work in a similar way. So, it is easy to imagine, then, that ASUS' intentions were to provide a shell script which, similarly, loaded a different Wikipedia URL depending on the user's language and region.

Let's make our own icons ...


CONTINUED








- sponsored feature -

The Death of Traditional BI: What’s Next?

How to Make Business Discovery Work for Your Business IP PABX BUYING GUIDE

Business Discovery takes its cues from consumer apps. Like Google, it encourages us- ers to hunt for and explore data without worrying about or even noticing the underly- ing technology. Their entire experience is working within an intuitive interface to get real-time, self-service results with only minimal training. ...more