Lighthouse

May 4th, 2013
Lighthouse - Filtvet, Norway

This is a HDR image of a lighthouse located in Hurum county where I was born and raised. It is composed by three exposures. I have adjusted saturation, contrast and the detail level.

The amazing and sad story about Rosalind Franklin

February 28th, 2013

Rosalind Franklin was absolutely essential in solving the puzzle of DNA. Her male colleagues, Watson, Crick and Wilkins, built and partially copied their findings in Watson’s research: The first X-ray images of a DNA structure. Colleagues stole most of the credit and received the Nobel Prize in chemistry. Rosalind Franklin died four years earlier. 50 years after her death, it was revealed that she was never nominated.

http://en.wikipedia.org/wiki/Rosalind_Franklin

 

The moon behind clouds yesterday

January 21st, 2013

A long exposure photography of the sky last night. You can actually spot The Big Dipper in the upper left corner. I could not see it with my bare eyes, I first saw it in the picture on my computer

The moon behind clouds

You can spot the The Big Dipper near the upper left corner.

 

If Chrome’s Java plugin is not working

January 15th, 2013

When I had updated Java  (JRE 7 Update 10) on my Windows 7 desktop computer I found that the Java plugin in Chrome had stopped working. I noticed that Java did not have any MIME types in the plugin list (chrome://plugins/), you should see a long list of different MIME handlers. After a lot of research I found that it the path of the plugin was wrong, and after some googling I found this little tip at the awesome stackoverflow.com. As an user commented it is possible to just edit the path directly in registry, at least it worked for me:

  • Open “regedit” and find:
  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MozillaPlugins\@java.com/JavaPlugin
  • Important! Before you edit anything in the registry, remember to create a backup (File > Export)
  • Edit the path to be something like “C:\Program Files (x86)\Java\jre7\bin\plugin2\npjp2.dll”, depending on which version of Java you are using, etc, etc.
  • Restart Chrome

Good luck!

 

If Linux (Ubuntu) cannot resolve hostname

February 18th, 2012

I used a couple of hours today to find out why my laptop ( Ubuntu 10.04 ) could resolve the hostname of all other devices on my network, but my server ( Ubuntu Server 10.04 ) and desktop ( Ubuntu 11.10 ) could not. First I suspected it to be a misconfiguration in Samba, but after lot of searching in the /etc/samba/smb.conf i found that it didn’t have anything to do with my problem. It was not worthless because I learned a lot more about Linux and networking, and one thing that might be useful to others is this little commented line in the Samba config file:

name resolve order = lmhosts host wins bcast

Here you can change the order the different network protocols that should be resolved. What pointed me in the right direction was the command simple but very useful Linux command “dig” which stands for “domain information groper”. By simply typing:

dig

Which is very useful for troubleshooting network problems in general. Test it yourself by typing e.g.:

dig wikipedia.com

and you will get a very nice output on how the domain name is resolved. The part that helped me a was the third next line in the output:

; <<>> DiG 9.7.0-P1 <<>> wikipedia.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11524
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 3

;; QUESTION SECTION:
;wikipedia.com. IN A

;; ANSWER SECTION:
wikipedia.com. 1305 IN A 208.80.152.201

;; AUTHORITY SECTION:
wikipedia.com. 82430 IN NS ns2.wikimedia.org.
wikipedia.com. 82430 IN NS ns0.wikimedia.org.
wikipedia.com. 82430 IN NS ns1.wikimedia.org.

;; ADDITIONAL SECTION:
ns0.wikimedia.org. 1420 IN A 208.80.152.130
ns1.wikimedia.org. 1420 IN A 208.80.152.142
ns2.wikimedia.org. 1420 IN A 91.198.174.4

;; Query time: 11 msec
;; SERVER: 192.168.10.1#53(192.168.10.1)
;; WHEN: Sat Feb 18 16:09:39 2012
;; MSG SIZE rcvd: 162

On my laptop, the one that could resolve hostname the output was:

;; SERVER: 208.122.23.22#53(208.122.23.22)

This DNS server belongs to UnblockUS which is a service to unblock services that is for USA only. I used it to watch netflix.com in Norway. On the other computers the command printed out my ISP ‘s DNS primary server and there is no way a local hostname can be resolved by using a DNS server that is not connected to your local network (LAN). The reason that it worked  on my laptop I believe is that my UnblockUS subscription had expired and then my laptop used my router as a DNS server instead.

So finally, here is the Solution:

I checked my /etc/resolv.conf file and found that Ubuntu automatically fetched my ISP’s DNS server IPs and saved it here every time the network was getting the IP address from the DHCP server on the router. There is useless just to change the /etc/resolv.conf file because then it is overwritten every time the network daemon  starts. If you are using Gnome interface, right click on network icon > Edit Connections > IPv4 (tab) > Automatic (DHCP) addresses only (from the dropdown menu) and enter the IP address to your router in the DNS servers: field. The location may vary depending on which Ubuntu version you have and if you have wireless or wired connection, but you will find it if you look around the dialogue boxes.

On my headless server I used static DHCP on my router. I changed this to be a static IP on my server instead by editing /etc/network/interfaces using nano:

sudo nano /etc/network/interfaces

Before:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

After:

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.10.2
netmask 255.255.255.0
gateway 192.168.10.1

Change your /etc/network/interfaces according to your network configuration. Edit your /etc/resolv.conf  and add your router as nameserver:

nameserver 192.168.10.1

Feel free to comment if you find errors or have any questions.