<?xml version="1.0" encoding="utf-8" ?>
<rss version="2.0" 
   xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" 
   xmlns:html="http://www.w3.org/1999/html" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" 
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/">
<channel>
   <title>Mast Kalandar</title>
   <link>http://www.imsc.res.in/~kapil/blog</link>
   <description>bandar's colander of random jamun aur aam</description>
   <language>en</language>
   <copyright>Copyright 2008 Kapil Hari Paranjape</copyright>
   <ttl>60</ttl>
   <pubDate>Sun, 30 Apr 2006 03:58 GMT</pubDate>
   <managingEditor>kapil@imsc.res.in</managingEditor>
   <generator>PyBlosxom http://pyblosxom.sourceforge.net/ 1.3.2 2/13/2006</generator>
<item>
   <title>Two computers turned into one one interface</title>
   <guid isPermaLink="false">lg/two-computers-one-interface-2006-04-30-09-28</guid>
   <link>http://www.imsc.res.in/~kapil/blog/lg/two-computers-one-interface-2006-04-30-09-28.html</link>
   <description><![CDATA[

  <p>If some of you are unlucky :-) enough to get confused because
  you have two computers on your desktop and you forget which
  keyboard/mouse is connected with which computer then this tip may
  help.</p>

  <p>You need to choose "master" which is the computer connected to
  the keyboard/mouse you will actually use. You can later put away
  the mouse and keyboard of the other computer in order to avoid
  getting confused. The "master" must be an X-window machine but
  the "slave" can be anything.</p>

  <p>After you execute these steps and "go west" off the screen on
  the master your keyboard and mouse events will be directed at the
  slave.<a href="#fn1" class="footnoteRef" id="fnref1" name=
  "fnref1"><sup>1</sup></a></p>

  <p>You need to install "x2x" and "x2vnc" on the master.</p>

  <h4 id="slave-is-also-x-window">"slave" is also X-window.</h4>

  <p>From the slave log in to the master using ssh X forwarding</p>
  <pre>
<code>    slave:$ ssh -X luser@master
</code>
</pre>

  <p>Then run "x2x" on the master via this ssh session as
  follows</p>
  <pre>
<code>    master:$ x2x -from :0 -to $DISPLAY -west &amp;
</code>
</pre>

  <p>Here you replace west with the appropriate direction (west
  equals left and north equals up) in which the monitor of the
  "slave" is.</p>

  <h4 id="slave-is-linux-in-console-mode">"slave" is Linux in
  "console" mode.</h4>

  <p>On the slave you run "linuxvnc"</p>
  <pre>
<code>    slave:$ linuxvnc &amp;
</code>
</pre>

  <p>This will give you a port number (usually 5900) which you must
  use below. I'll use 5900 as the port since that is standard. Next
  start an ssh tunnel to the master.</p>
  <pre>
<code>    slave:$ ssh -f -N -R 5900:localhost:5900 master 
</code>
</pre>

  <p>Finally on the master you run</p>
  <pre>
<code>    master:$ x2vnc -west localhost:0 &amp;
</code>
</pre>

  <h4 id="slave-is-otheros">"slave" is "OtherOS".</h4>

  <p>On the slave you need a VNC server like "WinVNC" for Windows
  and "OSXVnc" for Mac OS X. You also need "ssh" unless you allow
  the VNC server to accept connections over the net (bad security).
  You then follow the same sequence:</p>

  <ol class="lower-alpha">
    <li>start the VNC server on slave</li>

    <li>start the ssh tunnel on slave</li>

    <li>start x2vnc on master.</li>
  </ol>

  <p>Hope this magic helps someone.</p>

  <div class="footnotes">
    <hr>

    <ol>
      <li id="fn1">
        <p>There are other options like clicking in a window to
        switch the focus but this "trick" of going west seemed the
        neatest. <a href="#fnref1" class="footnoteBackLink" title=
        "Jump back to footnote 1">↩</a></p>
      </li>
    </ol>
  </div>

]]></description>
   <category domain="http://www.imsc.res.in/~kapil/blog">/lg</category>
   <pubDate>Sun, 30 Apr 2006 03:58 GMT</pubDate>
</item>
</channel>
</rss>
