Raspberry Pi: Fixing UK Keyboard Settings

Raspberry Pi: “Can’t open file to write”

Just got my first Raspberry Pi and was excited to get it booted up.  

First problem:  The keyboard is set to UK.
Solution: Edit the keyboard config file > etc\default\keyboard

Second problem: Can’t edit the keyboard file.
Solution: Start the GUI using the command line: sudo startx

Hope this helps!

Android Development Tips: Eclipse Error Failed to allocate memory: 8

Background

I not new to programming but I am new to developing for Android mobile platforms so I was excited to begin learning how to develop apps for Android.  As I’m just about to get the SDK to run my first “Hello World” app on a the device emulator I got and error: “Failed to allocate memory: 8”.

Editing the virtual Android device settings manually in Android Virtual Device Manager for the device I had named VirtNexus7.

The fix for “Failed to allocate memory: 8”?

On my Windows 7 PC I had to go to: C:\Users\[User Name]\.android\avd\VirtNexus7.avd\Config.ini Edit the config file with a text editor.

In this case I had to change “hw.ramSize=1024” to “hw.ramSize=1024MB”.

Also, to avoid such headaches, I would recommend that you only use the Android Virtual Device Manager’s built-in virtual device presets to build your virtual device.  I’ve never had a problem when I’ve used it create new virtual devices for testing.

Below are the settings from the Config.ini file that I had created manually for the emulated virtual Nexus 7 device:

avd.ini.encoding=ISO-8859-1
hw.dPad=no
hw.lcd.density=213
sdcard.size=1024M
hw.cpu.arch=arm
hw.device.hash=-2113695447
disk.dataPartition.size=300M
hw.gpu.enabled=yes
skin.path=800×1280
skin.dynamic=yes
hw.keyboard=yes
hw.cpu.model=cortex-a8
hw.ramSize=1024
hw.device.manufacturer=Google
hw.sdCard=yes
hw.mainKeys=no
hw.accelerometer=yes
skin.name=800×1280
abi.type=armeabi-v7a
hw.trackBall=no
hw.device.name=Nexus 7
hw.battery=yes
hw.sensors.proximity=no
image.sysdir.1=system-images\android-17\armeabi-v7a\
hw.sensors.orientation=yes
hw.audioInput=yes
hw.camera.front=none
hw.gps=yes
vm.heapSize=32