September 4th, 2008
It has been months since I converted my work machine from Windows XP to Ubuntu Hardy. There is only one program I miss, the fabulous Leo text editor. Leo is not just a text editor. If it were only that I would have little use for Leo, since I already use Emacs, the one true text editor. Leo is an outlining editor for programmers, one designed specifically for working with tree structured text such as xml or html. Even better, with a bit of tinkering, Leo can hand off straight text editing to Emacs (or even Vim). Emacs in effect works as a plugin within Leo, giving the user the best of both worlds.
The sad truth is that Leo does run on linux, but it uses tcl/tk for its gui. With the versions of python and tcl/tk currently available on Ubuntu Hardy, Leo’s font rendering is so bad I can’t bear to use it. Leo looks great on Windows, bad on linux, and perhaps even worse on Mac. Strange.
I spent some time trying to track down a way to get antialiased fonts working for Leo on Ubuntu, but had no luck. I did find a thread that suggested installing tcl8.5 and compiling Python from source, but decided not to bother with it. Intrepid Ibex is supposed to be released end of next month, and Python 2.6 is also due for release in October. I can wait a bit longer. Another few months and I think there is a decent chance that Leo will provide antialiased fonts out of the box.
Filed in linux, python
-
2 Comments
September 4th, 2008
I want to pass along a nice tip. It seems that Google has introduced a free 411 information service. Considering that my carrier charges a dollar or thereabouts for directory assistance, I think this is excellent news. The number to call is 800 GOOG 411 (800 4664 411).
Filed in Uncategorized
-
0 Comments
August 28th, 2008
I’ve been reading the buzz about Amazon’s EC2 technology for a while, and have finally gotten an opportunity to work with it. Basically, I am using virtual machines as test boxes/clusters for a new product release.
So far I am impressed by rich ecosystem that has evolved around EC2, including many machine images and excellent tutorials. I especially like the Elasticfox Firefox extension. It is a must have for EC2 users. There’s not much documentation on the download site, but there is a tutorial here.
Filed in virtualization
-
0 Comments
August 7th, 2008
The great thing about Ubuntu and other Debian derivatives is the apt package system. Most of the time apt makes installing, deleting, or updating software trivially easy. In rare cases, appropriate apt packages are not available, or the packages are not quite correct. I ran into one of those cases trying to install Ruby on Ubuntu Hardy.
I’m not a Ruby guy, but I wanted to give Capistrano a try, and so decided to install the prerequisites, Ruby and RubyGems. They installed, but gems did not seem to work correctly. So I used apt to uninstall them and looked for another option. I found clear and detailed instructions on how to perform the install at the FiveRuns blog. Thank you, FiveRuns, that was very helpful.
Filed in ubuntu
-
0 Comments
June 14th, 2008
I find the locate command useful, and so like to keep the locate database more or less current. OS X makes this harder than it needs to be by hiding the updatedb command. Here’s how to fix it.
sudo ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
Filed in linux, mac
-
0 Comments
June 2nd, 2008
A reader made an interesting comment in reply to an old post. I had experienced some problems running a make file included with the sample code for Joe Armstrong’s Programming Erlang.
Gijsbert de Haan wrote:
About your directory troubles, you might have to unset CDPATH. I have never taken the time to figure out why, but make and CDPATH don’t go well together (it’s like make/shell forgets to look in the current directory when it has a CDPATH.
I have not had a chance to look into it, but that sounds very plausible. Recorded for posterity. Thank you, Gijsbert.
Filed in linux, prothestic memory
-
1 Comments
May 25th, 2008
I want to record what I had to do to get man page support working correctly in emacs erlang-mode under Ubuntu Hardy Heron.
First, set the erlang root directory for erlang-mode:
(setq erlang-root-dir "/usr/lib/erlang")
Next put a symbolic link to the man pages in the erlang root directory.
cd /usr/lib/erlang
sudo rmdir man #the man dir installed by apt was empty
sudo ln -s /usr/share/man/ man
After that, I restarted erlang-mode and man page support worked.
Filed in emacs, erlang, ubuntu
-
0 Comments
May 21st, 2008
I generally have several terminal windows open, and like them to have different background colors. I wrote this script to automatically rotate background colors as I launch new urxvt terminal instances.
#!/bin/bash
##
## rotate background colors in succesive launchings of urxvt terminal
##
## The preferred colors, and how many there are
colors=( "#ede1bb" "#dadad0" "#ffffdd" "#ced9d3" "#a8a892" "#ffe0cc")
ncolors=${#colors[*]}
# Keep track of most recent color choice via this file
COLORFILE=~/.colorchoice
if [ ! -f "$COLORFILE" ]
then
echo COLORCHOICE=0 > $COLORFILE
fi
source $COLORFILE ## read the most recently used color
## choice is an index into the colors array
let "choice = (1 + $COLORCHOICE) % $ncolors" ## increment previous choice, modulo ncolors
echo COLORCHOICE=$choice > $COLORFILE ## update global state
urxvt +sb -bg ${colors[$choice]} ## The +sb option kills the scrollbar
Filed in linux
-
0 Comments
May 5th, 2008
It’s been a while since I posted, mostly because I have been swamped at work. But I ran across a sweet tip I want to document. Macosxhints ran a brief article called Mount a gateway-accessed server directly using MacFUSE. That sounded really handy to me, but I had to modify their instructions to get them to work.
Here’s the use case. I want to use sshfs to mount a remote file system. The remote machine is called tangerine, but there is a catch. Tangerine is not directly accessible. I have to go through another machine, one called fennel. The client machine for all of this is my mac, called willow, but its name does not matter here.
I have sshfs.app installed in the Applications directory of my mac, but this is going to require some command line work. The first step is to create a symbolic link to sshfs. This is done exactly as described by Macosxhints:
sudo ln -s /Applications/sshfs.app/Contents/Resources/sshfs-static /usr/bin/sshfs
Next step: I created a shell script in my home directory on the mac. I put the script in /Users/joe/bin/fennel-ssh. Here it is:
#!/bin/sh
ssh -i /Users/joe/.ssh/id_rsa drc@99.999.999.99 ssh $@
Some explanations. /Users/joe/.ssh/id_rsa is my private RSA key; I previously set things up so that this key authenticates me on both fennel and tangerine. 99.999.999.99 is the (obfuscated) ip address of the gateway machine, fennel. My userid on fennel is drc. Note that the Macosxhints version of this script did not pass in the RSA key, nor did it specify a user on the remote machine.
Here is how the script is used:
sshfs -o ssh_command=”/Users/joe/bin/fennel-ssh” drc@tangerine:/home/drc /Users/joe/remote -oreconnect,volname=tangerine
The command above mounted my tangerine home directory, /home/drc, on my mac desktop, with a label of ‘tangerine’. /Users/joe/remote is an empty directory used as a mount point. I’ll write another script to parameterize and encapsulate the long command above when I get a chance. Enjoy.
Filed in how-to, ssh
-
0 Comments
March 29th, 2008
I want to give props to the fine folks at VMWare. Their products helped me to solve a nagging and difficult problem, quickly and cheaply.
This was the problem. I work at a small java development shop which started with a Windows infrastructure. Back in around 1999 or 2000 someone set up a box to act as our Windows domain controller. The little Dell workhorse is still running nine years later. The odds are that thing is going to fail one of these days, leaving us in the lurch.
Over the years we have been moving away from Windows. Our standard dev box is now the Mac Pro, and several old boxes have been turned to linux servers. But we need the domain controller because most of the non-tech staff still uses Windows. Losing our domain controller abruptly would hurt. On the other hand, time is money, and no one has had the time or expertise to set up a new domain controller. And we don’t want to sink more money into Windows.
So here’s what I did. I downloaded the free VMWare Converter and used it to make a virtual clone of the domain controller. I installed VMWare Worstation on a decent underused machine, only about year old. I shut down the physical domain controller and brought up the virtual one. I then changed the virutual controller’s ip address to match the physical controller’s.
I’ve only done about an hour of testing, but everything seems to work as before, including mail, Window remote terminal services, access to shared resources on the LAN, and VPN access. Time will tell, but I have the feeling that this is going to work.
The benefits of the change:
- The virtual machine on the newer hardware is faster the the ancient physical machine.
- No time or effort wasted on configuring a new domain controller .
- We can easily back up the virtual machine, and migrate to new hardware as needed.
- We can take snapshots of the virtual machine prior to changes, and easily roll back the changes if necessary.
- We no longer rely on a nine year old machine for a critical function.
- Money out the door: $189 for a copy of VMWare Workstation.
Filed in hardware, technology
-
0 Comments