Friday 28 November 2008

Acer Aspire One - painless tsclient/rdesktop install

I recently installed Terminal Server Client (tsclient) and Remote Desktop (rdesktop) on my Acer Aspire One. Here's a little background on what I did to get remote access to the Microsoft Windows servers in my data-center from my Acer Aspire One netbook.


The complete installation information is at this Google Site.





Background:

tsclient - Terminal Services Client is a front end for rdesktop and other remote desktop tools.

rdesktop - remote desktop is an open source client for Microsoft's proprietary Remote Desktop Protocol (RDP).

The Install in Brief:
  • Install rdesktop using yum
  • Download tsclient-0.150-5.fc8.i386.rpm from rpmfind.net
  • Install tsclient using rpm

Once installed the AA1 desktop is modified to display the Terminal Services Client icon for ease of use.

Tuesday 25 November 2008

Back to normal posting

I should be back to normal posting. The pee wee volleyball season is over and I'm on a more normal schedule again. The season went well and fun was had by all. :)

LAMP Scaling by the Big Boys

I ran across this at work and thought I should share. There are a lot of LAMP (Linux, Apache, MySQL, Perl/PHP/Python) sites out there on the Internet. One of the bigger ones is Wikipedia. Alka Gupta has posted this blog entry on how that site is scaled.


A very nice high level explanation. Good information to have in case you ever have a site that gets this big. Seven billion page views a month is a lot!

Sunday 23 November 2008

A minimal Android application to display Map, using MapView

it's a very minimal Android application using MapView to display a Map on Android Phone.

My Setup is:
Ubuntu 8.10
Eclipse 3.4.1
Android SDK 1.0

First of All, start Eclipse and create a Android Project:
In my exercise, I use AndroidMap as the name.
Project Name - AndroidMap
Package Name - com.Android.AndroidMap
Activity Name - AndroidMap
Application Name - AndroidMap



Now you have to grant permission to the application to access internet:
Select AndroidManifest.xml in res folder from Package Window on the left. Activate Permissions tab, then Add two Uses Permission, android.permission.ACCESS_COARSE_LOCATION and android.permission.INTERNET.





In order to use MapView, uses-library, "com.google.android.maps", have to be defined inside AndroidManifest.xml. Activate AndroidManifest.xml to manual edit the xml directly, insert

<uses-library android:name="com.google.android.maps" />

inside the <Application> element. The full listing of my AndroidManifest.xml:



Save and close AndroidManifest.xml.

Modify UI, (Package Window>res Folder>layout Folder>main.xml), by replacing TextView with MapView:

<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="api_key_here" />


Please note that you MUST to insert your own "api_key_here".
In order to apply your own apiKey, you have to check your Getting the MD5 Fingerprint of the SDK Debug Certificate (for emulator), and Sign Up for the Android Maps API.



Save and close main.xml.

Finally, modify AndroidMap.java:

package com.Android.AndroidMap;
import com.google.android.maps.MapActivity;
import android.os.Bundle;

public class AndroidMap extends MapActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}

@Override
protected boolean isRouteDisplayed() {
return false;
}
}



Save the java file.

Now you can Run the minimal AndroidMap on Emulator.





SORRY for all! Blogger re-format my code and make all the code mis-aligned, and not easy to read. I don't know how to fix it!!!

Thursday 20 November 2008

Featured gadget: On-Screen Ruler



Name: On-Screen Ruler
Author: Edwin Lee
Description: Ruler on your desktop to help you align your on-screen elements, and measure the number of pixels between them.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Tuesday 18 November 2008

Google Gadgets for Linux 0.10.3

The 0.10.3 release of Google Gadgets for Linux is out, with bug fixes and major feature enhancements. Most notably, now Linux gadgets can use most of the features introduced in the 5.8 release of Google Desktop for Windows.

If you have a previous version of Google Gadgets for Linux, we encourage you to upgrade to this version. Just download and install the binaries for your platform.

With the 0.10.3 release, gadgets can run seamlessly within KDE4's Plasma environment, as the following screenshots show. For more information on KDE4 and gadgets, see the KDE4 Plasma page in the google-gadgets-for-linux project.





Thanks for reading this, and remember to download Google Gadgets for Linux!

Friday 14 November 2008

Featured gadget: VTM Wheater Map



Name: VTM Wheater Map
Author: Stefan vd
Description: Show the VTM Wheater Map from Belgium.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Wednesday 12 November 2008

Built in Color Picker for Mac

Yesterday I ran across a tool built into OS X that can give you the RGB values for just about anything on a web page. This is very useful for "borrowing" color ideas from other sites.


In the Utilities folder, just launch DigitalColor Meter. Your mouse becomes a color browser. Simply mouse over the image, background, or other visual element and behold, the color value is displayed for you. There are a number of formats to choose from. Since I do a lot of HTML work, the 8-bit HEX is my personal favorite.


If anyone else knows of similar tools for Windows or Linux, please post a comment. Because being able to do this is freaking great!

Sunday 9 November 2008

Morris Worm - two decades later - little has changed

It was November 1988 and I was an undergrad at Colorado State University when the Morris Worm started hitting computers on campus. I remember the excitement in the Physics lounge as we started to discuss and reverse engineer the virus.

The worm infected BSD based operating systems by exploiting buffer overruns using the gets function call in the utilities fingerd and sendmail. The worm collected host, network and user information and then, in turn, used this information to infect other servers using TCP or SMTP and the buffer overrun defects in sendmail and/or fingerd.

The detection of the virus started with strange files showing up in /usr/tmp directories, strange entries in /var/log/ files, but most notably was the vast number of processes running when one issued a top command.

Shortly after discovery, UC Berkley had created a patch for sendmail and made suggestions to limit the spread of the Morris Worm. Oddly enough the Morris Worm exploited a debug option (e.g. -d) in sendmail, used by many system admins (and users) to test mail configurations.

So here we are twenty years later and I am still disappointed to find my colleagues using unbounded string copy functions like gets, strcpy, strcat, etc. I recently worked with a networking group to close a security exploit in one of their communications libraries that, you guessed it did a blind copy of a buffer passed in from the user (doh!) and caused the daemons using the library to crash and dump the stack.

Therefore I have written on the whiteboard by my desk:
Use of the function strcpy is a clear indication to anyone reading your code that you are willing to walk forever to find nothing (e.g. a NULL).
As a footnote: Whatever happened to that Morris guy who created the Morris Worm? Well, Robert T. Morris was represented by the law firm Bonnor and O'Connell; tried and convicted of violating the 1986 Computer Fraud and Abuse act and eventually sentenced to three years probation and fined 10,000 USD. Shed no tears, R. T. Morris is an associate professor at MIT (the exact same university where he created the worm).

Thursday 6 November 2008

Dojo Tab Example Using Code

I have started on a Dojo project for work. While reading up on Dijit, I ran across an example of how to use Dijit controls using JavaScript. This intrigued me as I have never liked putting JavaScript code in the HTML like most of the Dojo examples.


Using the book as an example, I tried the same thing and of course it didn't work. lol. After a little Googling around a solution was found. First, in a tab container, the tabs themselves must be added as children to the tab container. Ok that makes sense. But once I removed the Dojo attribute for the tab container it no longer displayed on the page. Well, it turns out, to get the thing to display, you have to call the controls startup method to make this happen.


As a result of the experience I have written up an example with comments.

Monday 3 November 2008

Featured gadget: Photo Frame



Name: Photo Frame
Author: Google
Description: Keep your favorite photos, nicely framed, on your desktop. You can choose from several frames and themes.

More information | Download gadget

Each week this blog features a recently added Google Desktop gadget that looks promising. If you'd like to see all new Desktop gadgets as they're published, subscribe to the RSS feed.

Sunday 2 November 2008

Android Developers - Bonsai Blast


Jacob Abrams of Glu Mobile talks about they built their Android app, Bonsai Blast.