{"id":218,"date":"1997-09-09T01:36:29","date_gmt":"1997-09-09T09:36:29","guid":{"rendered":"http:\/\/www.birdhouse.org\/betips\/?p=218"},"modified":"1997-09-09T01:36:29","modified_gmt":"1997-09-09T09:36:29","slug":"netpositive-access-hidden-preferences","status":"publish","type":"post","link":"https:\/\/www.betips.net\/?p=218","title":{"rendered":"NetPositive: Access hidden preferences"},"content":{"rendered":"<p>NetPositive now has many more options and settings than it used to, but believe it or not, there are yet more configurable settings that you can&#8217;t access from its Edit | Preferences menu. But before you bother looking around for a text-based configuration file, don&#8217;t bother &#8212; you won&#8217;t find one, because preferences are now stored in attributes attached to <code>~\/config\/settings\/NetPositive\/settings<\/code>.<br \/>\nYou can use any method you like for editing these attributes (the command line, for instance), but you&#8217;ll probably find that the easiest way is to drag this file onto the DiskProbe icon, then pull down DiskProbe&#8217;s Attributes menu. Most settings are either on or off, as specified by a zero or a one. A good example of a setting you can edit from here that you can&#8217;t establish by normal means are the HaikuErrorMessages &#8212; set this Attribute to 0, close DiskProbe, restart NetPositive, and you&#8217;ll now get standard, boring error messages from the browser.<br \/>\nIf you&#8217;d like to make the process a little more user-friendly, save the script below (written by NetPositive&#8217;s chief engineer, Scott Barta) to <code>\/boot\/home\/config\/bin\/nphaiku<\/code> and run either<br \/>\nnphaiku on<br \/> or<br \/> nphaiku off<br \/>\nfrom the command line. Note that you can easily hack this script to control other hidden NetPositive settings.<\/p>\n<pre>\nif [ ! -G ~\/config\/settings\/NetPositive\/settings ]\nthen\n        echo\n        echo \"You must run NetPositive at least once for this script to work\"\n        echo \"properly.  Please start NetPositive, quit NetPositive, and run\"\n        echo \"this script again.\"\n        echo\n        exit 1\nfi\nRUNNING=`\/bin\/roster | \/bin\/grep application\/x-vnd.Be-NPOS`\nif [ -n \"$RUNNING\" ]\nthen\n        echo\n        echo \"NetPositive must not be running when this script is invoked.\"\n        echo \"Please quit NetPositive and run this script again.\"\n        echo\n        exit 1\nfi\nif [ \"$1\" = \"on\" ]\nthen\n        # Turn on haiku error messages.\n        rmattr HaikuErrorMessages ~\/config\/settings\/NetPositive\/settings\n        addattr -t bool HaikuErrorMessages 1\n ~\/config\/settings\/NetPositive\/settings\n        echo\n        echo \"NetPositive haiku error messages enabled.\"\n        echo\n        exit 0\nelif [ \"$1\" = \"off\" ]\nthen\n        # Turn off haiku error messages.\n        rmattr HaikuErrorMessages ~\/config\/settings\/NetPositive\/settings\n        addattr -t bool HaikuErrorMessages 0\n ~\/config\/settings\/NetPositive\/settings\n        echo\n        echo \"Normal NetPositive error messages enabled.\"\n        echo\n        exit 0\nelse\n        # A correct option was not given.  Print out the help and exit.\n        echo\n        echo \"NPHAIKU - Turns NetPositive haiku (poem) error messages on and\n off.\"\n        echo \"          Error messages are in haiku form by default.\"\n        echo\n        echo \"USAGE:\"\n        echo\n        echo \"nphaiku on          - Turns haiku error messages on.\"\n        echo \"nphaiku off         - Turns haiku error messages off.\"\n        echo\n        exit 1\nfi\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>NetPositive now has many more options and settings than it used to, but believe it or not, there are yet more configurable settings that you can&#8217;t access from its Edit | Preferences menu. But before you bother looking around for a text-based configuration file, don&#8217;t bother &#8212; you won&#8217;t find one, because preferences are now [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[2],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","tag-applications"],"_links":{"self":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/218","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=218"}],"version-history":[{"count":0,"href":"https:\/\/www.betips.net\/index.php?rest_route=\/wp\/v2\/posts\/218\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.betips.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}