<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DYHR.COM &#187; X11</title>
	<atom:link href="http://dyhr.com/tag/x11/feed/" rel="self" type="application/rss+xml" />
	<link>http://dyhr.com</link>
	<description></description>
	<lastBuildDate>Thu, 10 Jun 2010 13:03:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to enable X11 Forwarding with SSH on Mac OS X Leopard</title>
		<link>http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-leopard/</link>
		<comments>http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 02:56:23 +0000</pubDate>
		<dc:creator>thomas</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://dyhr.com/?p=255</guid>
		<description><![CDATA[Apple Remote Desktop (ARD) or VNC is a wonderful invention if you want full control over a remote desktop, but what if you only want to access the user display of one single X11 program on a remote machine? This is possible on Mac OS X with X11 Forwarding. THIS ARTICLE HAS BEEN REWRITTEN (Manual [...]]]></description>
			<content:encoded><![CDATA[<p>Apple Remote Desktop (ARD) or VNC is a wonderful invention if you want full control over a remote desktop, but what if you only want to access the user display of one single X11 program on a remote machine?</p>
<p>This is possible on Mac OS X with X11 Forwarding.</p>
<p>THIS ARTICLE HAS BEEN REWRITTEN (Manual set of the $DISPLAY variable is insecure!)</p>
<p><strong>Prerequisites</strong>:</p>
<p><a title="X11 explained on wikipedia.org" href="http://en.wikipedia.org/wiki/X11" target="_blank">X11</a> environments on both the local and remote machine (see man X). Ensure network access for X11. In Mac OS X  on X11 Quartz check the authorization and client access options under Preferences in the Security pane.</p>
<p>Enable X11 Forwarding with the &#8220;X11Forwarding yes&#8221; option set in &#8220;/private/etc/sshd_config&#8221; for your SSH Daemon own local X11 host in order to recieve X11 client request back from  the remote machine through &#8216;<a title="ssh explained on wikipedia.org" href="http://en.wikipedia.org/wiki/Secure_Shell" target="_blank">ssh</a>&#8216; with the -X option set.</p>
<p>Start or restart the Remote Login (SSH) Service  under System Preference / Sharing pane on Mac OS X. The SSH daemon should run on the remote machine as well!</p>
<p>See &#8220;man ssh&#8221;,  &#8221;man ssh_config&#8221; and &#8220;man sshd_config&#8221; for the complete explanation.</p>
<p><strong>3 Simple Steps to X11 Forward on Mac OS X</strong></p>
<p><strong>1.</strong> <strong>Open  &#8221;Terminal&#8221;</strong> in Mac OS X Leopard.</p>
<p><strong>2.</strong> <strong>ssh -X </strong> X11 Forward to your remote host (See &#8220;man ssh&#8221; for the use of the -X or -Y flag X11 forward):</p>
<pre style="font: normal normal normal 12px/normal Monaco, sans-serif; margin-top: 20px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; background-color: #eeeeff; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; padding: 0.4em; border: 1px solid #dddddd;">ssh -X johndoe@123.456.789</pre>
<p><strong>3.</strong> <strong>Start your remote X11 program</strong> and view the user display on your local machine:</p>
<pre style="font: normal normal normal 12px/normal Monaco, sans-serif; margin-top: 20px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; background-color: #eeeeff; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; padding: 0.4em; border: 1px solid #dddddd;">xeyes &amp;</pre>
<p>Voila it works! The X application will start up your X11 environment. Its quite easy to do X11 forwarding when you first get the hang of it.</p>
<p>Do elegant X11 stuff with ssh -X -f  like:</p>
<pre style="font: normal normal normal 12px/normal Monaco, sans-serif; margin-top: 20px; margin-right: 10px; margin-bottom: 20px; margin-left: 10px; background-color: #eeeeff; overflow-x: auto; white-space: pre-wrap; word-wrap: break-word; padding: 0.4em; border: 1px solid #dddddd;">ssh -X -f user@remotehost xcalc -bg black -fg green</pre>
<p><strong>Caveat Notes</strong>:</p>
<p>Have the latest and updated versions of Mac OS X, Developer and X11.</p>
<p>3 Clues to successful X11 forwarding:</p>
<p>A. When you make changes to /etc/sshd_config remember to restart the Remote Login Service (SSH).</p>
<p>B. Remember to allow incoming access to X11 in the X11 preferences and through your firewall(s) and router!</p>
<p>C. And you have will of curse have to be accurate about your local and remote machine naming convention i.e. John-Does-iMac.local or privat.happycamper.com. Check with &#8220;echo $HOSTNAME&#8221;. On the remote machine you could also do a check with $REMOTEHOST (if set) to check your own machine name on the remote host.</p>
<p>NOT! Sometimes it is necessary to use xhost +remotehost and set the $DISPLAY environment variable manually on Mac OS X (something -X or -Y flag in ssh should normally do for you). Try &#8220;echo $DISPLAY&#8221; on the local machine and remote to get hints of the $DISPLAY status. You can always check your environment with &#8220;env&#8221; and &#8220;$&#8221;. On Mac OS X Leopard you use EXPORT with bash shell to set environment variables as opposed to tcsh that uses setenv. You should only set the $DISPLAY variable manually in a secure environment i.e. local network.</p>
<p><strong>NEW! </strong>Do <em>not</em> set the <code style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 1.1em; padding: 0px; margin: 0px;">DISPLAY</code> variable on the client. You will most likely disable encryption. (X connections forwarded through Secure Shell use a special local display setting.)</p>
<p>If you have further problems try to use -v, -vv or even -vvv verbose flag with ssh to debug.</p>
<p><span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 12px;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;">X11 Forwarding:<br />
<a href="http://www.ssh.com/support/documentation/online/ssh/adminguide/32/X11_Forwarding.html" target="_blank">X11 Forwarding</a> www.ssh.com<br />
<a href="http://developer.apple.com/opensource/tools/runningx11.html" target="_blank">Configurering and running X11 Applications on Mac OS X</a> developer.apple.com<br />
<a href="http://developer.apple.com/mac/library/qa/qa2001/qa1232.html" target="_blank">X11 FAQ  - Technical Q&amp;A QA1232</a> developer.apple.com<br />
<a href="http://developer.apple.com/mac/library/qa/qa2004/qa1383.html" target="_blank">Technical Q&amp;A QA1383 Enabling X11 Forwarding</a> developer.apple.com<br />
<a href="http://oroborosx.sourceforge.net/remotex.html" target="_blank">Forwarding X11 from a Remote Computer to the Mac</a> oroborosx.sourceforge.net<br />
<a href="http://homepage.mac.com/sao1/X11/index.html#eight" target="_blank">ssh X forwarding debugging</a> mac.com<br />
<a href="http://www.xfree86.org/current/X.7.html#sect4" target="_blank">Display Names</a> xfree86.org</span></span></p>
<p>X11:<br />
<a href="http://en.wikipedia.org/wiki/X_Window_System" target="_blank">X Window System</a> wikipedia.org<br />
<a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x11.html" target="_blank">The X Window</a> System freebsd.org (Introduktion from FreeBSD Handbook)<br />
<a href="http://xquartz.macosforge.org/trac/wiki" target="_blank">XQuartz project</a> xquartz.macosforge.org (X11)</p>
<p><a href="http://manuals.info.apple.com/en_US/Command_Line_Admin_v10.5.pdf" target="_blank">Command-Line Administration</a> Version 10.5 Leopard (PDF) manuals.info.apple.com (Connecting to Remote Computers p. 31 &#8211; 37)<br />
<a href="http://manuals.info.apple.com/en_US/IntroCommandLine_v10.6.pdf" target="_blank">Introduction to Command-Line Administration</a> Version 10.6 Snow Leopard (PDF) manuals.info.apple.com (Connecting to Remote Computers p. 27 &#8211; 33)</p>
<p><span style="font-family: Monaco, 'Times New Roman', 'Bitstream Charter', Times, serif; line-height: normal; font-size: 12px;"><span style="font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif; font-size: 13px; line-height: 19px;"> </span></span></p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 512px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Connecting to Remote Computers p. 27 &#8211; 33</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 512px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Introduction to Command-Line Administration Version 10.6 Snow Leopard (PDF) manuals.info.apple.com</div>
<p><a href="http://developer.apple.com/opensource/tools/X11.html" target="_blank">Open Source X11</a> developer.apple.com<br />
<a href="http://www.apple.com/downloads/macosx/unix_open_source/index_sp.html" target="_blank">UNIX &amp; Open Source</a> downloads apple.com</p>
]]></content:encoded>
			<wfw:commentRss>http://dyhr.com/2009/09/05/how-to-enable-x11-forwarding-with-ssh-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
	</channel>
</rss>
