On Wed, 01 Nov 2006 at 19:51:20 -0500, Thomas Dickey wrote: > You could add a printf to get the number of screens in the display, > e.g., I did this (enabling trace), but a printf would also work: > > Trace("FIXME %d\n", dpy->default_screen); > Trace("FIXME %d\n", dpy->nscreens); > if (XParseColor(screen->display, cmap, spec, &def)
Well, dpy is no defined in function AllocateAnsiColor(...), I used: printf("Before XParseColor\n def_screen = %d\n nscreens = %d\n", DefaultScreen(screen->display), ScreenCount(screen->display)); But I did not any programming in plain X and am not sure if this is what you wanted to see. > For the normal single-screen, that's default_screen=0, nscreens=1. My code gives (gdb) run Starting program: /home/slimak/kodowanie/got/debian/xterm-210/xterm (start mc here) XXX Before XParseColor def_screen = 0 nscreens = 1 (those three lines repeated few times) both on single and multihead configurations. Xterm allocates few colours in first run and then freezes in poll(). On subsequent run it allocates more colours and freezes, on third run it works. But I remember, that it is a little bit random --- some times in the past it needed more mc runnings before stopping freezes. I have also created new user and tested xterm on it --- it worked. So I started looking for a reason, and found it. If on newly created user I add .Xresources with this line xterm*font: -xos4-terminus-bold-r-normal--24-*-*-*-*-*-iso10646-1 the problem appears if xterm is run on multihead xinerama configuration. On single head it works fine. Another strange thing --- it somtimes happens, that after starting xterm (on multihead and with changed font) it is completly white --- the command promt is not visible. New characters are visible. > Next - to see if xterm is seeing more than one screen, if being started > on the second screen is the cause of the problem (confusing X), and if so, > whether the display information passed to xterm can tell it to use a > different screen number. If that's the explanation, I can modify xterm > to take that into account. (If it's not, I'm still puzzled ;-) Thats part of my xorg.conf Section "ServerLayout" Identifier "ii19ii22" Screen 0 "II22 NV436" 1280 0 Screen 1 "II19 NV432" 0 0 Option "Xinerama" InputDevice "HHKB" InputDevice "Mysz A4Tech 0" Option "CustomKeycode" "on" EndSection xterm starts always on left screen, which is Screen 1 but when using xinerama there is no screen :0.1 --- [EMAIL PROTECTED]:~$ set |grep DISP DISPLAY=:0.0 [EMAIL PROTECTED]:~$ xterm -display :0.1 xterm Xt error: Can't open display: :0.1 As I recall xinerama merges all screens --- it even allows overlapping of them. Regards Jan Górski -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]