How to access the text console of a virtual KVM guest from within virsh

(done on clean installation of Ubuntu 11.10/KVM)

After getting a KVM host up and running on Ubuntu, often the graphical VM management application, virt-manager, is installed.  This useful utility makes it a snap to create new virtual machines and gives ready access to the virtual X desktops via graphic consoles.

However, when it’s time to make a serious use of KVM virtualization in the real world, a workhorse KVM host is more likely to have a number of Linux guest servers running with text consoles instead of X graphic consoles.  This helps to cut down on the total overhead on the host and allows more guest virtual machines to be jammed into a KVM host.

On a CLI-only KVM host, the text-based utility virsh is how one can manipulate the guests on a host.

It only makes sense that virsh would also allow access to the text console of a virtual machine, right…..right?  Let’s try switching to the console of a guest VM:

virsh # list
Id Name                 State
----------------------------------
2 ubu1                 running
virsh # console ubu1
Connected to domain ubu1
Escape character is ^]

Argh, no further output!  No welcome message or command prompt is shown for the ubu1 VM.

It’s annoying at first but the lack of access to the text guest consoles can be resolved by taking these additional steps in the guest VMs:

The guest VM needs its serial console to be populated with a login prompt, which will present itself upon a successful serial connection from virsh.

In the guest Ubuntu VM:

Save some time/work by copying one of the tty configuration files:

sudo cp /etc/init/tty1.conf /etc/init/ttyS0.conf

edit ttyS0.conf and change the line:

exec /sbin/getty -8 115200 ttyS0 xterm

After restarting the guest VM, it’s now possible to use virtsh to get a console to the guest.

As long as we’re getting dirty here, let’s go the whole hog and get guest console to show practically everything!  How about seeing all the kernel messages during a guest boot?

Tell grub2 to output the kernel messages to the serial console.

sudo vi /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=”console=ttyS0″

sudo update-grub2

After restarting the guest, all the kernel messages will zip by until the command prompt is shown.

Bookmark and Share

View Comments   Linux
Related posts:

Inception problem: keymap for ‘a’ key broken inside twice-virtualized Ubuntu KVM guest

Running an Ubuntu virtualized virtual guest inside a virtual KVM host inside VMware Fusion 4 for OSX?

You may have noticed that when ssh -X to the virtual KVM host machine then attaching to virtual guest graphic console (VNC) via the graphical utility, virt-manager, the key ‘a’ doesn’t work!

Alas, a broken keymap! It’s like if Leonardo DiCaprio was running around with a missing right eye in the Inception hotel.

How to fix the easy way?

$ virsh
Welcome to virsh, the virtualization interactive terminal.
Type:  'help' for help with commands
       'quit' to quit
virsh # list
 Id Name                 State
----------------------------------
  2 ubu1                 running
virsh # edit 2

Make sure have keymap=’en-us’ in graphics line.

<graphics type=’vnc’ port=’-1′ autoport=’yes’ keymap=’en-us’/>

Bookmark and Share

View Comments   Linux
Related posts:

Finding IP address of a device on a network.

[zippy] I get asked this question once in a while:

“When I plug in a new device to the network, fresh out of the box and it defaults to getting an IP address via DHCP: how the heck do I find its IP address once it’s powered on?”

In other words, it’s the networking version of “Where’s Waldo?”

The first thing to do is to find the unique MAC address identifying the device which is often labelled on the rear or bottom of the device.  The MAC address is always 12 hex [0-9,A-F] characters long. Example: 0C:4F:22:77:8C:90.

On a small home network, it’s pretty easy to find the device’s IP address.  You can simply login your home router and usually there is an list of devices currently connected to your router.  Find the device matching the MAC address and you’ll find out what its IP address is.

However, on a larger network where you don’t have admin access to the network’s router and don’t want to bother the busy network administrator, this can present a challenge to find which IP address was assigned to your device. On a /24 network, there are 254 usable IP addresses or on a /23 network, there are 510 usable IP addresses.

For this example, a managed switch is powered on the network and it has a HTTP web admin tool on port 80.  You could attempt to find it by visiting each IP address in your web browser. Let’s face it, it would be cumbersome and could take a very long time before you finally hit upon the managed switch.  If you power off the managed switch and turn it back on, it could get a different IP address and you would have to start searching for it all over again!

The easy & lazy (expert) method:

Fortunately, there is a network tool called nmap (or zenmap if want a nice GUI interface). I prefer to use nmap in a native Linux environment so if I’m on OSX or Windows machine, I fire up a Ubuntu virtual machine that has been set with a bridge to the network.  There are nmap versions for Windows and OSX if you don’t have access to Ubuntu. I haven’t personally used them so I can’t attest how well they work.

The managed switch has an open port 80 for its HTTP web admin, so it’s possible to take advantage of that fact to narrow down the search.  The resulting list should also ignore all IP addresses don’t have anything running on port 80 and list only those IP address that have port 80 open.

Running:

$ nmap -p 80 --open 192.168.0.0/23 > results.txt

nmap will connect at port 80 on all usable IP addresses ranging from 192.168.0.1 to 192.168.1.254 then dump the results into a file called results.txt

If you look in results.txt, you’ll find entries such as this one:

Nmap scan report for 192.168.0.6
Host is up (0.0072s latency).
PORT   STATE SERVICE
80/tcp open  http

Results show that 192.168.0.6 has something running on port 80. However, note that there’s still no MAC address listed for 192.168.0.6. The list has to display the MAC addresses so that you can find the IP address that corresponds with your device’s MAC address.

Run the same nmap command but with sudo privileges:

$ sudo nmap -p 80 --open 192.168.0.0/23 > results.txt

Presto!

Nmap scan report for 192.168.0.6
Host is up (0.00085s latency).
PORT   STATE SERVICE
80/tcp open  http
MAC Address: 00:00:74:E8:D1:42 (Ricoh Company)

MAC addresses now show up in results.txt with the accompanying IP address. Search for your device’s MAC address and you’ll see its current IP address on the network.

Note: the machine that you use to run the nmap search must be on the *same* network as the device in order for you find its MAC address.

Bookmark and Share

View Comments   Networking
Related posts:

Adding custom launchers to Ubuntu Unity launcher bar

For Ubuntu (11.04) desktop, I like to have a custom launcher to start ‘gksudo /usr/bin/wireshark’ At this time, it’s aggravating to use the Unity launcher bar (until they get their act together). There’s no support to add custom launchers to the bar.

To get back the old method of adding custom launchers:

sudo apt-get install gnome-panel
gnome-desktop-item-edit –create-new wshark.desktop

Fill in the necessary fields to start wireshark and choose a program icon, if desired.

Open the folder containing wshark.desktop and double-click to run it.

After wireshark starts, right-click on the icon inside launcher bar and select ‘Keep in launcher’

Really, Ubuntu dev team??

Bookmark and Share

View Comments   Linux
Related posts:

Joining ZVRS

I’m thrilled to announce that I will be joining ZVRS, a company providing video relay services.  I’m looking forward to working at a company that aims to improve the quality of life for deaf people by enabling them to make calls 24/7/365.  My primary duties will include maintaining and expanding the network infrastructure as well as systems testing.

It will be bittersweet to leave Gallaudet University, where I’ve worked for the last two years. There’s no other environment in the world like Gallaudet University.  I can say this: the university is one heck of a serendipitous place. I’ve lost count of how many times I ran into old faces who happened to be visiting the campus. My work with Gallaudet Technology Services has been rewarding and enriching. There were many valuable lessons learnt while working on a campus network, spanning many buildings and supporting thousands of users. I enjoyed assisting the datacenter operations team with their modernization efforts to introduce VMware clusters of blade servers into the datacenter.

Why ZVRS?

Simply put: ZVRS’s reputation is among the best in the industry.

The VRS industry has recently undergone a major upheaval resulting from a federal investigation into VRS fraud and abuse by several individuals.  The FCC is now enforcing more stringent rules and regulations in order to safeguard VRS from further abuse.  ZVRS has supported FCC’s fraud prevention efforts and gone as far as releasing their code of ethics.  These visible actions by ZVRS along with a personal meeting with the CEO, Sean Belanger, further cemented my confidence in ZVRS.  I firmly believe I can count on the company to stay within guidelines and not attempt to circumvent them.

Another reason: ZVRS has an amazing portfolio of devices and apps deaf people can use to make and receive phone calls.

The choices include several standalone videophones and apps for different platforms such as PC, Mac,  iPhone and Android smartphones/tablets.  With this wide variety of supported devices/apps, it is clear that ZVRS is willing to invest and ensure that users are able to choose a device that best suits their needs. Then imagine the technical team that is capable of pulling this off: now that’s a team I want to be a part of!

Bookmark and Share

View Comments   Deaf
Related posts:

Fixing Windows clock time issue when booting.

I’ve been putting up with a slight annoyance when I dual-boot back into Windows from Ubuntu: The clock in Windows is always offset by a few hours.

The fix:

Set a registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation\RealTimeIsUniversal to 1

This tells the Windows instance to assume the time in UTC when booting up so the time is always correct.

Bookmark and Share

View Comments   Linux
Related posts:

Turn off all colors in vim

The text editor vim usually has default setting of colorized syntax and search highlighting, which I find too distracting.

To kill it off, put the following inside the file .vimrc in your home directory:

syntax off
set nohlsearch
set t_Co=0





Bookmark and Share

View Comments   Scripting languages (PHP, Perl, etc)
Related posts:

Fedora 15 (64-bit) desktop with Chrome, Flash, Adobe Air, VLC media player

I have hunted down bits of information from the far-flung corners of the Internet and consolidated them into a single post: Improving upon the default Fedora 15 desktop and run popular user applications, such as Google Chrome with Flash plugin, VLC media player, and Adobe Air apps (TweetDeck).

Hopefully, with the step-by-step instructions below, Linux newcomers will encounter less frustration setting up a desktop environment complete with several essential applications that greatly enhance the experience.

Run the default installation from Fedora 15 ISO/CD-ROM

After initial install/reboot, and inside terminal console, immediately give your user account sudo privileges:

su -c 'usermod -G wheel [your_username]'

Bring your system up to date:

sudo yum update

Reduce potential headache later on by getting these packages installed:

sudo yum install make gcc kernel-headers kernel-devel

Install Firefox and Google Chrome

sudo yum install firefox

Install 64-bit Google Chrome RPM from Google

Installing Adobe Flash: choosing between 32-bit or 64-bit.

Adobe offers both 32-bit and 64-bit version of Flash for Linux.  However, it is highly recommended that you install 32-bit Flash with the plugin wrapper, instead of the native 64-bit version of Flash.  Adobe puts a high priority on keeping the 32-bit version of Flash up-to-date with security fixes as well as releasing bugfixes/new features on a regular basis.  The 32-bit version is included inside Adobe’s yum repo so the Flash updates are pulled into your machine automatically when they are ready.

In contrast, 64-bit Linux version of Flash is slightly more than a blip on Adobe’s radar so this version gets infrequent updates and additionally, you’re personally responsible for checking Adobe’s site to see if there’s an update to install manually.  Neglecting to do this on a regular basis may lead your system to run with out-dated Flash with known security holes.

(The Bad method) Installing native Flash 64-bit, and again, with a warning: do not forget to to manually check/install updates on a regular basis!!

Download and untar/ungzip latest 64-bit Flash from Adobe. At present time, it is:

http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p3_64bit_linux_111710.tar.gz

sudo mkdir -p /opt/google/chrome/plugins
sudo cp libflashplayer.so /opt/google/chrome/plugins/
sudo cp libflashplayer.so /usr/lib64/mozilla/plugins

Both Firefox and Chrome should have working 64-bit Flash plugin.

(The Safer  method) Installing Flash 32-bit with plugin wrapper, including automatic updates.

http://get.adobe.com/flashplayer/. Select YUM for Linux and download/install

sudo yum update  (should see adobe-linux-i386 repo updating)
su -c 'yum install nspluginwrapper.{x86_64,i686} alsa-plugins-pulseaudio.i686 --disablerepo=adobe-linux-i386'
su -c 'yum install flash-plugin'

Run Mozilla Firefox once so that it creates /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so

Firefox should work with the 32-bit Flash plugin- play youTube video clip to verify.

For Google Chrome:

sudo mkdir -p /opt/google/chrome/plugins
sudo ln -s /usr/lib64/mozilla/plugins-wrapped/nswrapper_32_64.libflashplayer.so  \
/opt/google/chrome/plugins/nswrapper_32_64.libflashplayer.so

Install Adobe Reader (English version)

sudo yum install AdobeReader_enu

Install Adobe Air

First, install various 32-bit packages before 32-bit adobeair will work on 64-bit machine.

sudo yum install gtk2-devel.i686 nss.i686 libxml2-devel.i686 libxslt.i686 \ 
gnome-keyring.i686 rpm-devel.i686 rpm-build rpm-build-libs.i686  \
libgnome-keyring.i686 ld-linux.so.2 libdbus-glib-1.so.2 libhal.so.1 \
libXt.so.6 libDCOP.so.4 nss-devel.i686
sudo yum install adobeair

Now can install Adobe Air apps such as TweetDeck.

Gain access to additional software for Fedora:

Install RPMfusion repos for Fedora 15

su -c 'yum localinstall --nogpgcheck \
http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \

http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm'
sudo yum update

Install vlc from RPMfusion

sudo yum install vlc
Bookmark and Share

View Comments   Linux
Related posts:

Ubuntu: Installing RRDtool 1.4.5 and php->RRDtool bindings

Installing RRDtool 1.4.5:

Ubuntu 11.04 repo only offers older RRDtool 1.4.3, so if need to have a more recent RRDtool on your system:

Run the following commands as superuser:
sudo su

apt-get install libpango1.0-dev libxml2-dev

wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz
tar -zxvf rrdtool-1.4.5.tar.gz
cd rrdtool-1.4.5

mkdir /tmp/rrdbuild
export BUILD_DIR=/tmp/rrdbuild

mkdir /opt/rrdtool-1.4.5
export INSTALL_DIR=/opt/rrdtool-1.4.5

./configure –prefix=$INSTALL_DIR ; make ; make install

RRDtool is now installed in /opt/rrdtool-1.4.5

Setting up php5-RRDtool bindings

apt-get install php5-cli php5-dev

mkdir -p /usr/local/src/php-5.3.5/ext
cd /usr/local/src/php-5.3.5/ext

wget http://oss.oetiker.ch/rrdtool/pub/contrib/php_rrdtool.tar.gz
tar -zxvf php_rrdtool.tar.gz
cd rrdtool

phpize
./configure –with-rrdtool=/opt/rrdtool-1.4.5 –with-php-config=/usr/bin/php-config
make
make install

In /etc/php5/cli/php.ini, scroll down to “Dynamic Extensions” and add this line:
extension=rrdtool.so

Make sure there’s no PHP warning or error:
php -v

To confirm module is loaded, find rrdtool from the output of:
php -m


View Comments   Linux, Networking
Related posts:

How to call video relay service (VRS) with Linux / Ubuntu

How to call VRS from inside Linux-based OS such as Ubuntu

Background information for people not familiar with VRS: Video Relay Service is one of the most useful service provided to deaf Americans. This service enables deaf people to initiate a phone call to hearing people by using a video application to connect with a sign language interpreter. The interpreter becomes the middleman and relays the call between the two parties.

Convo, ZVRS, Purple, Sorenson, SnapVRS are among the VRS providers offering several ways for deaf people to make phone calls.  Deaf people can call using dedicated videophones, Mac or PC applications, or even a web browser.  More recently, VRS providers have released apps for mobile platforms such as iOS or Android-based smartphones/tablets.

However, there’s a gaping hole for Linux users: there are no native applications for calling VRS!  The odds are if you’re a Linux user, you are also used to taking matters into your own hands and jumping through hoops to find a solution that works.

Convo Anywhere

Easiest Linux-based solution to initiate VRS calls: Convo Anywhere

Convo offers a flash based VRS calling application which can be run entirely inside a web browser.

Open up Chrome or Firefox with flashplugin installed then login Convo Anywhere.

http://anywhere.convorelay.com

After logging in, go to:

http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager06.html

Set the permissions accordingly:

Reload Convo Anywhere and you’re all set to initiate a VRS call with your webcam and (now visible) interpreter.

While Convo Anywhere is a snap to set up and get started right away with calls, there is a trade-off:  Convo Anywhere allows you to initiate calls but not receive them from hearing people or friends who may be trying to call you back.  This is essentially one-way VRS calling application.

Which leads us to:

There is a cheat workaround that’s somewhat heavy-handed but allows the deaf person to receive calls from friends or hearing people. Instead of gunning for a native solution, there’s a virtualized solution where it’s possible to run a VRS application for the PC on an Ubuntu machine.

VirtualBox / ZVRS Z4

The approach: Install virtualbox then run a Windows virtual machine. Once inside the Windows virtual machine, download and run a VRS application for PC, such as ZVRS Z4.

Installing virtualbox:

Add the virtualbox repository to your Ubuntu machine: (Natty is currently the latest)

Inside /etc/apt/sources.list:

deb http://download.virtualbox.org/virtualbox/debian natty contrib

Run at Terminal console:

wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc  \
-O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.0

Your account needs to be included in vboxusers group:

sudo usermod -G vboxusers  your_username

In order to have virtualbox support USB 2.0 devices, such as webcams, you must download and install the virtualbox extension pack:

VirtualBox 4.0.8 Oracle VM VirtualBox Extension Pack
http://www.virtualbox.org/wiki/Downloads

Double-click the saved file and installer will automatically add it to virtualbox.

Restart virtualbox then inside virtual machine’s USB settings:

Enable USB 2.0 (EHCI) controller

To find the ID of your webcam, open a Terminal console and type:

lsusb

In virtual machine’s USB settings, add device filter for the webcam (make sure the ID matches)

Inside the device filter, Set ‘Remote’ to ‘Any’

Boot up your windows virtual machine and you should be able to see the webcam video inside  ZVRS Z4 application.  Leaving this virtual machine and application running constantly, you will be able to receive incoming calls as they come in as well as initiate out-going calls.

The VirtualBox/Z4 approach will be more taxing on the machine so it’s important to run a beefy computer with sufficiently powerful CPU and enough RAM memory to handle the extra workload.

VMware Player for top performance, video-wise:

You can also use the Linux version of VMware Player to create a Windows 7 VM to run the ZVRS Z4 softphone.

After VMware Tools is installed in the Windows 7 VM, the video inside Z4 will be very close to native performance & quality. In the screenshot above, you can also enter the VMware Unity mode to display the Z4 application inside its own window.

Bookmark and Share

View Comments   Deaf, Linux, Video, Web/Tech
Related posts:

H.264 codec for Linphone on Ubuntu

Tested with: Linphone 3.4.3 and Ubuntu 11.04 (Natty Narwhal)

Get and untar msx264 source code:

http://download.savannah.gnu.org/releases/linphone/plugins/sources/msx264-1.3.3.tar.gz

Make sure have all the necessary packages installed:

sudo apt-get install libmediastreamer-dev libx264-dev libavcodec-dev libswscale-dev libtheora-dev libsdl1.2-dev

Compile and install:

./configure –prefix=/usr
sudo make install

Restart Linphone and h.264 codecs will show up in Preferences — Codecs — Video Codecs.

Bookmark and Share

View Comments   Video
Related posts:

VMware Ubuntu virtual machine for Android development

I’m currently gearing up to do some Android app development after making some headway through this helpful Android dev book, “Professional Android 2 Application Development.

I decided to create a small Ubuntu-based virtual machine that is dedicated solely to Android app development.  This gives me several benefits:

  • Small and clean environment dedicated only to Android development work.
  • Ability to create VM snapshots before undertaking any potentially destructive actions.
  • Extreme mobility by having the virtual machine files stored on my dropbox account so I can start up the development VM anywhere I go.

Here are the steps to create an Ubuntu virtual machine specifically for Android development.  Note: these instructions assume you already have some basic knowledge of Ubuntu and VMware workstation/fusion.

Virtual machine install
Install from 32-bit Ubuntu 10.10 ISO image to a VM with these selections: Linux version Ubuntu, 12GB vdisk, 2 vCPUs, 3GB RAM.

It’s recommended to use 32-bit OS instead of 64-bit to avoid potential problems with libraries. However, if really want to go with a 64-bit OS, need to install 32-bit compat libraries:

apt-get install ia32-libs

After a fresh install/reboot, use apt-get or the package manager to bring machine fully up to date then reboot to complete the update.

Install VMware Tools for Ubuntu for overall improved performance.
——————————–
VMware Workstation menu: VM -> Install VMware Tools
Copy VMwareTools-xxx.tar.gz from the DVD to your home directory (~jared for this example)

cd ~jared
tar -zxvf VMwareTools-xxx.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl
install using default values

Ensure VMware Tools survives future kernel upgrades
——————————————————————-
Place this script inside /etc/rc.local

# Automatically install vmware tools modules after a kernel upgrade.
# Installing new vmware tools modules causes network to go down and up.
# (The pcnet32 module is swapped out for vmxnet driver)
# This may have adverse effect on network-aware programs already running.
# So is safer to reboot to ensure everything is working properly.
if [ ! -e /lib/modules/`uname -r`/misc/.vmware_installed ]; then
      printf "\nDetected absence of VM Tools- starting the modules compiling.\n\n"
      /usr/bin/vmware-config-tools.pl --default
      VMToolsVersion=`/usr/bin/vmware-config-tools.pl --help 2>&1 | awk '$0 ~ /^VMware Tools [0-9]/ { print $3,$4 }'`
      printf "\nNewly installed VM Tools version: $VMToolsVersion\n\n"
      touch /lib/modules/`uname -r`/misc/.vmware_installed
      depmod -a
      printf "\n  *** REBOOTING ***  Ensure a clean system with VMTools loaded.\n\n"
      reboot
fi

————–

Create the .vmware_installed file:

touch /lib/modules/`uname -r`/misc/.vmware_installed

Change System->Preferences->Monitors to an increased resolution. I like to use 1152×864 (4:3)

Installation of software for Android development:

Install in this order:
1. Java
2. Eclipse
3. Android SDK
4. ADT plugin.

Activate the software repository for Sun Java.
———————————-

note: JDK 1.4 or GCJ (GNU complier for Java) are NOT supported for Android development.

Activate the Partner repository so can include Sun’s Java software in list of available software packages. (as opposed to openJDK)

System -> Administration -> Synaptic Package Manager -> Settings-> Repositories -> Other Software -> check Canonical Partners.

Close and reload Synaptic Package Manager.

Install Sun JDK6 (not the JRE)

sudo apt-get install sun-java6-jdk

Ubuntu automatically selects java-6-openjdk for the default java, to change this:

update-java-alternatives -l
update-java-alternatives -s java-6-sun

or

update-alternatives --config java
# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection    Path                                      Priority   Status
------------------------------------------------------------
0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
* 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode
Press enter to keep the current choice[*], or type selection number: 2
# java -version
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) Server VM (build 19.1-b02, mixed mode)

Eclipse installation
—————————-
At present time, Ubuntu package manager doesn’t offer >= Eclipse 3.6 (Helios) so get directly from eclipse.org/downloads and download the Eclipse Classic package: ~170MB tgz file.

move the tgz to your ~/Applications directory.
tar -zxvf eclipse-SDK-3.6.1-linux-gtk.tar.gz

double-click and run ~/Applications/eclipse/eclipse
Accept default value for workspace location.

Installing Android SDK
———————————
Download from

http://developer.android.com/sdk/index.html

uncompress the tgz into ~/Applications directory
cd ~/Applications/android-sdk-linux_x86/

tools/android update sdk

My personal preference is to develop for Android 2.2 (API Level 8) or higher, so I select the SDK Platform Android APIs and the samples for these versions.  I also select the latest Documentation, Android SDK Tools and Platform-tools.

Installing the Android Development Tools (ADT) plugin
—————————————————–
ADT plugin installation is done through Eclipse.

Start Eclipse, then select Help > Install New Software -> Add

In the “Add Repository” dialog that appears, enter “ADT Plugin” for the Name and the following URL for the Location:

https://dl-ssl.google.com/android/eclipse/

In the Available Software dialog, select the checkbox next to Developer Tools and click Next.
In the next window, you’ll see a list of the tools to be downloaded. Click Next.
Read and accept the license agreements, then click Finish.
When the installation completes, restart Eclipse.

Now ADT Plugin needs to be configured:
Select Window > Preferences… to open the Preferences panel
Select Android from the left panel.

For the SDK Location in the main panel, click Browse… and locate your downloaded SDK directory at:
/home/jared/Applications/android-sdk-linux_x86/

Click Apply, then OK.

Restart Eclipse.

After all these installations on a 12GB vdisk:

#  df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              12G  5.4G  5.4G  50% /

There is plenty of room left over for your Android development work.

Bookmark and Share

View Comments   Android, Linux
Related posts:

Fedora / RHEL: Listing all repos and which packages are offered by a repo

Commands on Fedora/RHEL systems to list all repos and which packages are available in a repo:

List all repos on the system:

[root@rhel6-vm ~]# yum repolist
Loaded plugins: refresh-packagekit, rhnplugin
repo id                          repo name                                                    status
epel                             Extra Packages for Enterprise Linux 6 - x86_64               5,518
google-chrome                    google-chrome                                                    3
rhel-x86_64-server-6             Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)     3,748
rhel-x86_64-server-optional-6    RHEL Server Optional (v. 6 64-bit x86_64)                    2,927
repolist: 12,196

View packages offered in a repo:

[root@rhel6-vm ~]# repoquery --repoid google-chrome -a
google-chrome-stable-0:9.0.597.98-74359.x86_64
google-chrome-unstable-0:10.0.648.45-74092.x86_64
google-chrome-beta-0:9.0.597.98-74359.x86_64
Bookmark and Share

View Comments   Linux
Related posts:

Great educational video about ASL for families with a deaf child.

This is a fantastic video documentary on the importance of teaching American Sign Language to deaf children, especially in this age of deaf babies growing up with cochlear implants.

Too often, ASL is disregarded when believing the myth that learning sign language will stun the child’s potential. ASL is one of the critical components, along with other communication tools, that will help form and sustain a child’s overall well-being. Why not give a child all the tools, especially the one that will help to solidify and strengthen the relationship with parents?

Bookmark and Share

View Comments   Deaf
Related posts:

Finding the state of a zipcode using reverse lookup with Google Geocoding API

Here’s a code snippet if you need to run a reverse lookup on a zipcode to identify which state it is located in.  Google Geocoding API version 3 is the latest at this time of post, and there’s no longer an API key required to make the geocoding call! (sorry about the overlapping across the right sidebar, but copy n’ paste still works.)

$zipcode = "20002";

$geourl = "http://maps.googleapis.com/maps/api/geocode/xml?address=$zipcode&sensor=false";

// Transfer the XML content from Google
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $geourl);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
$xmlContent = trim(curl_exec($c));
curl_close($c);

// load the XML content into a SimpleXML object for ease of acccess
$xmlObject = simplexml_load_string($xmlContent);

print header("Content-type: text/plain");
// If you want to see all the values you can use inside the object, uncomment the next line.
#print_r($xmlObject);

$state="";
$addr_comp_count="";

if ( $xmlObject->status == "OK") {
   for ($addr_comp_count=0; $addr_comp_count < sizeof($xmlObject->result->address_component); $addr_comp_count++) {
     if ( $xmlObject->result->address_component[$addr_comp_count]->type[0] == "administrative_area_level_1" ) {
       $state = $xmlObject->result->address_component[$addr_comp_count]->short_name;
     }
   }
}

print $state ;
Bookmark and Share

View Comments   Scripting languages (PHP, Perl, etc), Web/Tech
Related posts:

« Previous Entries