Friday, August 14, 2009

Yum and RPM notes for multiarch machines

When installing something on a stock 64bit installation, yum will by default install both x86_64 and i386 (if available) packages. This default behavior is often appearing when installing libraries and can be changed
by adding the following to /etc/yum.conf

multilib_policy=best

(default to all). In this way only the matching arch package will be installed.

If you don't want to make this global change, you can issue the yum command as follows to have the same outcome but for one time only:

yum install libtool-ltdl.x86_64

i.e. append the arch to the package name to avoid i386 package to be pulled along.

Querying the rpm database on x86_64 machines often shows duplicate packages, but that's normal in light of the above. You can change the default query format on the fly, e.g

rpm --qf '%{NAME}.%{ARCH}\n' -q glibc

or you can make it global by adding this to /etc/rpm/macros
%_query_all_fmt         %%{name}-%%{version}-%%{release}.%%{arch}
In this way the arch will be shown alongside other query parameters.

Sunday, July 26, 2009

Accessing the guest OS from the host using VirtualBox

To be able to access the guest OS via ssh fro the host, type the following on the host

$ VBoxManage setextradata Centos\ 5.3\ x86\ bis "VBoxInternal/Devices/pcnet/0/LUN#0/Config/SSH/HostPort" 3333
 $ VBoxManage setextradata Centos\ 5.3\ x86\ bis "VBoxInternal/Devices/pcnet/0/LUN#0/Config/SSH/GuestPort" 22
$ VBoxManage setextradata Centos\ 5.3\ x86\ bis "VBoxInternal/Devices/pcnet/0/LUN#0/Config/SSH/Protocol" TCP

(SSH is just a string, you can type anything really). Then you can login to the guest OS by typing this on the host:

$ ssh -p 2222 -X root@localhost

note the same principle applies to other services, example for httpd:

$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/HostPort" 8888
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/GuestPort" 80
$ VBoxManage setextradata GuestName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Apache/Protocol" TCP

then you can point the host browser to http://localhost:8888. Note that you can’t use a host port lower than 1024 without running VirtualBox with escalated privileges.

To see settings use:

$ VBoxManage getextradata guestname enumerate

To clear a setting (by giving it a clear value) use:

$ VBoxManage setextradata "VBoxInternal/Devices/pcnet/0/LUN#0/Config/ssh/GuestPort"

Virtual lab with VirtualBox

To get two virtual guests to talk to each other while also being able to reach out to rpm repos etc. (i.e.  to inernet), one needs to define two interfaces on the VirtualBox guest OS settings:

  • first interface (will be eth0) should use default NAT setting. This will provide Internet access.
  • second interface (will be eth1) should use 'Internal Network'. This will provide in-between guests connectivity.

When booting the guest (Centos in my case), eth0 will come up via DHCP, then configure eth1 with a static non routable IP address. However when bringing it up, it will override DNS and default GW as set by eth0, therefore breaking internet access. The fastest path recover is to simply restart eth0 (ifdown eth0/ifup eth0) which gets again the correct settings from the dhcp server.

Tuesday, June 9, 2009

Using IPod Nano on EeeUbuntu

The Nano is formatted with hfsplus (used under MacOSX earlier) hence when plugged under Ubuntu Linux is mounted read-only. To have it mounted read-write you need to plug it on Mac and then issue this command

$ diskutil disableJournal /Volumes/Somebody’s\ iPod/

this will remove the journal from the HFS+ filesystem, and now Linux will mount it read-write. Then use whichever application to manage your songs.

Wednesday, April 22, 2009

Speeding up firefox 3

In the about:config enable the setting network.dns.disableIPv6 (double click will suffice).
Then install the Flashblock Firefox extension to load the Flash stuff only when you want.
Additionally try to use the fastest SDD drive for the FF cache, instructions below:

  • Open a new tab and type about:config into the address bar.
  • Right-click anywhere in the lower part of the screen and choose new->integer.
  • Name the new setting ‘toolkit.storage.synchronous’
  • In the second popup, set the value to 0 (zero). This tells the browser not to wait while writing files.
  • Create a new string called ‘browser.cache.disk.parent_directory’
  • Set its value to ‘/dev/shm/firefox-yourusername’. This tells the browser to use a RAM disk instead of the SSD.
The above procedure placaes the cache in the RAM, however this means it will be lost when shutting down the computer.

update Xandros to Firefox 3

Looking to upgrade to firefox 3 under the original Xandros distribution, after some trial and error I came to find that Asus has actually published updates for Firefox 3 and associated stuff like Flash Player. To do it add this entry to the apt source file

deb http://update.eeepc.asus.com/1.6/ common main

(comment out the original entry). Now the following command will upgrade to Firefox 3 and Flash Player 10 (only partial output shown):

# apt-get update
# apt-get install firefox-upgrade

Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
adobe-flash-player firefox firefox-extension-default firefox-locale-de gtk2-engines libc6 libcairo2 libdatrie0 libglib2.0-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
libpango1.0-0 libpango1.0-common librsvg2-2 librsvg2-common libthai-data libthai0 locales tzdata
Suggested packages:
glibc-doc libc6-i686 ttf-kochi-gothic ttf-kochi-mincho ttf-thryomanes ttf-baekmuk ttf-arphic-gbsn00lp ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp
librsvg2-bin
Recommended packages:
libglib2.0-data x-ttcidfont-conf
The following NEW packages will be installed:
firefox-upgrade libdatrie0 libthai-data libthai0
The following packages will be upgraded:
adobe-flash-player firefox firefox-extension-default firefox-locale-de gtk2-engines libc6 libcairo2 libglib2.0-0 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common
libpango1.0-0 libpango1.0-common librsvg2-2 librsvg2-common locales tzdata
17 upgraded, 4 newly installed, 0 to remove and 62 not upgraded.
Need to get 32.9MB of archives.
After unpacking 10.8MB of additional disk space will be used.

Friday, April 17, 2009

David and Goliath

Today I decided to try to use my Samsung HDTV as external monitor for my EeePC. Plugged the VGA cable on both end and then needed to start the Gnome Display setting GUI to trigger the detection of an external monitor. Once found it presented me a list of resolutions and I chose the highest one (1024 x 768, 4:3 format) available. Restarted X and done.

Interestingly, when replugged the HDTV a second time, I was offered yet a higher resolution for it, 1360 x 768, 16:9 format. Much better for movies, so I set this one instead and below are the two displays for comparison. Nice.

Friday, April 10, 2009

tuning the EeePC 901

installed eee-control on the EeePC 901 (eeebuntu 2) and all hardware is really nicely integrated now. Also installed cheese and webcam tested ok. So far I am impressed.

removing Mono from EeeUbuntu

I removed the Mono stuff from my eeeubuntu (because I can and I want to) with

# sudo apt-get remove --purge mono-common libmono0


this removes Banshee and F-Spot which I then replaced by other applications with

# sudo apt-get rhythmbox gthumb

Thursday, April 9, 2009

Installing EeeUbuntu on EeePC second drive

After adding a 16GB SDHC card, used usb pen drive to install eeeubuntu. Hower the only drive seen is /dev/sda which corresponds to the orignal SDD drive used by Xandros Linux.

To have the second drive appear among the available drives within the eeeubuntu installation program, one need to format the second drive (SDHC card) and set the bootable flag. Only then it will appear and so I could install eeeubuntu on it, leaving the original distribution untouched (for now).

Tuesday, April 7, 2009

CLI dvd copy

You need the package wodim. Then is a matter of ripping

$ readom dev=/dev/scd0 f=/path/to/image.iso

and copying

$ wodim -v -eject /path/to/image.iso

Sunday, April 5, 2009

Installing the full desktop (advanced mode) on the EeePC 901

Steps below:

1. "CTRL-ALT-T" to terminal
2. "sudo bash"
3. "apt-get update" to get updates for 900
4. "sudo synaptic" to start Package Manager
5. Click "Settings" , "Repositories"
6. Click "New"
7. URL is "http://update.eeepc.asus.com/p701/"
8. Distribution is "p701"
9. Section(s) is "main"
10. Click "OK" to save
11. Click "Reload" to include p701 in addition to the 900 repositories
12. "File" , "Quit" to exit
13. "apt-get install kicker ksmserver"
14. "exit" to quit terminal
15. now click shutdown and choose reboot to "Full Desktop" from menu

also tried to use the p901 and p900 repos but no luck, p701 seems to be the only way to go.

Saturday, April 4, 2009

Getting Acrobat reader in english on EeePC

To have Acrobat Reader in english on a german EeePC run

# apt-get remove acroread-de

then only the acroread package will be left on the system and Acrobat Reader now will be in english.

changing default language in EeePC

Just receive my EeePC 901 GO (Linux version) and being in Germany it came with an out of the box german user interface, fair enough. Hower I wanted to have all software in english so after some research this is what I did to achieve this:

edit the file /etc/default/locale and replace

LANG=de_DE.UTF-8

with

LANG=en_EN.UTF-8

then reboot, and you will be greeted in english and all applications including the custom ASUS user interface) will be in english.