<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: cygwin code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Fri, 29 Aug 2008 03:15:57 GMT</pubDate>
    <description>DZone Snippets: cygwin code</description>
    <item>
      <title>One-click connect from cygwin to full-screen Linux (X stuff required)</title>
      <link>http://snippets.dzone.com/posts/show/1298</link>
      <description>Optional: execute the following once (see http://hacks.oreilly.com/pub/h/66 for &lt;br /&gt;details), to avoid typing in the password.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set LINUX_HOST=mylinuxhost&lt;br /&gt;ssh-keygen -t rsa&lt;br /&gt;ssh %USERNAME%@%LINUX_HOST% "mkdir .ssh; chmod 0700 .ssh"&lt;br /&gt;bash -c 'scp ~/.ssh/id_rsa.pub %LINUX_HOST%:.ssh/authorized_keys2'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, if you save the following as a BATCH file, you can just click it &lt;br /&gt;to connect to fullscreen Linux: &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;set LINUX_HOST=mylinuxhost&lt;br /&gt;start /min xinit &lt;br /&gt;xhost +%LINUX_HOST%&lt;br /&gt;ssh %LINUX_HOST% "declare -x DISPLAY=%COMPUTERNAME%:0; echo $DISPLAY;gnome-session"'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;NOTES: &lt;br /&gt;1. &lt;br /&gt;Sometimes xhost + does not execute in time. O well. Just close&lt;br /&gt;all windows that got opened and try again.&lt;br /&gt;&lt;br /&gt;2.&lt;br /&gt;If you didn't do the step one (ssh keys), you will be prompted &lt;br /&gt;to enter the linux password; this increases the chances of the above&lt;br /&gt;error.&lt;br /&gt;&lt;br /&gt;3.&lt;br /&gt;The single terminal window appearing in the Linux desktop is in fact &lt;br /&gt;a window from your PC. &lt;br /&gt;&lt;br /&gt;</description>
      <pubDate>Wed, 25 Jan 2006 22:13:49 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1298</guid>
      <author>debedb (http://www.hrum.org)</author>
    </item>
  </channel>
</rss>
