10.21.08

T-Mobile G1 Android First Impressions

Posted in Review at 11:56 pm by Techie

The T-Mobile G1 was the first effort at a mass market phone built on the Google operating system Android. Combining slick (if not current) hardware from HTC, Google’s web applications, and this new open mobile OS, it was meant to give the iPhone some competition while changing the landscape of mobile application development. I received mine today, and spent some time getting some first impressions.

You have to tie the phone to a Google account, so when starting it up, the first thing you have to do is add your Google account. For those with Google Apps For Your Domain: relax, you can use your Google Apps email address with no problem. This has some other complications, which I’ll go over later. This is great in the sense that you can store your data “in the cloud”. It is terrifying in that it puts a large amount of your personal data in the cloud. That, and you’re storing your data with one vendor. That concern is more than just data resiliency; it’s the fact that you’re giving someone else control over your access to that data. There have already been horror stories of people getting locked out of their Google account, so this is not an irrational fear. Most people are probably willing to take this risk, or are taking this risk already.

If you’re a first timer, you’re also going to want to dive into settings, and enable the GPS. I don’t know why they ship with it off; I’m guessing that half the folks breaking out this phone are going to do what I did: open the Map application and hit “My Location”, then be frustrated when it doesn’t work. Once done, the GPS is actually reasonably accurate — while driving down the street, it kept track of where I was pretty closely.

The hardware itself isn’t winning any beauty contests. It’s twice as thick as an iPhone, and has the aesthetic sensibility of a first generation Zune engineer. Well, it’s not quite that bad, but it’s definitely lacking polish. I drained a battery pretty quickly through a few hours of constant usage. While I probably wouldn’t be using it that extensively on an ongoing basis, it did run out rather alarmingly fast. (Perhaps that’s why the GPS is off by default.) The trackball is a familiar interface for me, coming from a Blackberry Pearl. In fact, the four button organization with trackball in the center was very reminiscent of working with a Blackberry — perhaps they’re setting up Android as a Blackberry killer? I love the full qwerty keyboard, but they recessed the keys far too much, leaving the whole keyboard feeling flat. I would have preferred raised buttons, like a Treo. Everyone complains about the lack of a standard headset jack, so I’ll throw in my complaint regarding that as well. They did include a set of headphones, but they’re not great.

The camera is kind of bunk. While on paper it sounds good, in practice, it’s rather hard to half-depress the tiny shutter button, and when taking a picture, it takes a bit for it to actually snap. This probably takes great pictures of still scenes; anything with action is bound to be extremely blurry.

Technical specs have been covered in pretty good detail on other sites; I seem to have no problems getting a signal so far, and being in the Boston area, 3G coverage is pretty decent. I still lean towards using wifi, of course, as that’s just faster.

Software-wise, Android works reasonably well. It’s not quite as intuitive as it should be, but it responds pretty snappily. While I can see myself getting quite used to it, I can see a lot of frustration for folks who are not as technically inclined and aren’t patient. In this vein, I can’t recommend an Android-based phone over an iPhone yet — the latter is just going to be a less frustrating experience overall. Opening and shutting the screen causes the display to flip between portrait and landscape, and it does this flawlessly. I would start loading a web page and immediately flip open the keyboard, and it’d switch over without missing a beat. This was rather pleasantly surprising.

However, unlike the iPhone, Android doesn’t have as much integration with other applications. Take the Amazon MP3 integration, for example. This is analogous to the iPhone with the iTunes Music Store. However, this application is clearly distinct from the Music system. I can pull up Amazon MP3, browse tunes, and buy a tune. However, I can’t immediately play the tune after purchasing, without switching applications and manually finding the song. Something Google and third party developers will need to do is really examine the UI flow, and clean up things like this — I should be able to go from buying a song to playing in a smooth flow, without having to hunt and peck. Unfortunately, this is quite a bit more difficult because more companies are involved, not to mention (soon) multiple hardware vendors.

There’s always been a little bit of confusion between Google’s regular web applications and the ones they package together as Google Apps. For instance, I can set up my email address on Google Apps, then go to regular Gmail, and try to sign in with it. Rather than taking me to Google Apps email, though, it prompts me to set up a regular @gmail address. This is true of Google Calendar as well. This has been the case for a while, and they haven’t really fixed it. The reason I mention this is that the browser defaults to a Google page, with links to these items. These links won’t work properly for Google Apps addresses for just this reason. The applications on the phone work just fine; just the start page links won’t work properly, which is rather odd. This is just going to get more confusing as more web applications end up in Google Apps. Also, what’s with the omission of Google Docs?

The Gmail application works about as you’d expect. You can’t open attachments, which is quite astounding, but then again, they didn’t include native Google Docs support, so what would you open it in. It works reasonably well and is effective for email. The Mail client, on the other hand, isn’t so good. If you have a lot of IMAP folders, it’s going to be quite painful. URLs aren’t clickable, and you can’t copy / paste them. In essence, the Mail client is roughly functional, but in need of a lot of work — hopefully someone will develop a better one in the Marketplace.

This brings us to the applications. They’re just not up to snuff yet, but as the G1 isn’t technically supposed to get released quite yet, perhaps that’ll change this week. Some of them are cool, some are bloated, some just don’t quite work. There’s also only a few dozen, so you’ll be able to review all of them briefly, until the market gets flooded. This also means that the more esoteric apps you might be looking for (say, an SSH client?) won’t be available just yet. Some of them have odd quirks — such as not quite mapping your starting point for directions or locations properly, resulting in not very good results. Some fine tuning is obviously needed for many applications. On the other hand, some, like the Weather.com application, though simple, are extremely well done.

I think I side with many other reviewers in noting that this is a good first attempt, and a quite nice phone. However, it lacks the polish and usability of Apple’s iPhone, as well as that extra bit of effort to make sure all of the apps are sharp. On the other hand, there is huge potential here: the Android operating system is quite capable, a lot of hardware vendors are developing new phones, and there’s a lot of time until their release to work out all of the bugs. I’m quite satisfied with picking up this phone, but still wouldn’t recommend it for people at large: there’s too much that needs to be cleaned up, and it’s still not intuitive enough for non-technical folks to prevent frustration. However, being an open platform, perhaps that may change quickly. I can’t wait.

10.18.08

Enable sudo Insults

Posted in Intermediate, Linux at 11:08 am by Techie

System administration doesn’t have to be all serious. You can have sudo insult your users who mis-enter their password, by adding ‘insults’ to the Defaults line. Enable it and see which users discover it first.

Reference: Ubuntu Unleashed: Enable Sudo insults for some laughs!

09.05.08

Keep DHCP From Overwriting Search Domains

Posted in Intermediate, Linux at 3:11 pm by Techie

Let’s say you have a bunch of hosts on example.com, such as mercury.example.com, venus.example.com, and jupiter.outerplanets.example.com. You spend a bunch of your time on the command line, so you want to be able to access them with just the short host name, i.e., you want to be able to just type ssh mercury and not worry about the domain.

If you happen to be on the same domain, e.g. on saturn.example.com, this usually works fine. What if you’re not? The usual answer is to edit your /etc/resolv.conf file, and edit your search domains like so:

search example.com outerplanets.example.com

This works great — you can even ssh jupiter and it’ll do the right thing. It will, that is, right until you DHCP up a new IP address, say on another Internet connection. Then it overwrites your search domains, and you have to re-edit the file. What’s a techie to do? Use dhclient.conf, of course!

On hardy, I edited the file /etc/dhcp3/dhclient.conf and added this line:

supersede domain-name "example.com outerplanets.example.com";

Then, I did an sudo /etc/init.d/dhcdbd force-reload to make the dhclient change. However, my connection still had the old network information. To fix that, I just stopped and started my connection like so:

sudo ifconfig eth0 down
sudo ifconfig eth0 up

Voila — my search domains work again, and will work the next time I DHCP up a new IP.

09.04.08

How To Determine Perl Module Versions

Posted in Intermediate, Linux at 12:55 pm by Techie

How do you determine what version of a Perl module you have? If you have one module you want to check, you can call the VERSION parameter of the module. Let’s say you wanted to check the version of Test::Harness you had on your system. Run the following:

$ perl -MTest::Harness -le 'print Test::Harness->VERSION'
2.56
$

Another way:

$ perl -le 'eval "require $ARGV[0]" and print $ARGV[0]->VERSION' Test::Harness
2.56
$

Seems simple enough. But what if we want to check all module versions, versus what was current on CPAN?

$ perl -MCPAN -e 'CPAN::Shell->r'

That’s not foolproof, as some modules don’t have version numbers, but should give you a good idea. It also has the bonus of providing you with information on how out of date you are with CPAN.

08.14.08

How to set time zone in Ubuntu Hardy Heron

Posted in Intermediate, Linux at 5:46 pm by Techie

You used to be able to use tzconfig to set the time zone in Ubuntu. With Hardy Heron you can no longer do this, so how do you do it? Simple:

sudo dpkg-reconfigure tzdata

06.20.08

Keep a specific debian package version

Posted in Intermediate, Linux at 10:21 am by Techie

In Debian / Ubuntu, sometimes you want to keep a package at a specific version, and not upgrade it. For instance, the Perl module DateTime::Timezone in Ubuntu Dapper lists its version as 1:0.37-1, when the version is actually 0.37. This makes it difficult if I build a new package of the perl module at version 0.7701, because though I can force install that version, if I run an apt-get upgrade later, it’s going to install the former, because it sees it as version 1, which is greater than 0.77.

Fortunately, the fix is easy: put the package on hold. This prevents it from being upgraded, though that also means you won’t get updates to it from the main repositories. If you built it yourself, then that might not be such a bad thing. To put a package on hold, you do:


echo packagename hold | sudo dpkg --set-selections

Replace packagename above with the name of your package (for instance, I would put libdatetime-timezone-perl). Did it work? Let’s see!


$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree... Done
The following packages have been kept back:
libdatetime-timezone-perl
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
$

Looks good to me!

Reference

06.11.08

Regenerating SSH keys on Ubuntu

Posted in Intermediate, Linux at 9:27 am by Techie

Due to the recent ssh vulnerability, many releases of Ubuntu found themselves with vulnerable ssh keys.

User Keys

Run ssh-vulnkey to see if you’re unlucky. If you are, you’ll have to regenerate your keys.

ssh-keygen -t rsa

That’s it. If you’re using dsa, use dsa in the above instead of rsa. You should let it overwrite your existing key file. Remember to clean up ~/.ssh/authorized_keys (or ~/.ssh/authorized_keys2) on the servers that might have your old key!

Server Keys

Dumping and re-creating your own keys is okay, but what about the server?

For ssh1 keys, do:

ssh-keygen -q -f /etc/ssh/ssh_host_key -N '' -t rsa1

For ssh2 keys, do the following:

ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa

Note that when you first connect to the server thereafter, it’ll warn you that the keys have changed. Well, obviously, you just regenerated them. You may have to manually edit

~/.ssh/known_hosts

to remove those lines.

Reference

05.21.08

Debian: using apt to install a specific version

Posted in How To, Intermediate, Linux at 3:52 pm by Techie

If you’re like me, you may need to build your own packages in Debian, or perhaps have downloaded different versions of packages to install on your system. Sometimes you’d like to go the other way, though, and install an older version of a package you found in the repository, or even the same version, but a different build.

For example, let’s say you built your own version of perl, say 5.8.8-7blindedbytech1. Then, Debian finally gets the same version of perl into their repositories, say 5.8.8-7etch3. Unfortunately, doing an apt-get dist-upgrade isn’t going to install this version. This is particularly annoying if other packages have dependencies on these perl versions.

What’s one to do? Wouldn’t it be nice if you could specify which version of perl package to install? As it turns out, you can. When you do the apt-get install of the package, follow it by an equal sign (=) and the particular package version you want, e.g:

sudo apt-get install perl=5.8.8-7etch3

Obviously, this will only work if the specific version is in one of your repositories. You can do this with multiple packages, too. In fact, I had to, because perl-base was also a different version:

sudo apt-get install perl=5.8.8-7etch3 perl-base=5.8.8-7etch3

Be careful of dependencies. Don’t just blindly run these commands unless you know what you’re doing, and be sure to read the output messages, as it may have unintended effects. For instance, for me, the above command uninstalled mysql-server. Make sure you read the warnings it gives you, and you understand what they mean.

05.09.08

Windows XP Online Through Blackberry Pearl 8100 and T-Mobile

Posted in Intermediate, Windows at 5:46 pm by Techie

As I don’t always have an Internet connection, being able to get my laptop online through my cell phone (a Blackberry Pearl 8100 on T-Mobile) is quite useful. Here’s how you do it. I presume at this point you’ve already installed the Blackberry Desktop software, and can sync fine over USB.

Determine COM Ports

Right-click on “My Computer” (often found in the Start Menu), and select “Properties”. Click on the “Hardware” tab, and then the Button for “Device Manager”. Expand the section for “Ports (COM & LPT)”. You should see a couple entries here for RIM Virtual Serial Port v2 — for me these were “COM4″ and “COM5″.

Note the COM numbers for these entries. Close out.

Set Up Network Connection

Go to the “Control Panel”, and open up “Network Connections”. (If you have category view enabled, you may have to go to “Network and Internet Connections” first, before being able to select “Network Connections”. Go to “File->New Connection”, which will launch the “New Connection Wizard”. Do not do the Network Setup Wizard — that’s something else.

Click Next. Leave the option as “Connect to the Internet”, and click Next. Select “Set up my connection manually”, and click Next. Select “Connect using a dial-up modem”, and click Next.

At this point it should be asking you to select a device. Make sure to select the entry for one of the COM ports you found above. I noted above that COM ports 4 and 5 were for RIM, and here the only one showing up was COM4, so my choice is pretty clear. Select the correct one, and click Next.

For ISP name, put in whatever is meaningful to you so you know what it’s for. For instance, I called mine “T-Mobile (Blackberry)”. Click Next.

For Phone number, put in the following and click Next: *99#

For “Internet Account Information”, leave the fields blank. Leave “Use this account name and password…” checked, and uncheck the box for “Make this the default Internet connection”. Click Next. That should be the final page of the Connection Wizard, so click Finish.

This will probably pop up the “Connect T-Mobile (Blackberry)” dial-up wizard. Don’t connect yet. Close this out, because we need to make some changes to the modem first.

Go back to “Control Panel”, and go to “Phone and Modem Options”. (If you have Category View enabled, you may have to select “Printers and Other Hardware” first.) On the “Modems” tab, you should see the modem you selected above listed (e.g. “Standard Modem; highlight it and hit Properties.

This will bring up the properties window specific to that modem. On the Advanced tab, there’s a box for “Extra initialization commands”. In here, put the following:


+cgdcont=1,"IP","wap.voicestream.com"

If that doesn’t work, use the following instead:


+cgdcont=1,,"wap.voicestream.com"

OK all the way out, and launch the connection again. You can find it in the Control Panel under Network Connections (again, if you have Category View enabled, you may have to navigate into “Network and Internet Connections” first), under the Dial-up section. Alternatively you may find it under Start->Connect To on the Start Menu, if you have the new style Start Menu enabled.

Click Dial, and it should connect!

02.27.08

Resizing a Windows VMware Workstation image in Linux

Posted in Intermediate, Linux at 12:01 pm by Techie

While I tend to like running Ubuntu on the desktop, I sometimes find myself needing to run Windows programs for various things. For that, I actually got VMware Workstation for Linux, and set up a Windows XP Professional image, with a partition size of 8 GB. I rarely use the image, so imagine my surprise when I actually ran out of disk space in the partition. I was further confounded to find that you couldn’t dynamically resize the partition. The problem is twofold: needing to resize the VMware disk image, and then needing to resize the partition on which Windows is installed to fill the VMware disk image.

Resize the VMware Disk Image

To resize the VMware disk image, we can use the program vmware-vdiskmanager. Make backups before proceeding. I had an 8 GB partition now, so let’s make it a 40 GB partition instead:


$ vmware-vdiskmanager -x 40GB /path/to/my/image/mywindowsimage.vmdk
Using log file /tmp/vmware-jlee/vdiskmanager.log
The old geometry C/H/S of the disk is: 16383/16/63
The new geometry C/H/S of the disk is: 16383/16/63
Disk expansion completed successfully.

WARNING: If the virtual disk is partitioned, you must use a third-party
utility in the virtual machine to expand the size of the
partitions. For more information, see:
http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647

Good so far. Now, the disk image is 40 GB, but the partition on the disk is still set to 8 GB. What we want to do is grow the partition to fill the newly allocated space.

Boot an Ubuntu Live CD

To resize the partition, I can use a Linux live CD. Rather conveniently, I can use the same Ubuntu live CD that I used to install Linux on my desktop.

It took me a while to figure out how to boot a CD in VMware, mostly because the BIOS screen for VMware disappears so quickly. When starting up the VMware image, I hit F2 quickly before Windows started loading to enter the VMware BIOS. Then I could go to the Boot menu, and set the CD-ROM drive to boot before the hard disk. Otherwise, it would start directly into Windows.

Once that was done, I made sure that a Gutsy Gibbon live CD was in the CD-ROM drive, and restarted the VMware image.

Resize the Partition

Now I had the Ubuntu live CD running in my VMware image. I went to System -> Administration -> Partition Editor. I clicked on the partition, clicked “Resize/Move”, and dragged the right slider all the way to the right, to fill the disk. I clicked the “Resize/Move” button, then “Apply”. After it completed, I restarted the VMware image, which prompted Windows chkdisk to run, and then reboot again. Once Windows booted up, Windows noted that it had detected new hardware and needed a reboot. I let it do so, and just like that, I had grown my 8 GB drive to 40 GB.

Conclusion

So there you have it — if you have half an hour and a current Ubuntu live CD, you can resize your VMware image. As with any disk editing operations, you should always make backups before making changes. It’s kind of annoying that the image doesn’t dynamically grow, but it’s nice to know that it can be handled. What’s also cool is to be able to use Linux live CDs to edit properties of VMware instances.

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »

Bad Behavior has blocked 280 access attempts in the last 7 days.