Tips on X11

Copyright (C) 1998-2000,2012 Taiji Yamada <taiji@aihara.co.jp>
[Back] [Japanese Page]


Internationalized xclip version 1.0 with viewer

xsel by the Conrad Parker and xclip by the Kim Saunders treat the input and output of the selection which is a X11 clipboard in a command-line. However, they are not able to treat a multi-byte text neither because internationalization of them is insufficient. Therefore I started to rewrite this xclip version 1.0 in C++ to replace them.

I illustrate simple how to use.

At first we select a region in Emacs.
xclip-i-emacs
Next we execute "xclip -o" in terminal which has locale LC_ALL=ja_JP.UTF-8 (e.g., xterm, mlterm) or locale LC_ALL=ja_JP.eucJP (e.g., kterm), then former selection of Emacs is displayed in the terminal.
xclip-o-mltermxclip-o-kterm
On the other hand, in terminal which has locale LC_ALL=ja_JP.eucJP (e.g., kterm), we execute as follows:

$ iconv -f UTF-8 -t EUC-JP README.ja.txt | xclip

xclip owns the selection of the standard-input contents. By the way, since the combination of locale of xclip and character code of the standard input is important in this case, so we may also execute as follows:

$ LANG=ja_JP.UTF-8 xclip < README.ja.txt

And we may paste the former selection of xclip in Emacs by middle button.
xclip-o-emacs
If you do not go well, please modify locale of xclip or convert character code of input/output because the character encoding automatically conversion depend on the locale. In addition, xclip has the following functions.

In addition xclipview which is PRIMARY, SECONDARY and CLIPBOARD selection also CUT_BUFFER 0-7 viewer is supplemented.

The following contents are written more than ten years ago, and it is not possible for enough answers even if I receive an inquiry because I have not used some of them at this time. Sorry for it.


PNG file format patch for xv-3.10a patched by Japanese extension 5.3.3

PNG(Portable Network Graphics) format patch for xv-3.10a (xv-3.10a-png-1.2d.tar.gz) does not suit for xv-3.10a patched by Japanese Extension (xv310a-jp-extension-rev5.3.3.tar.gz). I created a patch for PNG format (xv-3.10a-jp-extension-5.3.3-png-1.2d.patch.gz) based on xv-3.10a-png-1.2d.tar.gz for xv-3.10a patched by Japanese Extension. Please compile it with libraries of jpegsrc.v6b.tar.gz and tiff-v3.4beta037.tar.gz.
[2000/10/13] This patch was modified in order to make Makefile with already-installed libjpeg, libtiff and libpng.

PNG file format patch for xv-3.10a patched by Japanese extension 5.1.13

PNG(Portable Network Graphics) format patch for xv-3.10a (xv-3.10a-png-1.2d.tar.gz) does not suit for xv-3.10a patched by Japanese Extension (xv310a-jp-extension-rev5.1.13.tar.gz). I created a patch for PNG format (xv-3.10a-jp-extension-5.1.13-png-1.2d.patch.gz) based on xv-3.10a-png-1.2d.tar.gz for xv-3.10a patched by Japanese Extension. Please compile it with libraries of jpegsrc.v6b.tar.gz and tiff-v3.4beta037.tar.gz.
[2000/10/13] This patch was modified in order to make Makefile with already-installed libjpeg, libtiff and libpng.

mgdiff internationalization patch

You can use mgdiff under your locale by mgdiff-i18n.patch.gz. For example, this screen shot shows a mgdiff under Japanese locale environment.

xclock and xarclock

xclock, internationalization and strftime extension patch

You can use xclock under your locale by xclock-taiji-i18n.patch.gz. For example, Japanese date printing style in xclock is as follows:

-fn option means fontList. You can also designate printing style of digital xclock by -format option with strftime(3C) format as follows:

[1999/1/29] xclock-taiji-i18n.patch.gz has bugs on malloc without free, so please use xclock-format-i18n.patch.gz. Thanks Y. Furukawa at Keio university for bug reports and a new patch.

xarclock internationalization and strftime extension patch

You can use xarclock under your locale by xarclock-taiji-i18n.patch.gz, in addition to above mentioned strftime extension, and -kanji option is available for following analog clock style:

[1999/1/28] xarclock-taiji-i18n.patch.gz has bugs on malloc without free, so please use xarclock-format-i18n.patch.gz.


xon

xon for DHCP client

Using UNIX on PC note book, you often use DHCP connection, it is convenient to connect to several sites. But if you want to execute an X client on another machine, xon does not work as it is, and it is troublesome to check up the IP address. Now, I modified xon to investigate IP address of DHCP client which is X server side and start up X client (xon, xon-1.8-for_dhcp.tar.gz). The xon for DHCP only checks up IP address with ifconfig and use it in place of hostname of X server. Incidentally, this xon is based on v.1.8 in X11R6.

xon for SSH

Xon assumes /usr/bin/remsh, /usr/bin/rcmd and rsh as a remote shell. I added /usr/local/bin/ssh to these remote shells and modified to take precedence over the others if it exists.

Using this xon, all X packets over SSH are very slowly. So I modified this xon to use rsh between the same domain and use ssh otherwise.


Does X IP Messenger send a message to not your target but another one?

xipmsg, an X client for the IP Messenger protocol, often sends a message to a different person with your target. This is a bug of xipmsg-8087. In the followwing site, the patch for this problem is published.
http://www.aihara.co.jp/~junt/tools/
You can apply both this patch and the patch intoroduced in the following section.

X IP Messenger quick hack

IP Messenger is very useful in such environment as UNIX, Windows, Mac, Java and these mixed environments. In the case of using xipmsg of an X client on UNIX, I would often like to know not only the name of NetBIOS but also the hostname of TCP/IP of Windows clients using IP Messenger. Now I added to xipmsg-8087.tar.gz an option to print IP address and hostname (xipmsg-8087-amateras.patch.gz) in the main window. This function works with ``-add_info'' option or X resource property ``*addinfo: True''.

xpbiff-1.27, pixmaps color and coordinate patch

Using xpbiff-1.27, it often fails to get color entry in 256 pseudo colors display and it uses default bitmap as a right hand of following figures.
(I'd like to use this pixmap, but...) (It can't read the pixmap!)

I also want to use it like a left hand of following figures, but it always draws a pixmap at left and top position like a right hand of the figures.
(I'd like to keep it the center, but...) (It's not cool!)

Now, I made a patch (xpbiff-1.27-youbin+taiji.patch.gz) for following stuff.

  1. If it will fail to get color entry, it use possible colors with closeness attribute of Xpm library.
  2. It draws pixmap at center position with '-center' option or resource value of '*center: True'.
This patch is available under the patch of http://jaguar.kuee.kyoto-u.ac.jp/~tanaka/software/software.html#xpbiff with xpbiff-1.27 youbin protocol extension.

xfm-1.3.2, pixmaps color patch

xfm-1.3.2 often fails to get color entry of pixmaps under 256 pseudo colors display and uses default bitmaps. So, I made a patch (xfm-1.3.2-color.patch.gz) to use possible colors with closeness attributes of Xpm library. We can use many colorful pixmaps in patched xfm like following screen shot.

xcalendar, holiday file extension

We can define holidays in /usr/X11R6/lib/X11/xcalendar/xcalendar.hol, but I want to divide legal holidays and the others such as personal holidays into another holiday file and classify these holidays by using another color. Now, I made a patchthat we can use yet another holiday file /usr/X11R6/lib/X11/xcalendar/xcalendar.hol2 and it displays these holidays with another color as following screen shot:

This patch needs the I18N patch for xcalendar-4.0 with X11R6.


Questions or comments regarding this service? taiji@aihara.co.jp.

Copyright (C) 1998-2000 Taiji Yamada, All rights reserved.