Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/specialunderwear/Hosts.prefpane

a Cocoa GUI for /etc/hosts
https://github.com/specialunderwear/Hosts.prefpane

Last synced: about 2 months ago
JSON representation

a Cocoa GUI for /etc/hosts

Lists

README

        

## Hosts, a system preference pane to manage your hosts file

Hosts adds a preference pane to your system preferences which lets you toggle your
host file entries on and off, as well as add and remove them.

Hosts.prefpane likes to keep your hosts file clean. When an entry is toggled off,
it is not commented out in the hosts file, but instead stored in the app's
preferences storage. This means you will have to uncomment all your unused host
entries and untoggle them in the prefpane if you want to use them. Comments are
treated as comments and will never show up in the list of host entries!

Of course Hosts.prefpane will detect edits you made to the ``/etc/hosts`` directly and
merge them into the listing.

Backups of your hosts file are made in ``~/Library/Application Support/Hosts``.
The backup or your hosts file from before you started using Hosts.prefpane is
called *hosts.orig* and each session a backup is made called *hosts.session*.

The default host entries that are needed by the OS are hidden and can not be
edited using Hosts.prefpane.

Many thanks to the [contributors](https://github.com/specialunderwear/Hosts.prefpane/graphs/contributors)
for helping getting the latest release done!

![](https://github.com/specialunderwear/Hosts.prefpane/raw/master/screenshots/locked.png)
![](https://github.com/specialunderwear/Hosts.prefpane/raw/master/screenshots/edit.png)

## Download
For now you'll find the latest pre-built preference pane and the app on [Dirk-'s website](https://www.dirk-froehling.de/downloads/downloads.html). ``Hosts App 1.4.5.zip`` includes the app which can be used from any location on your disk. ``Hosts PrefPane 1.4.5.pkg`` is an installer for the preference pane. It will get installed into ``/Library/PreferencePanes``, so you have to enter your admin credentials during installation. The installer is neccessary for macOS Catalina, since all executables have to be notarized, and you cannot notarize a preference pane.

## Development hints
### Compiling the parser
To compile the parser protion of the Hosts PrefPane, you need to have ``bison`` installed somewhere. The current compiler setting expects bison to be in ``/usr/local/opt/bison/bin/``. This is where [Homebrew](https://brew.sh/) installs it (``brew install bison``).

### Catalina Installation
Preparing the app for installation on Catalina (macOS 10.15) or higher is straightforward. Just "Archive" the app from Xcode and go through the normal notarization process.

Preparing the preference pane for installation on Catalina is not that easy. You have to build an installer by using command line tools and deal with all the right developer certificates. Here is a [good description of the process](https://scriptingosx.com/2019/09/notarize-a-command-line-tool/) using a command line tool as an example project.

## Licence

Hosts, a system preference pane to manage your hosts file.
Copyright (C) 2011 PermanentMarkers

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see .

Contact maintainer at [email protected]