amoffat / focus

Prevents you from being on reddit or facebook all day
306 stars 19 forks source link

Added instructions how to get Focus working on Mac OS X. #10

Closed kjagiello closed 12 years ago

kjagiello commented 12 years ago

Simple instructions how to configure DNS on Mac OS X to work with Focus.

amoffat commented 12 years ago

Thanks! I have a question though... focus.py reads in the nameservers from /etc/resolv.conf, so that it knows which one to forward certain requests to. If Mac doesn't use resolv.conf, can you think of a good way for focus to know about the other nameservers?

kjagiello commented 12 years ago

It seems that Mac OS X uses /etc/resolv.conf to store the address of the nameserver. I'm far away from my Mac right now, but I will check that for you tommorow if nobody helps you with that before me.

kjagiello commented 12 years ago
Krzysztof-Jagiellos-MacBook:~ krzysztofjagiello$ cat /etc/resolv.conf 
#
# Mac OS X Notice
#
# This file is not used by the host name and address resolution
# or the DNS query routing mechanisms used by most processes on
# this Mac OS X system.
#
# This file is automatically generated.
#
domain adm.ovansiljan.net
nameserver 192.168.1.12
nameserver 192.168.1.13
amoffat commented 12 years ago

perfect, ok it should work fine then

cdetrio commented 12 years ago

The problem isn't focus.py being able to use /etc/resolv.conf. It is that the web browser (eg Chrome) does not resolve domains using resolv.conf ("most processes" as mentioned in the header), so even if 127.0.0.1 is in resolv.conf, the domain name requests made by the web browser never route to 127.0.0.1 (unless it is added to the DNS servers in the Mac system preferences) and therefore never to focus.py.

amoffat commented 12 years ago

Moving the discussion to issue #8