Bug 130225

Summary: xterm doesn't operate with Hummingbird Exceed 10.0.0.0
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Peter Gunreben <pgunreben>
Component: X11 ApplicationsAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED WONTFIX QA Contact: Stefan Dirsch <sndirsch>
Severity: Normal    
Priority: P5 - None CC: suse-beta
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: Windows 2000   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: diff to /usr/X11R6/lib/app-defaults/XTerm
output of xlsfonts

Description Peter Gunreben 2005-10-24 08:02:57 UTC
I connect to my SuSE Linux 10.0 box (dual x86_64) via SSH with X-forwarding from
my Windows 2000 PC. The X-Server used is Hummingbird Exceed 10.0.0.0. When
trying to start "xterm" in the SSH-Terminal, the process starts and keeps
running, but no "xterm" window shows up at the X-Server. However, "xlock" works
as excpected. 
While trying to find the root cause of the problem with "strace", I discovered
that "xterm" and the X-Server get stuck in an endless communication loop during
the negotiation of fonts. As a workaround, I've removed the patch for
""programs/xterm/XTerm.ad" in "p_xterm-settings.diff". Without this part of the
patch, the "xterm" starts without problems.
Comment 1 Stefan Dirsch 2005-10-24 09:23:44 UTC
Any chance to figure out which change in XTerm.ad is responsible for this. AFAIK we don't have any Windows + Exceed available for testing here.
Comment 2 Peter Gunreben 2005-10-24 09:44:29 UTC
First of all, I could do the testing here, this would be no problem. I'll try to find more details on how to fix this problem. What I can provide immediately, is some more info on the font negotiation problem. Here is a small snippet of the socket writes from the xterm to the X-Server:

======================8<===================================
write(3, "-\0\20\0\256\1@\0003\0\24\0-Misc-Fixed-bold-R-*-*-13-120-75-75-C-60-ISO10646-1-/5\2\0\256\1@\0", 72) = 72
write(3, "-\0\22\0\257\1@\0;\0\24\0-misc-fixed-medium-r-normal-*-13-120-75-75-c-120-iso10646-1\0/0\2\0\257\1@\0", 80) = 80
write(3, "-\0\20\0\260\1@\0004\0\24\0-Misc-Fixed-bold-R-*-*-13-120-75-75-C-120-ISO10646-1/0\2\0\260\1@\0", 72) = 72
write(3, ".\0\2\0\260\1@\0-\0\24\0\261\1@\0A\0Fi-misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60-iso10646-1\0@\0/-\2\0\261\1@\0", 96) = 96
======================8<===================================

These four write commands occur in an endless loop one after the other. I'll try to figure out more details on this problem
Comment 3 Peter Gunreben 2005-10-24 09:57:45 UTC
Created attachment 55178 [details]
diff to /usr/X11R6/lib/app-defaults/XTerm

When applying this minmal change to /usr/X11R6/lib/app-defaults/XTerm the xterm starts at least also with Hummingbird Exceed.
Comment 4 Peter Gunreben 2005-10-24 09:58:43 UTC
I'm not sure whether this patch solves all the problems with the fonts, but the xterm starts at least using this configuration.
Comment 5 Stefan Dirsch 2005-10-24 10:33:05 UTC
Hmmm ... can you switch to size "Medium" with your patch? Use 
"Ctrl-L + RigthMouse" for this.
Comment 6 Peter Gunreben 2005-10-24 10:53:20 UTC
Yes, I can switch to Medium. However, the size of the font is the same as in the Default setting. I've also tried all the other size options and all I've tried seems to work.
Comment 7 Peter Gunreben 2005-10-24 11:42:11 UTC
I've just noticed that "xterm" issues the following warning on the command line, when opening the "Ctrl-L + RightMouse" menu:

Warning: Missing charsets in String to FontSet conversion
Comment 8 Stefan Dirsch 2005-10-24 12:06:11 UTC
> Yes, I can switch to Medium. However, the size of the font is the same as in
> the Default setting.

... which is intentional. It's strange that switching to this font works, but the initial load of this font does not work.

> I've just noticed that "xterm" issues the following warning on the command
> line, when opening the "Ctrl-L + RightMouse" menu:
>
> Warning: Missing charsets in String to FontSet conversion

Maybe we see a fallback to another font here ...
Comment 9 Peter Gunreben 2005-10-24 12:11:36 UTC
Is there anything I can test or do? Any advices?
Comment 10 Stefan Dirsch 2005-10-24 12:14:43 UTC
Yes, the output of "xlsfonts" won't hurt (attachment!).
Comment 11 Peter Gunreben 2005-10-24 12:19:23 UTC
Created attachment 55193 [details]
output of xlsfonts
Comment 12 Mike Fabian 2005-10-24 12:30:30 UTC
The *only* unicode font in your "xlsfonts" output is:

-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1

Probably it would work if you would install the missing unicode fonts.

Comment 13 Peter Gunreben 2005-10-24 12:42:49 UTC
I know, that there is a chance to fix this problem by installing more fonts in the X-Server. However, we have very many Windows users at our site, who access the SuSE boxes using Hummingbird Exceed. An installation of additional fonts at the X-Server side would require a software configuration change for every Windows user, which is just impractical. (The Windows software configuration is done by the CIO department, whilst the Linux configuration for our computers is done by myself)
Comment 14 Stefan Dirsch 2005-10-24 12:50:12 UTC
We'll try to reproduce. Stay tuned.
Comment 15 Michael Gross 2005-10-24 13:36:15 UTC
I took the liberty to assign this to Stefan ;)
Comment 16 Peter Gunreben 2005-10-25 09:16:27 UTC
Just a small comment: I'm almost sure that Hummingbird is interested in interoperability with SuSE Linux, so I assume that you would get at least a free copy of Hummingbird Exceed for testing purposes if you'd ask for. May be they'd also provide support for interoperability tests.
Comment 17 Stefan Dirsch 2005-10-25 16:35:32 UTC
When reducing our fonts to the one you have available I'm getting fatal problems.

X Error of failed request:  BadName (named color or font does not exist)
  Major opcode of failed request:  45 (X_OpenFont)
  Serial number of failed request:  15
  Current serial number in output stream:  16

I simply don't know what to do here. We're using this xterm configuration since some years now and you're the first one to complain. Do we need to make
our font configuration much worse just to make you happy?
Comment 18 Peter Gunreben 2005-10-26 03:35:38 UTC
When we started to use Linux as an alternative OS, a colleague had installed RedHat Linux. We never had problems with fonts with RedHat and Exceed. Then I decided to switch to SuSE and we got severe fonts problems with gvim and xterm. The gvim in the SuSE configuration showed up with strange large fonts and the Xperf went so slow that one could almost watch the appearance of every text line in gvim. In short, the gvim was just unusable in this configuration. Also xterm showed up with ugly fonts, but this time the font was very small and many characters showed up as empty boxes.

To summarize up to this point: We had no problems with RedHat, but gvim and xterm were just unusable with SuSE in our setup!!!

To solve these problems, I was always building my own "gvim-special" (using athena gui) and always patched "/usr/X11R6/lib/app-defaults/XTerm" to get them usable, which is somewhat anoying. Starting with SuSE 10.0, the problems went even worse as "xterm" didn't start at all anymore. So I digged into this problem again and discovered that a SuSE-patch is causing all that trouble (at least in the case of xterm). The vanilla xterm is working without problems.

As I'm sure that I'm not the only user in the world, who is accessing Linux via Exceed, I thought you might be interested in solving these problems. 

What about the small patch I had provided?
Comment 19 Stefan Dirsch 2005-10-26 04:37:08 UTC
Sure, when you don't care about UTF-8 support (or i18n in general) the vanilla xterm configuration works great.

About your patch. Removing the font setttings for the default font is not an option for us. You know what is exactly happening in xterm when you do such things?
Comment 20 Peter Gunreben 2005-10-26 07:02:41 UTC
To be honest, I'm not really sure what happens when you remove the default font setting. I guess that a default font is used in this case.

I understand that i18n is very important. Isn't there any other chance to reach interoperability with Exceed? 

BTW: I had reported the font problem with GVIM on 9 March 2004: [20040305990000136]
Comment 21 Stefan Dirsch 2005-10-26 10:36:44 UTC
When no default font for single-width characters is defined xterm uses "fixed" as fallback (Latin1 font), which is not an option for us. For whatever reasons
(still needs to be investigated) xterm seems to use the right double-width font, although it's not defined at all.

Does xterm start for you when you only omit the entry for VT100*wideFont and leave the entry for VT100*font active?
Comment 22 Peter Gunreben 2005-10-26 14:19:23 UTC
Yes, the xterm starts when I omit the VT100*wideFont entry - at least with Hummingbird Exceed 10.0.0.0. 
Comment 23 Stefan Dirsch 2005-10-26 14:25:02 UTC
Ok. Thanks.
Comment 24 Peter Bartok 2005-12-14 20:26:49 UTC
This problem is not just confined to Hummingbird Exceed 10.0. Same problem exists with Exceed 8.0. I just switched from FC2 to Suse 10 and ran into the same problem, xterm not coming up at all.
Comment 25 Stefan Dirsch 2006-09-01 05:46:34 UTC
I really don't know how to fix this for your requirements without breaking our default configuration. :-(

I suggest therefore to uninstall the xterm package and compile/install the
upstream xterm version. Of course you can use our openSUSE buildservice to create/provide alternative xterm packages for SUSE 10.0.

--> http://build.opensuse.org/

==> WONTFIX (I'm really sorry)
Comment 26 Mike Fabian 2006-09-01 10:35:09 UTC
On the current development version of openSUSE (Factory), xterm starts
for me with the SUSE default setup even if only the fonts
"-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1" and
"cursor" are available:

mfabian@magellan:~$ xlsfonts 
-misc-fixed-medium-r-semicondensed--0-0-75-75-c-0-iso8859-1
-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-1
cursor
fixed
mfabian@magellan:~$ locale
LANG=ja_JP.UTF-8
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=
mfabian@magellan:~$ xterm 
Warning: Cannot convert string "nil2" to type FontStruct
xterm:  unable to open font "-misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60-iso10646-1", trying "fixed"....
mfabian@magellan:~$ 
Comment 27 Mike Fabian 2006-09-01 10:37:40 UTC
You see the warning message that xterm uses the "fixed" font as a fallback.
Of course xterm cannot display fancy languages like Japanese then, but
it basically works (characters in Latin1 like äöüÄÜÖß work as well).
Comment 28 Mike Fabian 2006-09-01 10:42:34 UTC
Works in Latin1 locales as well:

mfabian@magellan:~$ LANG=en_US locale charmap
ISO-8859-1
mfabian@magellan:~$ LANG=en_US xterm
Warning: Cannot convert string "nil2" to type FontStruct
xterm:  unable to open font "-misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60-iso10646-1", trying "fixed"....
mfabian@magellan:~$ 
Comment 29 Stefan Dirsch 2006-09-01 13:50:57 UTC
I can't reproduce this problem any longer. Even not with xterm of SUSE 10.0.
I used the same font selection as Mike.

# LC_ALL=de_DE@euro LANG=de_DE@euro xterm
Warning: Cannot convert string "nil2" to type FontStruct
Warning: Unable to load any usable ISO8859 font
Warning: Unable to load any usable ISO8859 font
xterm:  unable to open font "-misc-fixed-medium-r-semicondensed-*-13-120-75-75-c-60-iso10646-1", trying "fixed"....

[ xterm is running ]

This issue seems to be Exceed driven ...
Comment 30 Mike Fabian 2006-09-01 14:23:12 UTC
I think as a workaround you could always use "xterm -fn fixed".

Or even use client side fonts via Xft like:

    xterm -fa courier -fs 12

(courier is a scalable font, i.e. this will usually show an xterm with
anti-aliasing) or

    xterm -fa "Misc Fixed" -fs <some size>

if you prefer bitmap fonts.

When using client side fonts via Xft you are completely independent from
the fonts offered by your Hummingbird Exceed X-server.