Steven Gordon's Home

Welcome to my home page! I am currently living in Pathumthani, Thailand, working as an Assistant Professor in Sirindhorn International Institute of Technology, Thammasat University. Here you can find information about:

  • My research and teaching activities in the area of Telecommunications, the Internet and Computer Science at Thammasat Uni.
  • Some personal information about me including photos and articles on living in Pathumthani (part of greater Bangkok), diaries from past holidays in Africa, South East Asia and Canada, recipes and some computing stuff

Feel free to contact me if you have any questions.

Ubuntu One on a Headless Server

Per Liedman provides valuable instructions on how to use Ubuntu One (a 'Dropbox' style file sharing app for Ubuntu, created by Canonical) on a headless Ubuntu server. That is, you have no graphical interface, only the command line. Below are my notes of how I set it up, following Per's instructions with a few minor extra details regarding finding the token/secret and using u1sync.

On the headless server install u1sync, which is in the ubuntuone-client-tools package. My server is Ubuntu 10.04 LTS.

sgordon@lemon:~$ sudo apt-get install ubuntuone-client-tools

This installed a number of other packages (about 128MB) which I think are needed by the GUI but not the command line client. Not sure of a way to get only the command line client u1sync without these extra packages.

Now on a desktop PC with Ubuntu One already in use find the authentication token. My desktop is running Ubuntu 11.04. In the application "Passwords and Encryption Keys" in the "Passwords" tab expand "Passwords: login" to show a list of stored passwords. At least one should be "Ubuntu One". Double-click on it and then select and show the password. There is a long string like:

consumer_secret=aaaaa&token=bbbbb&consumer_key=ccccc&name=ddddd&token_secret=eeeee

where "aaaaa", "bbbbb" are long random-looking strings. You want the value for token and token_secret, that is, bbbbb and eeeee

Now back on the server run u1sync to initialise your Ubuntu One directory. In the commands below, when I write bbbbb and eeeee, substitute the values found above.

sgordon@lemon:~$ u1sync --init --oauth=bbbbb:eeeee /home/sgordon/Ubuntu\ One

Initializing directory...

Writing mirror metadata...

Done.

Now that the directory is initialised, to sync the files in it just run the u1sync command without the init option (below I've removed a lot of the output - it basically shows the list of files that are being synced):

sgordon@lemon:~$ u1sync  --oauth=bbbbb:eeeee /home/sgordon/Ubuntu\ One


Merging trees...
346.... DIR  /  sha1:3b6...
  957... FILE file1.tgz  sha1:16...
  ...

Syncing content...
▼   file1.tgz
...

Updating mirror metadata...

Done.

Now your directory on the server should contain the files that where in the "Ubuntu One" directory on your desktop. You can put the above u1sync in a script or cron job to regularly synchronise your files.

What I've Been Doing While Thailand is Flooded

Here's a brief summary of what's been happening and how the floods in Thailand affected me (including some photos of floods at Thammasat uni):

  1. Flood waters surrounded Thammasat Rangsit campus, where I live, from about 16 October. The southern entrance and road, Chiang Rak, was flooded making it inaccessible to only trucks and large 4WDs. The eastern entrance on Pahonyothin Road had some flooding, but vehicles could still pass (photos).
  2. On Wednesday 19 November Wan and I left our room on campus to stay with her family in Ratchaburi. Although on the 2nd floor of the building our room would not be flooded, if the water entered the campus electricity would eventually be turned off and most likely we would be evacuated (to the sport centre with 4000 other evacuees - as it turned out, they were later evacuated again off campus).
  3. After the nearby AIT was flooded, on 21 October flood waters entered the Thammasat campus via Science Park. Although the outer flood barriers of Thammasat were working, water entered Science Park via drains from AIT. As Science Park was higher than most of Thammasat campus, there were no flood barriers between them. Within a day or so, the entire campus was under 1 to 2m of water.
  4. Bangkadi Industrial Park, where I work, was flooded a couple of days later. Work has been shut from 12 October and is expected to open on Monday 19 December.
  5. I had a pre-planned trip to Fukuoka, Japan to visit Waseda University from 8-12 November. Although it was dry in Ratchaburi (west of Bangkok) and Suvarnabhumi Airport (east of Bangkok), I was concerned that the last remaining dry road from Ratchaburi to Bangkok would be flooded, and so spent two nights in Bangkok before leaving to Japan on Tuesday 8th.
  6. I had an enjoyable visit to Kityukushu and Hataka, visiting Waseda University and a small bit of sightseeing.
  7. After flying into Bangkok from Japan I went straight onto Melbourne, Australia and eventually home to Kongorong. Spent 2 weeks with my family working (on the farm and computer), playing cricket and tennis and celebrating dad's 70th birthday.
  8. Returned to Thailand on 25 November and then spent 2 weeks in Khon Kaen with Wan's family. This included a couple of nights in Phu Reau, Loei, (photos) a mountain area famous for its plants and 'agrotourism'.
  9. On 7 December we returned to our room at Thammasat Rangsit. The campus was dry, but the ground floor of all building had been damaged by the floods. Most of the furniture and office equipment has been destroyed (most furniture is made from particle board). Perhaps the main noticeable impact is the dead plants and trees. There is electricity and water available for the dorm buildings. Our 2nd floor room was ok, although had a bit of cleaning to do with the fridge.

Thammasat Rangsit opened for work on the 14th, but electricity is still not available in many buildings. SIIT Bangkadi opens on 19 December, so I'm actually looking forward to getting back to my office and back into teaching.

Sandilands Server Down Due to Thai Floods

Between 25 October and 10 November this website (sandilands.info) was down because of the flooding in central Thailand. The server was hosted in my room on Thammasat Rangsit campus in Pathumthani. The campus started taking in water around 21 October and soon the entire was under 1.5m of water. My room is on the 2nd floor so hopefully was not damaged, but the building has been shut with power turned off. I can't get to the campus - even if I did I doubt I'd be able to get into the building - and hence cannot restart the server.

I restored this site from a backup and it is now hosted elsewhere.

More info on the impact of the flooding and what I've been doing soon.

Flooding of Industrial Parks Around Bangkok

The flooding of industrial parks in Ayutthaya and Pathumthani is going to have a significant impact on the Thai economy. The parks (or estates) are home to 100's of factories of national and international companies primarily from the electronics and auto industries (e.g. Toshiba, Sony, Canon, Nikon, Honda, Toyota). So far at least five major estates have been affected by the floods:

  1. Saharattanakorn Industrial Estate was flooded on October 4.
  2. Rojana Industrial Estate was flooded on October 6.
  3. Hi-Tech Industrial Estate was flooded on October 13.
  4. Bang Pa In Industrial Estate was flooded on October 15.
  5. Nava Nakorn Industrial Estate has been partially flooded as of today, October 17

Nava Nakorn is the biggest and oldest of the estates, and supposedly the most protected from floods with 5m flood walls. After Bang Pa In was flooded, the resources of the companies, government and army were directed towards protecting Nava Nakorn. As of 11am today there were reports that Nava Nakorn was safe. But just before noon the Flood Relief Operations Centre (FROC) reported a break in one of the walls and then ordered the evacuation of all people in the area (up to 200,000 people live/work there, although not all at the same time).

Below is a rough map of the area showing the Bang Pa In and Nava Nakorn Estates, as well as Bangkadi Industrial Park (BIP). Bangkadi is expected to be the next park to be under threat by the floods.

Although I live on the main Thammasat Rangsit campus where SIIT has its main buildings, SIIT also has a small campus at Bangkadi. This is where I work

The distances between the estates, giving an idea of the flow of the flood, is: Saharattanakorn to Rojjana: 30km; Rojjana to Hi-Tech: 12km; Hi-Tech to Bang Pa In: 14km; Bang Pa In to Nava Nakorn: 19km; Nava Nakorn to Bangkadi: 22km.

Volunteers have been working since early last week in building up flood walls with sand bags. Lets hope their efforts pay off. Otherwise I may be away from the office for much more than just a few days.

Flooding Around Thammasat Rangsit Campus

The floods in Thailand have now surrounded Thammasat University, Rangsit Campus, in Pathumthani, where we live. The campus has been deserted by most staff and students (the uni is shut from 12 through to 19 October) but is a major shelter for those evacuated from Ayutthaya and other affected areas north of Bangkok (and the hospital is still operating). There are about 3000 evacuees staying in the main gym.

Now the water has basically surrounded the campus, with portions of the main highway east of the campus (Pahonyothin Road) flooded with accompanying traffic jams, as well as to the south (Chiang Rak Road). The villages and farm land to the west and north are also flooded. Its possible, but not guaranteed that the campus will also be flooded.

Here are a few photos taken today around the campus. The first is the village nearest to my dorm building. There is a canal between the village and campus, as well as a moat on the campus side, then a road and my dorm building. The shops next to the canal are about 1m under water.

Over the past few days and nights workers have been raising the barrier between the canal and the moat next to the campus by about 1m (see below). On the canal side, the water is almost at the height of the barrier before it was raised. This is added protection for the campus - at the expense of the village...

The next photo is my dorm building, showing the moat. My room is on the second floor so should be safe.

The road to the south of the campus has had minor flooding over the past week. Perhaps no more than a foot deep but creating traffic jams and blocking the U-turn near Pahonyothin Road. In the distance you can see the cars parked along the overpass. I've shifted my car to near AIT, which is raised by about another 1.5m.

From the news, Pahonyothin Road (the main highway leading north from Bangkok) also has flooding creating more traffic jams. We've decided to not leave the campus today and perhaps could be stuck here for the next couple of days.

Syndicate content