The Linux distillery
Bringing the world of Linux to you, David cuts through the tech and shows you how it works and how to use it, in terms that apply to any distro. RSS
IT NEWS      Sustainability        - Virtualisation   
Technology news and Jobs arrow The Linux distillery arrow Fix Wikipedia, add Facebook to the ASUS Eee Linux PC
Fix Wikipedia, add Facebook to the ASUS Eee Linux PC PDF E-mail
User Rating: / 11
PoorBest 
by David M Williams   
Wednesday, 30 January 2008
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


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








 
< Next story in category   Previous story in the category >
  •   *  
  • Search
  • AdvSeach
  • Login
  • Events
  • FreeStuff
Subscribe to our free e-newsletter
First name:
Last name:
Your email address:
Your role:
Your industry:
Australian state:
Country:
Enter the security code shown:
mandatory
Contact , Register , Advertise with iTWire , Links , About iTWire , Feedback , Post your jobs , Events , iTWire site map , Start Blogging , MyBlogLog page
Industry Releases , Submit your release now