Friday, November 30, 2012

Can't run Windows 8 on VirtualBox if host proc does not support VTx/AMD-v proc

Can't run Windows 8 virtual machine using VirtualBox (4.2.4) on Dell 610 machine :(

Error message says:

VT-x/AMD-V hardware acceleration is not available on your system. Certain guests (e.g. OS/2 and QN) require this feature and will fail to boot without it

Looks like Win8 needs VT-x/AMD-V hardware to work.


Sunday, November 25, 2012

Get memory information in Ubuntu from the command line

To get memory information from the command line, do:
$: sudo lshw -class memory

The above command should show something like:
       description: BIOS
       vendor: Winbond Electronics
       physical id: 0
       version: A06
       date: 10/02/2005
       size: 64KiB
       capacity: 512KiB
       capabilities: isa pci pcmcia pnp upgrade shadowing cdboot bootselect int13floppy720 int5printscreen int9keyboard int14serial int17printer int10video acpi usb agp smartbattery biosbootspecification netboot
       description: L1 cache
       physical id: 700
       size: 8KiB
       capacity: 8KiB
       capabilities: internal write-back data
       description: L2 cache
       physical id: 701
       size: 2MiB
       capacity: 2MiB
       clock: 66MHz (15.0ns)
       capabilities: pipeline-burst internal varies unified
       description: System Memory
       physical id: 1000
       slot: System board or motherboard
       size: 2GiB
          description: DIMM DDR Synchronous 533 MHz (1.9 ns)
          vendor: Hynix Semiconductor (Hyundai Electronics)
          physical id: 0
          serial: 00005128
          slot: DIMM_A
          size: 1GiB
          width: 64 bits
          clock: 533MHz (1.9ns)
          description: DIMM DDR Synchronous 533 MHz (1.9 ns)
          vendor: Hynix Semiconductor (Hyundai Electronics)
          physical id: 1
          serial: 00004128
          slot: DIMM_B
          size: 1GiB
          width: 64 bits
          clock: 533MHz (1.9ns)

Get CPU information in Ubuntu from command line

Method 1: Using lshw

$: sudo lswh -class cpu

This will show something like:
       description: CPU
       product: Intel(R) Pentium(R) M processor 2.13GHz
       vendor: Intel Corp.
       physical id: 400
       bus info: cpu@0
       version: 6.13.8
       slot: Microprocessor
       size: 2133MHz
       capacity: 2133MHz
       width: 32 bits
       clock: 133MHz
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2 cpufreq

Method 2. Using special /proc, like:
$: cat /proc/cpuinfo

processor      : 0
vendor_id      : GenuineIntel
cpu family     : 6
model          : 13
model name     : Intel(R) Pentium(R) M processor 2.13GHz
stepping       : 8
microcode      : 0x20
cpu MHz        : 800.000
cache size     : 2048 KB
fdiv_bug       : no
hlt_bug        : no
f00f_bug       : no
coma_bug       : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 2
wp             : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe nx up bts est tm2
bogomips       : 1596.16
clflush size   : 64
cache_alignment: 64
address sizes  : 32 bits physical, 32 bits virtual
power management:

Installing Ubunut 12.10 via netinstall on Eee PC 900

I have a pretty old Eee PC 900 that have been running Arch Linux for awhile. I did an update lately and it borked it beyond my knowledge how to repair.

So, I was thinking why not use Ubuntu minimal install? I am pretty familiar with Ubuntu/Debian distribution, fixing it should be much easier as I am familiar with the distro. As an aside I am planning to use it as a web server and i don't want to update the machine weekly to keep up with the latest Arch packages.

Ubuntu 12.10 minimal installation is very easy now a days  It is as easy as installing Windows :). Anyway, I used a copy from Ok, I am still using a lot of Windows machine ;(, so burning it to USB flash I used unetbootin.

Below are the sequence/options I have selected/or data supplied.

  • Turn off Eee PC 900
  • Connect flash drive (flashed with Ubuntu mini iso using unetbootin)
  • Turn of Eee PC 900, press ESC to view boot options
  • Select "Install" from the menu.
  • English for the "Select a Language".
  • United States for "Select your location"
  • No on "Configure the keyboard"
  • English (US) on "Configure the keyboard" - Country of origin for the keyboard
  • English (US) on "Configure the keyboard" - Keyboard layout
  • eth0 on "Configure the network" Primary network interface
  • eeepc900 on "Configure the network" hostname
  • United States on Choose a mirror of the Ubuntu archive
  • on Choose a mirror of the Ubuntu archive - Ubuntu archive mirror
  • Blank (nada) on Choose a mirror of the Ubuntu archive - HTTP Proxy information
  • username lastname on Set up users and passwords - Full name for the new user
  • username on Set up users and passowrds - Username for your account
  • password on Set up users and passwords - Choose a password for the new user
  • password on Set up users and passwords - Re-enter password for verify
  • No on Set up users and passwords - Encrypt your home directory
  • Yes on Configure the clock - Is this time zone correct
  • In Software Selection, I selected
    • LAMP server
    • Lubuntu minimal installation

Ubuntu 12.10 minimal install have difficulty working with the partitions created by Arch. I have to delete the partitions manually before the installation can proceed.

Android Blogger client force closes - not usable

Blogger client force closes in my Droid Razr Maxx, can't use it at all :(.

This was observed with Blogger v2.0.

Ok, reboot of the phone fixes it.

Personal best ssh client for Android

Remotely connecting to Linux securely in Android is like a walk in the park, ssh clients abound in Google Play Store. But ssh clients are not created alike. Some are designed with specific hardware in mind and for those who like to use physical keyboards, like Droid 3, you probably want to use all the keys. I have tried Terminal IDE, ConnectBot, Android Terminal Emulator but none of them work as I would have hoped. Like using ~, tab key for command line completion, display mc (Midnight Commander) properly. But one actually meet my need today, VX ConnectBot. In my understanding it is based on ConnectBot with changes to allow a much more pleasant experience using hardware keyboard. Try it for yourself, download from Google Play Store.

* Tested using Droid Razr Maxx using stock OS and Droid 3 using ICS.

Saturday, November 24, 2012

Changing default port used by Apache

Not sure if this is the right way to do it, searching the blogoshpere seems to indicate that this might be the case.

Steps to change default port that Apache listens on:
  1. As good practice make a copy of the file ports.conf to somewhere safe. Like
    • mkdir ~/bak
    • cp /etc/apache2/ports.conf ~/bak
  2. Open and edit ports.conf, like sudo vim /etc/apache2/ports.conf.
  3. In Ubuntu 12.10, change Listen 80 to Listen 81. This should be around line 9, of course change 81 to a value that you need.
  4. Restart Apache to enforce the changes, like sudo /etc/init.d/apache2 restart.


Wednesday, November 21, 2012 alternative is my goto location when I need to call native functions into C#. I just found out today that there is actually an alternative from Microsoft called P/Invoke Interop Assistant, head to the link below to get the binaries.

Check if a file exists on a remote site

To check if a file exists on a remote site (say a web site), do the following:

$: wget --spider

The above command checks if a stable version of Google Chrome exists in the remote location specified.

Saturday, November 17, 2012

Windows 8 Mouse Tips and Tricks

Work in progress!!!

Mouse Gesture What it does
Click anywhere Lock screen: brings up login screen
Move mouse to corner bottom left, then click popup icon Either shows Start(home) screen or desktop screen
Move mouse to corner top left, then click popup icon Cycle through running applications
Move mouse to corner bottom(or top) left, then move mouse up Show running applications
Move mouse to corner bottom right Show Charms bar
Right Click in Doc area IE10MUI: Brings up address bar and tab bar

* IE10MUIE: IE10 Moderun UI

Windows 8 Shortcuts

Work in progress!!!

Keyboard Shortcut Action
Win Key Windows 8 Home Screen
Any Key Lock Screen - brings up login window
Page Down/Page Up In W8 Home Screen, move between tile groups
Win+C Open Charms bar
Win+Q Bring up integrated/semantic search
Win+f Search for Files
Win+I Charms bar Settings
Win+K Charms bar Devices
Win+Tab See running applications
Win+D Show Desktop