{"id":951,"date":"2014-02-22T17:16:00","date_gmt":"2014-02-22T17:16:00","guid":{"rendered":"https:\/\/trouble.org\/?p=951"},"modified":"2014-07-07T19:08:37","modified_gmt":"2014-07-07T19:08:37","slug":"if-youre-feeling-digitally-suicidal","status":"publish","type":"post","link":"https:\/\/trouble.org\/?p=951","title":{"rendered":"if you&#8217;re feeling (digitally) suicidal&#8230;."},"content":{"rendered":"<p>&#8230; here&#8217;s how to decrease the security of your mac&#8230;.<\/p>\n<p>It was one of those situations that are hard to explain, but I wanted to execute an X program on a remote system and have it show up on my Mac&#8217;s screen WITHOUT using ssh. This was on Snow Leopard with the XQuartz X server, but probably similar in most macs.<\/p>\n<p>Back in the age of dinosaurs you could just do &#8220;xhost +&#8221; (for complete suicide) or &#8220;xhost +ip-addr-or-hostname&#8221; to allow specific hosts to connect to your system (when XQuartz is installed xhost and its friends are located in \/opt\/X11\/bin\/ by default.) Even if you do this, however, OS X by default doesn&#8217;t listen to the network; to really kill your security you have to modify \/opt\/X11\/bin\/startx &#8211; on mine it&#8217;s line 111 or so, you&#8217;ll see 3 lines:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\"><span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> x<span class=\"sy0\">`<\/span>defaults <span class=\"kw2\">read<\/span> <span class=\"re1\">$X11_PREFS_DOMAIN<\/span> nolisten_tcp<span class=\"sy0\">`<\/span> = x1 <span class=\"br0\">&#93;<\/span> ; <span class=\"kw1\">then<\/span><br \/>\n<span class=\"re2\">defaultserverargs<\/span>=<span class=\"st0\">&quot;<span class=\"es2\">$defaultserverargs<\/span> -nolisten tcp&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>Kill the &#8220;-nolisten tcp&#8221; bit, so it looks like:<\/p>\n<div class=\"codecolorer-container bash blackboard\" style=\"overflow:auto;white-space:nowrap;\"><div class=\"bash codecolorer\"><span class=\"kw1\">if<\/span> <span class=\"br0\">&#91;<\/span> x<span class=\"sy0\">`<\/span>defaults <span class=\"kw2\">read<\/span> <span class=\"re1\">$X11_PREFS_DOMAIN<\/span> nolisten_tcp<span class=\"sy0\">`<\/span> = x1 <span class=\"br0\">&#93;<\/span> ; <span class=\"kw1\">then<\/span><br \/>\n<span class=\"re2\">defaultserverargs<\/span>=<span class=\"st0\">&quot;<span class=\"es2\">$defaultserverargs<\/span>&quot;<\/span><br \/>\n<span class=\"kw1\">fi<\/span><\/div><\/div>\n<p>(Alternately set the environ variable.)<\/p>\n<p>Change the file, restart the X server, and you&#8217;re good to go. Just turn this off when you&#8217;re done :)<\/p>\n<p>Just in case anyone else is feeling their security is too good, or need a hack like I did.<\/p>\n<p>(Using xhost is generally a bad idea, security-wise, but sometimes you just have to do what&#8217;s necessary to do the job.)<\/p>\n<p>It really is amazing how long X11 has been around &#8211; almost 30 years (thanks for the correction, I had 20 earlier!), as of this writing, with no end in sight.<\/p>\n<figure id=\"attachment_952\" aria-describedby=\"caption-attachment-952\" style=\"width: 540px\" class=\"wp-caption alignleft\"><a href=\"https:\/\/trouble.org\/uploads\/2014\/02\/X-Window-System.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-952 \" src=\"https:\/\/trouble.org\/uploads\/2014\/02\/X-Window-System.png\" alt=\"X windows from wiki\" width=\"540\" height=\"450\" srcset=\"https:\/\/trouble.org\/wp-content\/uploads\/2014\/02\/X-Window-System.png 900w, https:\/\/trouble.org\/wp-content\/uploads\/2014\/02\/X-Window-System-300x250.png 300w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/a><figcaption id=\"caption-attachment-952\" class=\"wp-caption-text\">http:\/\/en.wikipedia.org\/wiki\/X_Window_System<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>&#8230; here&#8217;s how to decrease the security of your mac&#8230;. It was one of those situations that are hard to explain, but I wanted to execute an X program on a remote system and have it show up on my Mac&#8217;s screen WITHOUT using ssh. This was on Snow Leopard with the XQuartz X server, [&hellip;]<\/p>\n","protected":false},"author":44,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88,32,4,6],"tags":[254,252,253,324,256,255],"class_list":["post-951","post","type-post","status-publish","format-standard","hentry","category-dinosaurs","category-mac","category-security","category-tech","tag-anti-secuity","tag-bad-bad-bad","tag-bad-dan","tag-mac","tag-x11","tag-xwindows"],"_links":{"self":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/951","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/users\/44"}],"replies":[{"embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=951"}],"version-history":[{"count":5,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions"}],"predecessor-version":[{"id":1025,"href":"https:\/\/trouble.org\/index.php?rest_route=\/wp\/v2\/posts\/951\/revisions\/1025"}],"wp:attachment":[{"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=951"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=951"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/trouble.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=951"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}