Posted by Paul Kehrer on February 27, 2010 1 comment
I installed the 10.04 LTS (Lucid Lynx) 64-bit alpha 3 this morning to check out some of the new features. And since I’ve done afewotherarticles about running Ubuntu in a VM I thought I’d share the experience yet again.
If you’re running VMWare Fusion 3.0+ (or the current release of Workstation 7) then the version of VMWare Tools you have with your software can successfully install with no manual intervention. Simply pick easy install and let VMWare do all the work.
If you’re running an older version you will want to take a look at my Ubuntu 9.10 instructions for help with getting open-vm-tools running for you in 10.04.
I’ll update this article if anything changes (the kernel freeze for Lucid Lynx is not until March 11).
Posted by Paul Kehrer on February 24, 2010 0 comments
As of r39934 Chromium now supports the server_name TLS extension (server name indication) in OS X (latest build). This support requires OS X 10.5.7 or later. Hopefully it’ll make its way into a dev/beta/stable release of Google Chrome itself soon.
For those who are more curious than they ought to be about how I wrote this patch… Apple added support in their Secure Transport library for the server_name TLS extension, but has not updated their documentation. As of 10.5.7 (or possibly 10.5.6) the SSLSetPeerDomainName function — which is ostensibly used for OS level certificate verification — causes OS X to send the server_name extension in the TLS client hello. However, since Chromium doesn’t use OS X’s built-in verification it wasn’t passing this data through prior to the patch.
To test you can hit up my IDN SNI site https://☣.ws/ or https://alice.sni.velox.ch/. The former will throw a certificate error if you are on a non-SNI enabled browser and the latter will have text stating that the SNI extension is missing.
Posted by Paul Kehrer on February 6, 2010 0 comments
When I purchased my 5D I told myself I’d try my hand at a video. Well, one year later I’ve finally worked up the ambition to learn some video editing and publish something This video represents the past year of owning this camera. I learned a great deal in the process (mostly about how to shoot better source footage for the future), but I hope you all enjoy it. Click here to go to the Vimeo page to view in HD or download the original 1080p source. The non-HD (bleh) version appears below1.
Posted by Paul Kehrer on January 31, 2010 4 comments
Many new Wireshark users on Mac OS X run into an issue where no interfaces show up when trying to begin packet capture. If you attempt to manually input an interface (such as en0) this error will occur:
The capture session could not be initiated ((no devices found) /dev/bpf0: Permission denied).
To have the interfaces show up properly you’ll need to widen the permissions on the Berkeley packet filter (BPF). By default they look like this:
crw------- 1 root wheel 23, 0 Jan 3113:47/dev/bpf0
We need the filter to be readable by non-root, so open Terminal.app and run this command:
sudochmod644/dev/bpf*
Unfortunately every time you reboot this will reset, but if you are a frequent user of Wireshark you can add the ChmodBPF StartupItem to alter them automatically (available in the Utilities folder on the Wireshark disk image). To install you’ll need to follow two steps.
First, drag the ChmodBPF folder to the StartupItems alias in the same folder (or drag it to /Library/StartupItems directly). Type your password to authenticate and move the folder into the correct location.
The second requirement is only for 10.6+ users. Starting with Snow Leopard the security permissions of StartupItems are being enforced. Scripts that do not have the proper owner and group will receive this error:
Insecure Startup Item disabled. – “/Library/StartupItems/ChmodBPF” has not been started because it does not have the proper security settings
The proper security settings are ownership of the scripts by root and group of wheel.1 To set them:
sudochown-R root:wheel ChmodBPF
The correct settings for startup items can be found in this Apple KB article↩
Posted by Paul Kehrer on January 29, 2010 0 comments
I have returned from my trip to Costa Rica! Typically I don’t write about my personal experiences on this blog, but I’ve decided to try a photo journal style entry this time. Don’t worry, your regular nerd posts will resume shortly. As always, click the photo to go to the Flickr page. From there you can view any photo in much larger sizes. Be sure to view the set in its entirety as well.
Sunday, January 24
This bird was sitting near the patio of my hotel room in the morning
A boy picks something out of the water at sunset on the beach
Posted by Paul Kehrer on January 20, 2010 2 comments
Bash is an extremely powerful shell, but its shortcuts are not readily apparent. Here are a few shortcuts and tips that I’ve noticed many (already proficient) bash users are not aware of. You can also check out Improved Bash History and More Useful Bash/Terminal Settings for more ideas for improving your bash productivity.
Bash Navigation Shortcuts
When editing a long command, there are quite a few navigation and editing shortcuts. By default bash typically operates in emacs mode.
Ctrl-A to go to the beginning of the line
Ctrl-E to go to the end of a line.
Ctrl-W will cut the current word (searching backward)
Ctrl-U will cut everything before the cursor
Ctrl-K cuts everything after the cursor
Ctrl-Y pastes the last text that was cut
Ctrl-T swaps the order of the last two characters entered1
Meta-B will move the cursor back one word
Meta-F will move the cursor forward one word
Meta keys are a bit tricky since they can differ based on your terminal application. On Windows/Linux it is typically Alt and on Mac OS X Terminal.app defaults to using Esc (but you can change it to option/alt in the preferences).
However, bash also has a vi/vim editing mode. To enable this type “set -o vi”. At this point all the typical vi shortcuts are available if you enter command mode (by hitting Esc). I don’t recommend using this unless you are very comfortable with vi already.
reverse-i-search
You can search through your history and rapidly find a command used previously with reverse-i-search. To invoke, press Ctrl-R and start typing. If you have multiple matches, hit Ctrl-R to cycle through them all. When coupled with an improved bash history this is an extraordinarily useful tool.
Controlling Tasks in Bash
Bash allows you to stop, background, and foreground tasks. To background a process before it starts simply add & to the end of your command.2
mycommand &[1]1922
If you have an already running task and you’d like to stop it press Ctrl-Z. This task will obtain a job number (the number in brackets).
[1]+ Stopped mycommand
You can then resume the task in the foreground with fg # or background it with bg #. To see a list of jobs that have been backgrounded or stopped type jobs.
Redirecting stderr/stdout in Bash
Bash has two main output buffers: stderr and stdout. Both of these, by default, output to your terminal window.
To redirect stdout to a file add > /path/to/output
To redirect stderr to a file add 2> /path/to/output
To redirect stderr into stdout add 2>&1
This shortcut is available in both emacs and vi mode, but I’ve placed it here since it uses the Control key. ↩
Output from stdout and stderr will continue to appear in your terminal, so consider redirecting them if needed. ↩