Posts Tagged ‘X11’

luit -encoding gbk Segmentation Fault

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 details, refer to li2z’s post.
(I believe anybody interested in this problem should be able to read Chinese:) )

Tags: , , ,

MATLAB xcb error

XCB breaks MATLAB (probably also other Java applications):

MATLAB: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock’ 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=”-DNDEBUG”. This macro disables assertions.

Workaround 2 uses some kind of brutal force, and in most cases Workaround 1 should be preferred.

[ Another workaround is found here. I think it works though I didn’t try it. However this uses even more brutal force. ]

Reference:
[1] Gentoo Forum thread: xorg-server-1.3.0 + xcb breaks java ?
[2] LFS documentation on libxcb

Tags: ,

tcpdump

I wanted to find out if remote X creates a lot of network flows, so I logged into a remote computer with “ssh -Y“, started xclock, and then typed tcpdump. Then screen began scrolling up crazily like this:

13:21:00.694367 IP xxx.xxx.xx.xx.45762 > 192.168.1.3.ssh: . ack 60640 win 2003 <nop,nop,timestamp 191668683 75287130>
13:21:00.694430 IP 192.168.1.3.ssh > xxx.xxx.xx.xx.45762: P 70416:70464(48) ack 113 win 501 <nop,nop,timestamp 191668683 75287200>

Was X sending/receiving lots of data even if it seems to be idling? It shouldn’t be so silly.. And… Finally I realized what a big mistake I had made… It was like putting a microphone against a loudspeaker…

Tags: , ,

SSH with X

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 “X11Forwarding yes” in /etc/ssh/sshd_config, restart SSH daemon and it should be able to forward X11 requests.

At the client end, connect with “ssh -X ” or “ssh -Y ” (if ssh -X fails..). Alternatively, SSH client can be configured to turn on X11 forwarding automatically. Put in /etc/ssh/ssh_config the following lines:

Host *
  ForwardX11 yes
  ForwardX11Trusted yes

The last line is not needed if “ssh -X” works. In some circumstances only “ssh -Y” does, then ForwardX11Trusted is necessary.

ps1. If network is slow, “-C” (compress) may help.
ps2. X must be running with “-nolisten” argument, which (I guess) is the default in most distributions.

Tags: , ,