Author Archives: Sampo Smolander

Coach USA bus line 100 from New York Port Authority terminal to Princeton

After a Sunday picnic at Central Park in Manhattan, I took the Coach USA bus line 100 back to Princeton. I kept notes on the actual times vs. times in the timetable:

Location Timetable Actual time
leave from bus terminal 20:00 20:14
out of Lincoln tunnel 20:21
start of toll roal 20:26
end of toll road 20:54
New Brunswick, Neilson Plaza 20:40 20:57
New Brunswick downtown, train station 20:50 21:07
Kingston 21:20 21:55
Princeton, Palmer Square 21:30 22:05 (estimate)

This was a Sunday evening (May 3rd, 2015). There was no heavy traffic. I mean, the streets were not empty, but in no place was the bus stuck in traffic, and the traffic flowed smoothly.

If you are going to New Brunswick, the bus can be competitive. The bus drives on the New Jersey Turnpike toll road almost the whole way, and doesn’t stop even once before Neilson Plaza. A NJ Transit train from New York Penn Station no New Brunswick is, according to timetables, 53 to 60 minutes, and the train stops at 10 stations in between, while the bus stops at none. The bus could be very competitive, if it didn’t leave 14 minutes late.

But after New Brunswick, the train goes only 15-20 minutes to Princeton Junction, and then about 10 more minutes to take the Dinky from Princeton Junction to Princeton. (And then, about 10 minutes walk, if you want to go to Palmer Square, where the bus stops.) But the bus takes almost an hour from New Brunswick to Princeton.

Then again, the trains don’t always run on time, either.

How to turn off laptop webcam in Ubuntu

I have a Lenovo 3000 V100 laptop.

With Ubuntu 10.04 Lucid Lynx, I was able to turn off the integrated webcam (the led annoys me) by putting these lines in /etc/rc.local

echo 0 > /sys/bus/usb/devices/1-5/bConfigurationValue
echo "suspend" > /sys/bus/usb/devices/1-5/power/level

I don’t quite understand what they do, but they worked. For some reason I also don’t quite understand, after updating to Ubuntu 11.04 Natty Narwhal, they stopped working. However, adding this line to /etc/modprobe.d/blacklist.conf

blacklist gspca_m5602

seems to work (after a reboot). Apparently it prevents the loading of the kernel module containing the driver for the webcam. I used the lsmod command to find out that gspca_m5602 looks like the module related to the webcam.

Are there any other (less brute) ways to turn off the webcam?

Making recursive make verbose

Running recursive make (Makefiles that visit other directories and call make there recursively), if you want all the makes to be more verbose, define an environmental variable VERBOSE=1 on the shell (at least works with bash syntax, I am not sure of other shells) line calling make:

VERBOSE=1 make
make VERBOSE=1

Keeping ssh connection alive

Hotel’s firewall apparently drops inactive connections after a while, and I get that “connection reset by peer” message, and my ssh-connection is lost. An easy fix is:

ssh -o "ServerAliveInterval 300"

This makes some traffic every 300 seconds even if I’m not doing much on the computer, and keeps the connection alive.

SOCKS port forwarding with ssh

Fist open ssh-connection with -D, like:

ssh -D 1234

Then in Firefox, in Edit / Preferences / Advanced / Network / Settings, choose Manual proxy configuration, the Use this proxy server for all protocols has to be unchecked, in SOCKS Host put localhost and in Port 1234. Make sure that all the other lines are empty (well it’s ok if there is 0 on other Port lines).

Now you can browse as if you were browsing from This is handy if the people at host.somewhere do not provide a real proxy server.

(That 1234 above can be any number between 1024–49151.)

hello, world

I am Sampo Smolander, I work at the Division of Atmospheric Sciences, Department of Physics, University of Helsinki. My PhD thesis was about radiative transfer in forest canopies and vegetation remote sensing. Since then, I’ve been working on various aspects of biosphere-atmosphere interactions in local and global models.

I will, try to, blog on topics more or less related to models, ecosystems, and the programming and numerics involved in modelling.