12.09.09

Firefox, Emacs, and Mac OS X

Posted in How To, Intermediate, Mac at 10:47 am by Techie

On Linux and Windows, I use an extension called It’s All
Text
to add an “edit” button to text areas. Hitting this will
launch the contents of the text area in my editor of choice — emacs.
(You can pick any editor you like.)

However, on Mac, it’s not really straightforward, due to the way they
handle applications. The comments in this
post
pointed me in the right direction for how to set this up.

The default proportional font in aquamacs bugs me, so I fix that by
launching it with a textarea and going to Options -> Appearance
-> Font For Text-Mode and setting it to Andale Mono. I also turn
off Soft Word Wrap and Auto Word Wrap In Text Modes under options,
because I’m used to emacs’s old unfriendly behavior.

11.03.09

VMware Workstation 6.5.3 On Ubuntu 9.10 Karmic Koala

Posted in Intermediate, Linux at 7:49 am by Techie

People running VMware Workstation 6.5.3 on Intrepid or Jaunty may be in for an unpleasant surprise when upgrading to Karmic — it doesn’t work! If you run the installer, it hangs while configuring VMware Player of all things.

Fortunately, the community is already on the case, and until VMware ships an official update, aldeby.org provides these helpful instructions. Perfect!

Quick summary:

* In one terminal, run: while true; do sudo killall -9 vmware-modconfig-console; sleep 1; done
* In a second terminal, run: sudo ./VMware-Workstation-6.5.3-185404.i386.bundle --ignore-errors
* Kill loop in first terminal.
* Run: sudo vmware-modconfig --console --install-all
* Edit /etc/vmware/bootstrap to add the line: VMWARE_USE_SHIPPED_GTK=force
* If you have ~/.vmware/config, make sure the xkeymap.nokeycodeMap is commented out (previous keymap fix for Vmware/Intrepid).

10.22.09

One week to a new Ubuntu release!

Posted in Beginner, Linux at 7:04 am by Techie

Let’s hope it’s better than Jaunty, which I found to be a bit of a dog.

10.21.09

Fix Arrow Keys in VMware in Ubuntu Intrepid Ibex

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

This one had been bugging me for a while. Arrow keys never worked right in VMware Workstation when I switched to Intrepid Ibex. I found this post which solved it beautifully. Quick summary:


echo 'xkeymap.nokeycodeMap = true' > ~/.vmware/config

09.15.09

Reconnect ssh-agent in screen

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

I like to use ssh-agent to make logins simpler, but had a problem that whenever I detached a screen, I’d lose my agent. This post and others provide information on how to do reconnect, but it didn’t quite work for me. In particular, what these posts suggest is editing your .bashrc or similar to create a symlink to your actual $SSH_AUTH_SOCK, then set your .screenrc to set the environmental variable $SSH_AUTH_SOCK to point to your symlink. This is all fine and good, until you log into screen the first time, and it sources your .bashrc and tries to symlink to your symlink. Here’s how to fix it.

Add the following to the end of .bashrc:


if test $SSH_AUTH_SOCK && [ $SSH_AUTH_SOCK != "/tmp/ssh-agent-$USER-screen" ]
then
rm -f /tmp/ssh-agent-$USER-screen
ln -sf "$SSH_AUTH_SOCK" "/tmp/ssh-agent-$USER-screen"
fi

This creates a symlink to your actual $SSH_AUTH_SOCK, but only if it isn’t set to your symlink.

Add the following to your .screenrc:


setenv SSH_AUTH_SOCK "/tmp/ssh-agent-$USER-screen"

That should do the trick.

06.09.09

Format An NTFS Drive In Ubuntu

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

Most external drives are shipped with FAT32, which is great, until you come across files larger than 2 GB. The easiest way to get around this and maintain Windows compatibility is to reformat the drive to NTFS. Sure, you could do it in Windows, but what if you just happen to only have a Linux computer handy? Here’s how to do it in Ubuntu. These instructions are for an external drive, but should work for internal drives too. This will destroy any data on the drive. You’ve been warned!

First, you’re going to need the ability to create NTFS file systems, so install ntfsprogs:

sudo apt-get install ntfsprogs

Next, connect your external drive. In my case, I’m formatting a Western Digital WDElements 1 TB external USB hard drive. This auto-mounted for me at /media/Elements. If I run df -k I can see the drive to get the disk ID:

$ df -k
[...misc output...]
/dev/sdb1            976521568       128 976521440   1% /media/Elements

Ah, so it’s at /dev/sdb. First, we blow away the partition and re-create it as NTFS. Warning: you are going to be destroying all the data on the drive! Make sure you have the write drive designation, or you could lose data on your other drives!

$ sudo umount /dev/sdb1
$ sudo fdisk /dev/sdb

Options to select:

  • ‘d’ to delete the partition
  • ‘n’ to create a new partition
  • ‘p’ for primary
  • ‘1′ for partition number
  • ‘Enter’ for first cylinder (default 1)
  • ‘Enter’ for last cylinder (default of max size)
  • ‘t’ for type
  • ‘L’ to list codes, and enter code for HPFS/NTFS. In my case, it’s ‘7′
  • ‘w’ to write changes to disk, and exit
  • sudo umount /dev/sdb1

In the last step, I unmount the partition, because Ubuntu auto-mounted it again for me. Now, we need to create the file system. There are two ways to go about it: the impatient way (Quick Format), or the better but much longer way (Full Format).

Quick Format

This just allocates the disk space, but doesn’t zero out the drive or check for bad sectors. This means it’ll take a few seconds.

sudo mkfs.ntfs -f /dev/sdb1

Full Format

If you’re much more concerned about data integrity and don’t mind waiting, do a full format. This may take a few hours to zero out a large drive!

sudo mkfs.ntfs /dev/sdb1

That’s it!

Some other caveats:

  • NTFS is a journaling file system, which means changes may not be immediately applied. Always unmount a drive before disconnecting.
  • If you’re extra paranoid, run a ’sync’ before you unmount the drive, to be sure that changes are written.
  • Windows is also quite paranoid about this, so always safely unmount the drive before disconnecting. Otherwise, you may find you can’t access the drive at all under Linux, until you mount it under Windows first to recover the journal.

04.08.09

How long until Ubuntu Jaunty Jackalope?

Posted in Linux at 1:47 pm by Techie

02.11.09

Install Amazon MP3 Downloader On 64-bit Intrepid Ibex

Posted in Uncategorized at 12:29 pm by Techie

Amazon provides a download for Intrepid Ibex, but it only works for 32-bit installs. What’s a 64-bitter to do? Fortunately, this has been solved by a few folks.

After you install, you have to click a link to tell Amazon that you have it installed, and it’ll probably try to open it in your web browser, and fail. Go to Edit, Preferences, Applications tab, and you should see an entry for AmazonMP3 download queue. Under Action, pull down the drop down and select “Use other…”, and browse to {{{/usr/bin/amazonmp3}}}. That should do it.

References:

01.28.09

Upgrading Compress::Zlib breaks CPAN

Posted in Error Messages, Intermediate, Linux at 2:59 pm by Techie

If you upgraded the perl module Compress::Zlib (or related), you may suddenly find CPAN stops working. You may start getting an error like the following:

Can't call method "value" on an undefined value at /usr/share/perl5/IO/Uncompress/RawInflate.pm line 64.

As it turns out, there’s a whole slew of Compress::Zlib modules and IO::Compress modules that are all related. They are all packaged separately, and have the same version numbers. The problem happens if you upgrade one of the modules, without upgrading all of them.

The solution: make sure to upgrade all the modules to the same version at the same time. This means that if you’re using CPAN, you might have to install the remainder by hand. A good check to find what modules differ for you is to run dpkg -l | grep compress | grep perl, and make sure versions match up.

12.20.08

T-Mobile G1 Shortcuts

Posted in Intermediate at 1:40 am by Techie

  • Soft Reset: This just reboots your phone, useful if you want to clear out the programs running in the background. Hold down Call (green button) + Menu + Power/End (red button)
  • Factory Reset: Restores your phone to factory default settings, deleting any data and applications on phone. Hold Home + Back + Power, then press the Call (green) button to confirm the reset.

I’ve heard that if you use the Back button to get out of applications, it actually shuts them down. That doesn’t seem to work for me, though. I’ve also heard that the new firmware (not yet released) will include a process manager, which should preclude the need to soft reset the phone.

« Previous entries Next Page » Next Page »

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