Monthly Archives: November 2006

linux-opera is the linux version of opera web browser. Some might be curious about why I run linux-opera on FreeBSD. The answer is simple: the linux-opera supports flash, but the FreeBSD native opera doesn’t.

linux-opera does have a strange behaviour of my laptop, however. When I use it in my office, it works fine; but at home, it fails to map the domain name to IP. That is, if types in IP, linux-opera works fine, but not the cases when types in domain name. It was very annoying, and none of the Google results help.

I accidentally discover that opera provide one command-line option: -debugdns

As the name suggest, it prints the debug messages about how it treats the DNS queries.
After some trials, I finally find out the cause of the problem. It was the incompatibility of gethostname() between linux emulator and FreeBSD.

In my office, the DHCP successfully set the /etc/resolv.conf to a valid name servers. The gethostname() used by linux-opera are not confused. However, at home, the DHCP direct my DNS queries to my gateway (my ADSL MODEM) by setting the name server to 10.1.1.1. The native gethostname() is able to get the right IP of hostnames, so other FreeBSD applications have no problem with it. But the gethostname() in linux-opera might not comprehend what 10.1.1.1 returns and resolve the given hostnames the wrong IPs. So the linux-opera at home does not work because the resolver of linux-emulator cannot resolve the domain properly.

Resolution:

Surprisingly simple. Edit the /compat/linux/etc/resolv.conf and add some lines such as:

MPD is a netgraph based implementation of the multi-link PPP protocol for FreeBSD. One of the main feature of mpd is the capability to establish the VPN connection. After extensive testing, I found:

Don’t use mpd4 yet, for it always enables chap even you explictly disable it.

Not many VPN server support the set link ident command.

Check the route setting, it a is critical sucess factor.

My VPN environment

I use my laptop to connect the VPN in office at home or office. But the setting at home and at office is quite different. In office, I wish to set all the Internet traffic through VPN so I can use the Internet bandwidth of the university instead consume my own quota. The university blocks many websites but I want to access those websites at home, so the traffic to the university go through VPN, and the others go through default gateway.

rsync is a smart program to copy files between different directories or machines. I used to use it on day-to-day basis. However, it didn’t not work as smart as it appear to be. I even considered writing a synchronising program on my own.

Nevertheless, a few days ago I re-read the manual and find something interesting:

If synchronising with local directories, it will copy the whole files as needed.

If synchronising with remote directories, it will use its increamental algorithm to do the job.

Summary: if sychronising with remote directories such as those on samba servers, it is better not to sync them as mounted directories. Instead, sync them as folders on the remote sites.

Here is the parameters I am using at the moment:

rsync -Crvzlui --stats --progress --delete

* There is one drawback, though. I have not figureed out how to set the automatic login, so I have to type password every time.

Ubuntu is a Linux distribution which targets on the ordinary enduser. Recently I installed it on my Lab desktop. At the beginning, it looked really nice and the default setting was good enough for ordinary users. Several hours later, however, I found that I need to fine-tune and frustrated for the location of the configuration files and the options is different from FreeBSD.

First of all, in FreeBSD, the system wide configuration files are usually located in following locations: /etc, /usr/local/etc and /usr/X11R6/etc. The binary files of application can be found in /usr/local/bin, /usr/local/sbin. /usr/X11R6/bin and /usr/X11R6/sbin (I am talking about ports/packages). Ubuntu seems simpiler, just /etc and /usr/bin.

The really nasty things are incompatibity command-line options. An “incomprehensive” list of the difference command-line options between FreeBSD and Ubuntu does not is listed as follow:

FreeBSD

Ubuntu

ls

-w Force raw printing of non-printable characters.

Color support: -G

-w: set assumed screen width

Color support: –color

rm

-I Request confirmation once if more than three files are being removed

no -I

rsync

-8, –8-bit-output leave high-bit chars unescaped in output

Don’t support -8

Of course there are more incompatible command options, but that’s the matter of “Don’t use, don’t bother.” 😛