Setting DNS Manually on Ubuntu Linux

Introduction: Domain name servers (DNS) provide the numerical addresses for sites on the Internet. When you type cafebedouin.org into your browser, your computer queries a DNS name server to get a numerical address. This numerical address is then used to contact the site.  Normally, configuring DNS is handled behind the scenes by Dynamic Host Configuration Protocol (DCHP) automatically.

For some situations, you’ll want to set a different DNS server than the one set by DCHP. Maybe your Internet Service Provider (ISP) uses their own DNS server that is slower than Google’s DNS server. Maybe you use a Virtual Private Network (VPN) and want to stop DNS leaks to your ISP.

In Linux and other UNIX-like operating systems in the past,  you would change configuration files, such as /etc/resolv.conf or /etc/dchp/dhclient.conf, to set DNS manually. 

The problem: Changing resolv.conf and dhclient.conf configuration files does not work in Ubuntu.

The solution: Starting with 17.10, Ubuntu uses netplan to set DNS. On my test machine, netplan’s configuration file looks like this:

version: 2
   renderer: NetworkManager

It is possible to manually do the job of DCHP in netplan, but it’s complicated. If your objective is to just change the DNS servers, there is an easier way to do it. Use Network Manager.

There are files in the directory /etc/NetworkManager/system-connections that define how DCHP should work for each network connection. To the files listed in that directory, add the following with DNS server IP addresses under [ipv4]:

dns-search=
method=auto
dns=84.200.69.80;84.200.70.40;45.33.97.5;
ignore-auto-dns=true

The DNS servers in this example are from FreeDNS and DNS Watch.

After adding the DNS IP addresses, separated by a semi-colon, then from the command line, do: sudo service network-manager restart

Once completed, you should be on your DNS server of choice. It’s a little inconvenient to have to add these lines to each network-connection file, and there might be a better way. But, this will work.

Arbitrary Image Stylization in the Browser

ai-arbitrary

Arbitrary Image Stylization in the Browser is an algorithm that will take any two pictures and apply the style of both of them to a third picture.

For an example, I took two posters from the Spanish Civil War that are out of copyright, i.e., Victoria and Izquierda, and I applied those styles to the official picture of President Trump on Wikipedia. The following was the result:

ai-arbitrary-trump

I did something similar with my avatar.

mono-psycho

It took a couple of minutes to run on my computer. It helps to close a few tabs. The results were consistently interesting. Recommended.

Interactive Fiction & Text-Based Games

Interactive fiction is text-driven games and stories most commonly associated with the dawn of the computing age and games like Zork. Depending on one’s definition, you might be able to stretch the category to include games like Nethack.

Today, it is a thriving sub-culture with new works being created by independent creators. The Interactive Fiction Database is a good way to find great games or genres. The Interactive Fiction Competition a good place to look for new works. For a gentle introduction, try one of the many guides available.

Play Now

The game 9:05, playable via the link, is a commonly referenced entry point to interactive fiction and is also used by English as a Second Language teachers to teach basic English vocabulary.

If you’d like to go old-school, some have been made playable in a web-browser. Want to play Zork without installing any software? Now you can.

Or, if you want to get a feel for these types of games but still want some graphics, try Nethack, a dungeon exploration game with permadeath which has recently been updated. Easy to learn to play, but very difficult to master. “Internet user needs food badly!” Best played cold, but it is also interesting to play if you read the spoilers.

Browsh

“Browsh is a fully-modern text-based browser. It renders anything that a modern browser can; HTML5, CSS3, JS, video and even WebGL. Its main purpose is to be run on a remote server and accessed via SSH/Mosh or the in-browser HTML service in order to significantly reduce bandwidth and thus both increase browsing speeds and decrease bandwidth costs.”

https://www.brow.sh/

Gobo

“Sign up for Gobo, link it to your other social media profiles, and you can take control of your feed. Want to read news you aren’t otherwise seeing? Use our “Echo Chamber” filter to see what we call “wider” news. Want a better balance of men and women in your feed? Use our “gender” filter to rebalance it. Want to take a lunch break and just see popular funny videos you friends are sharing? Use our “virality” filter to pick only the most shared content. With Gogo you’re in charge of the algorithmic filters that control what you see on social media. We’ve built a bunch of filters like these already, are building more, and have made it possible for other developers to add filters too. Sign up, try it out, and see if it changes how you think about how social media should work.”

Gobo