Everything Tagged "Linux"

(In reverse chronological order)

Simple encrypted directories with ecryptfs

The default ecryptfs-private settings aren’t quite what I want; they mount automatically on login and invoke some kind of system-magic I don’t understand to hide the encrypted files. Turns out that setting up encrypted directories is pretty darn easy, once you dig through enough of the man pages.

Pick a directory

mkdir ~/private
chmod 700 ~/private

Debugging the Droid on Ubuntu Karmic

$ adb devices
List of devices attached 
????????????	no permissions

A few things have changed since the Android docs were written. If you want to talk to your Motorola Droid via ADB in Ubuntu 9.10 Karmic, I recommend the following udev rule.

# /etc/udev/rules.d/99-android.rules
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", SYMLINK+="android_adb", MODE="0666" GROUP="plugdev"

Ubuntu 9.04 on the Macbook Pro (3,1)

Here’s what I did to get the Macbook Pro (rev 3,1) running smoothly under Ubuntu 9.04.

Turn on the nvidia drivers with jockey-gtk (the hardware drivers manager).

Add the keys for the mactel PPA: cr:code sudo apt-key adv –recv-keys –keyserver keyserver.ubuntu.com 0x8db7f87a2b97b7b8 </cr:code>

Process Monitoring with Ruby

It looks like there’s a catastrophic memory leak in the Rails app I wrote last summer, and in trying to track it down, I needed a way to look at process memory use over time. So, I put together this little library, LinuxProcess, which uses the proc filesystem to make it easier to monitor processes with Ruby. Enjoy!

New Features, SSH Completion, and the Dangers of Overloading the Core Library

Added ATOM feeds for journals, photographs, and a combined feed. Also added EXIF support to photographs, such that files with EXIF headers (those from about the last year or so) display some shot information as well.

Also, I caught bash programmable completion completing paths on remote servers over SSH. I was copying a file from the laptop to the server, hit tab to complete the directory on the server side... and it worked. That was quite surprising, when I realized that my ordinarily useless request had actually been carried out. Hurrah for bash making my life easier.

Had significant confusion yesterday night, when the tested and (so I thought) working code from the development machine threw strange exceptions on aphyr.com itself. The box claimed NoMethodError for Rational.reduce and Rational.to_f, both of which were quite clearly part of the standard library. Eventually realized that this was due to my custom Rational class, which has a very different interface from the standard library's version. Changed RUBYLIB to not load my custom libraries, and it worked.