<?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>chys&#039;s random notes &#187; X11</title>
	<atom:link href="http://en.chys.info/tag/x11/feed/" rel="self" type="application/rss+xml" />
	<link>http://en.chys.info</link>
	<description>Study more problems; Talk less of isms.</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:56:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>luit -encoding gbk Segmentation Fault</title>
		<link>http://en.chys.info/2009/04/luit-encoding-gbk-segmentation-fault/</link>
		<comments>http://en.chys.info/2009/04/luit-encoding-gbk-segmentation-fault/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 05:04:01 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CJK]]></category>
		<category><![CDATA[luit]]></category>
		<category><![CDATA[segfault]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://en.chys.info/?p=483</guid>
		<description><![CDATA[Chinese users have been encountering segmentation faults when they use luit with GBK in for a long time. (It worked perfectly in the good old days.) This is caused by a bug in X. A simple workaround is as follows: Open file /usr/share/fonts/encodings/encodings.dir and exchange the following two lines: gbk-0 large/gbk-0.enc gbk-0 large/gbk-0.enc.gz For more [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2008/10/yuking-resumes-fcitx-development/' rel='bookmark' title='Yuking resumes FCITX development'>Yuking resumes FCITX development</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Chinese users have been encountering segmentation faults when they use <code>luit</code> with GBK in for a long time. (It worked perfectly in the good old days.) This is caused by a bug in X.</p>
<p>A simple workaround is as follows:</p>
<p>Open file <code>/usr/share/fonts/encodings/encodings.dir</code> and exchange the following two lines:</p>
<blockquote><p><code>gbk-0 large/gbk-0.enc</code><br />
<code>gbk-0 large/gbk-0.enc.gz</code></p></blockquote>
<p>For more details, refer to <a href="http://li2z.cn/2008/10/15/luit_ok/trackback/">li2z&#8217;s post</a>.<br />
(I believe anybody interested in this problem should be able to read Chinese:) )</p>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2008/10/yuking-resumes-fcitx-development/' rel='bookmark' title='Yuking resumes FCITX development'>Yuking resumes FCITX development</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2009/04/luit-encoding-gbk-segmentation-fault/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MATLAB xcb error</title>
		<link>http://en.chys.info/2008/11/matlab-xcb-error/</link>
		<comments>http://en.chys.info/2008/11/matlab-xcb-error/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 05:06:00 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MATLAB]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://blog.chys.info/2008/11/matlab-xcb-error/</guid>
		<description><![CDATA[XCB breaks MATLAB (probably also other Java applications): MATLAB: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c-&#62;xlib.lock&#8217; failed. Either of the two workarounds works for me: (1) If the libxcb version is ≥1.1, export LIBXCB_ALLOW_SLOPPY_LOCK=1 before running the broken application. (2) Recompile libxcb with CFLAGS=&#8221;-DNDEBUG&#8221;. This macro disables assertions. Workaround 2 uses some kind of brutal force, and in [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2008/12/matlab-matrices-are-in-column-major-storage/' rel='bookmark' title='MATLAB matrices are in column-major storage'>MATLAB matrices are in column-major storage</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://xcb.freedesktop.org/">XCB</a> breaks <a href="http://www.mathworks.com/products/matlab/">MATLAB</a> (probably also other Java applications):</p>
<blockquote style="font-family: &quot;Courier New&quot;,Courier,monospace;"><p>MATLAB: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c-&gt;xlib.lock&#8217; failed.</p></blockquote>
<p>Either of the two workarounds works for me:<br />
(1) If the <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">libxcb</span> version is ≥1.1, export <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">LIBXCB_ALLOW_SLOPPY_LOCK=1</span> before running the broken application.<br />
(2) Recompile <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">libxcb</span> with <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">CFLAGS=&#8221;-DNDEBUG&#8221;</span>. This macro disables <a href="http://www.acm.uiuc.edu/webmonkeys/book/c_guide/2.1.html">assertions</a>.</p>
<p>Workaround 2 uses some kind of brutal force, and in most cases Workaround 1 should be preferred.</p>
<p>[ Another workaround is found <a href="http://www.freizeitmoscher.de/?p=14">here</a>. I think it works though I didn’t try it. However this uses even more brutal force. ]</p>
<p>Reference:<br />
[1] <a href="http://forums.gentoo.org/viewtopic-t-554740-highlight-xlib.html">Gentoo Forum thread: xorg-server-1.3.0 + xcb breaks java ?</a><br />
[2] <a href="http://www.linuxfromscratch.org/blfs/view/svn/x/libxcb.html">LFS documentation on libxcb</a>
<div class="blogger-post-footer">
<hr />
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.</div>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2008/12/matlab-matrices-are-in-column-major-storage/' rel='bookmark' title='MATLAB matrices are in column-major storage'>MATLAB matrices are in column-major storage</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2008/11/matlab-xcb-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tcpdump</title>
		<link>http://en.chys.info/2008/10/tcpdump/</link>
		<comments>http://en.chys.info/2008/10/tcpdump/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 04:21:00 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://blog.chys.info/2008/10/tcpdump/</guid>
		<description><![CDATA[I wanted to find out if remote X creates a lot of network flows, so I logged into a remote computer with &#8220;ssh -Y&#8220;, started xclock, and then typed tcpdump. Then screen began scrolling up crazily like this: 13:21:00.694367 IP xxx.xxx.xx.xx.45762 &#62; 192.168.1.3.ssh: . ack 60640 win 2003 &#60;nop,nop,timestamp 191668683 75287130&#62; 13:21:00.694430 IP 192.168.1.3.ssh &#62; [...]<hr/>
No related posts.]]></description>
			<content:encoded><![CDATA[<p>I wanted to find out if remote X creates a lot of network flows, so I logged into a remote computer with &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -Y</span>&#8220;, started <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">xclock</span>, and then typed <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">tcpdump</span>. Then screen began scrolling up crazily like this:</p>
<blockquote style="font-family: &quot;Courier New&quot;,Courier,monospace;"><p>13:21:00.694367 IP xxx.xxx.xx.xx.45762 &gt; 192.168.1.3.ssh: . ack 60640 win 2003 &lt;nop,nop,timestamp 191668683 75287130&gt;<br />
13:21:00.694430 IP 192.168.1.3.ssh &gt; xxx.xxx.xx.xx.45762: P 70416:70464(48) ack 113 win 501 &lt;nop,nop,timestamp 191668683 75287200&gt;</p></blockquote>
<p>Was X sending/receiving lots of data even if it seems to be idling? It shouldn&#8217;t be so silly.. And&#8230; Finally I realized what a big mistake I had made&#8230; It was like putting a microphone against a loudspeaker&#8230;
<div class="blogger-post-footer">
<hr />
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.</div>
<hr/><p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2008/10/tcpdump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH with X</title>
		<link>http://en.chys.info/2008/10/ssh-with-x/</link>
		<comments>http://en.chys.info/2008/10/ssh-with-x/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 02:12:00 +0000</pubDate>
		<dc:creator>chys</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[X11]]></category>

		<guid isPermaLink="false">http://blog.chys.info/2008/10/ssh-with-x/</guid>
		<description><![CDATA[Just successfully started FCITX and typed Chinese in OpenOffice remotely.. X11 forwarding should be first enabled both at the server and client ends. At the server end, put &#8220;X11Forwarding yes&#8221; in /etc/ssh/sshd_config, restart SSH daemon and it should be able to forward X11 requests. At the client end, connect with &#8220;ssh -X &#8221; or &#8220;ssh [...]<hr/>
Related posts:<ol>
<li><a href='http://en.chys.info/2008/11/ssh-without-password/' rel='bookmark' title='SSH without password'>SSH without password</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Just successfully started FCITX and typed Chinese in OpenOffice remotely..</p>
<p>X11 forwarding should be first enabled both at the server and client ends. </p>
<p>At the server end, put &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">X11Forwarding yes</span>&#8221; in <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/etc/ssh/sshd_config</span>, restart SSH daemon and it should be able to forward X11 requests.</p>
<p>At the client end, connect with &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -X <host></host></span>&#8221; or &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -Y <host></host></span>&#8221; (if <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -X</span> fails..). Alternatively, SSH client can be configured to turn on X11 forwarding automatically. Put in <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">/etc/ssh/ssh_config</span> the following lines:</p>
<blockquote style="font-family: &quot;Courier New&quot;,Courier,monospace;"><p>Host *<br />
&nbsp; ForwardX11 yes<br />
&nbsp; ForwardX11Trusted yes</p></blockquote>
<p>The last line is not needed if &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -X</span>&#8221; works. In some circumstances only &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ssh -Y</span>&#8221; does, then <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">ForwardX11Trusted</span> is necessary.</p>
<p>ps1. If network is slow, &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">-C</span>&#8221; (compress) may help.<br />
ps2. <span style="font-family: &quot;Courier New&quot;,Courier,monospace;">X</span> must be running with &#8220;<span style="font-family: &quot;Courier New&quot;,Courier,monospace;">-nolisten</span>&#8221; argument, which (I guess) is the default in most distributions.
<div class="blogger-post-footer">
<hr />
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/3.0/">Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License</a>.</div>
<hr/><p>Related posts:<ol>
<li><a href='http://en.chys.info/2008/11/ssh-without-password/' rel='bookmark' title='SSH without password'>SSH without password</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://en.chys.info/2008/10/ssh-with-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

