Re: Remote login, then nothing happens

2005-08-29 Thread Reid Thompson

Andy Schmidgall wrote:




Igor Pechtchanski wrote:

>>(and then a bunch of options)
>>
>>   
>>

>>>cygwin-prompt> DISPLAY=:0 ssh -Y [EMAIL PROTECTED]
>>>do you then get a
>>>Password:
>>>prompt?
>>>
>>>If you do, and you enter your linux password, do you then get a prompt
>>>on your linux box? If not, this question is probably not related to X
>>>at all. Contact e.g. another cygwin list.
>>> 
>>>

>>I get a password prompt, but after entering my password, nothing else
>>happens. I do not get a command prompt after entering my password.
>>   
>>

>
>Does the same happen if you run "ssh -x" (note the lowercase) without
>DISPLAY= and -Y?  If so, you may indeed have a general ssh issue -- 
try to

>get a working prompt first, and then set up X forwarding.
>
> 
>

ssh -x (lowercase) works just fine. I enter my password and immediately
receive a command prompt.

>One more place to check is your startup scripts on the remote machine.
>Do they change the value of DISPLAY (they shouldn't -- it should be left
>at whatever ssh sets it to)?  Do they try to launch an X client if 
DISPLAY

>is set (that could be what's causing the apparent "hang")?
>   Igor
>[*] Well, there are more configuration options to check, but the two
>things above are required regardless of the configuration.
> 
>

I don't see any scripts that would change the DISPLAY variable on the
server. Also, if I ssh directly in to the server, "echo $DISPLAY" shows
that the variable is empty. Should this have a value?

If I kill the shell process on my windows machine, the xterm throws an
error: "Warning: No xauth data; using fake authentication data for X11
forwarding." and then logs me in to the server with a text command
prompt. I'm not sure if this is important or anything.

Thanks for the help so far.

-Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/

you have to use a capital X -- minor case x disables x forwarding -- see 
man ssh


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Colin Harrison
Hi,

Here's my rough solution (to iconSize conversion problem):-

--- save_winmultiwindowicons.c  2005-08-30 01:57:27.0 +0100
+++ winmultiwindowicons.c   2005-08-30 01:45:58.0 +0100
@@ -54,6 +54,7 @@
 winScaleXBitmapToWindows (int iconSize, int effBPP,
  PixmapPtr pixmap, unsigned char *image);

+HICON Convert32x32IconTo16x16(HICON h32x32Icon);

 /*
  * Scale an X icon bitmap into a Windoze icon bitmap
@@ -278,13 +279,18 @@
   ICONINFO ii;
   WinXWMHints  hints;
   HICONhIcon;
+  BOOL convert=FALSE;

   winMultiWindowGetWMHints (pWin, &hints);
   if (!hints.icon_pixmap) return NULL;

-  iconPtr = LookupIDByType (hints.icon_pixmap, RT_PIXMAP);
+  iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP);

   if (!iconPtr) return NULL;
+
+  if (iconSize == 16) convert = TRUE;
+
+  iconSize = 32;

   hDC = GetDC (GetDesktopWindow ());
   planes = GetDeviceCaps (hDC, PLANES);
@@ -311,7 +317,7 @@
   memset (mask, 0, maskStride * iconSize);

   winScaleXBitmapToWindows (iconSize, effBPP, iconPtr, image);
-  maskPtr = LookupIDByType (hints.icon_mask, RT_PIXMAP);
+  maskPtr = (PixmapPtr) LookupIDByType (hints.icon_mask, RT_PIXMAP);

   if (maskPtr)
 {
@@ -330,6 +336,14 @@
else
  dst++;
 }
+  else
+{
+  /* Free X mask and bitmap */
+  free (mask);
+  free (image);
+  free (imageMask);
+  return NULL;
+}

   ii.fIcon = TRUE;
   ii.xHotspot = 0; /* ignored */
@@ -344,6 +358,8 @@
   /* Merge Win32 mask and bitmap into icon */
   hIcon = CreateIconIndirect (&ii);

+  if (convert) hIcon=Convert32x32IconTo16x16(hIcon);
+
   /* Release Win32 mask and bitmap */
   DeleteObject (ii.hbmMask);
   DeleteObject (ii.hbmColor);
@@ -369,7 +385,7 @@
   WindowPtrpWin;
   HICONhIcon, hiconOld;

-  pWin = LookupIDByType (id, RT_WINDOW);
+  pWin = (WindowPtr) LookupIDByType (id, RT_WINDOW);
   hIcon = (HICON)winOverrideIcon ((unsigned long)pWin);

   if (!hIcon)
@@ -476,3 +492,75 @@
 DestroyIcon (hIcon);
 }
 #endif
+
+
+HICON Convert32x32IconTo16x16(HICON h32x32Icon)
+{
+  HDC hMainDC, hMemDC1, hMemDC2;
+  HICON h16x16Icon;
+  BITMAP bmp;
+  HBITMAP hOldBmp1, hOldBmp2;
+  ICONINFO IconInfo32x32, IconInfo16x16;
+
+  GetIconInfo(h32x32Icon, &IconInfo32x32);
+
+  hMainDC = GetDC(GetDesktopWindow ());
+  hMemDC1 = CreateCompatibleDC(hMainDC);
+  hMemDC2 = CreateCompatibleDC(hMainDC);
+
+  GetObject(IconInfo32x32.hbmColor, sizeof(BITMAP), &bmp);
+
+  IconInfo16x16.hbmColor = CreateBitmap( 16, 16,
+ bmp.bmPlanes,
+ bmp.bmBitsPixel,
+ NULL);
+
+  hOldBmp1 = (HBITMAP) SelectObject( hMemDC1,
+ IconInfo32x32.hbmColor);
+  hOldBmp2 = (HBITMAP) SelectObject( hMemDC2,
+ IconInfo16x16.hbmColor);
+
+  StretchBlt(hMemDC2,
+   0, 0,
+   16, 16,
+   hMemDC1,
+   0, 0,
+   32, 32,
+   SRCCOPY
+   );
+
+  GetObject(IconInfo32x32.hbmMask, sizeof(BITMAP), &bmp);
+
+  IconInfo16x16.hbmMask = CreateBitmap( 16, 16,
+bmp.bmPlanes,
+bmp.bmBitsPixel,
+NULL);
+
+  SelectObject(hMemDC1, IconInfo32x32.hbmMask);
+  SelectObject(hMemDC2, IconInfo16x16.hbmMask);
+
+  StretchBlt(hMemDC2,
+ 0, 0,
+ 16, 16,
+ hMemDC1,
+ 0, 0,
+ 32, 32,
+ SRCCOPY
+   );
+
+  SelectObject(hMemDC1, hOldBmp1);
+  SelectObject(hMemDC2, hOldBmp2);
+
+  IconInfo16x16.fIcon = TRUE;
+  h16x16Icon = CreateIconIndirect(&IconInfo16x16);
+
+  DeleteObject(IconInfo32x32.hbmColor);
+  DeleteObject(IconInfo16x16.hbmColor);
+  DeleteObject(IconInfo32x32.hbmMask);
+  DeleteObject(IconInfo16x16.hbmMask);
+  DeleteDC(hMemDC1);
+  DeleteDC(hMemDC2);
+  ReleaseDC(GetDesktopWindow (), hMainDC);
+
+  return h16x16Icon;
+}

Includes some safety casts and a null mask catcher (I have had black square
icons from dodgy clients, this patch forces the default X).

Colin Harrison


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread Andy Schmidgall



Igor Pechtchanski wrote:


(and then a bunch of options)

   


cygwin-prompt> DISPLAY=:0 ssh -Y [EMAIL PROTECTED]
do you then get a
Password:
prompt?

If you do, and you enter your linux password, do you then get a prompt
on your linux box? If not, this question is probably not related to X
at all. Contact e.g. another cygwin list.
 


I get a password prompt, but after entering my password, nothing else
happens. I do not get a command prompt after entering my password.
   



Does the same happen if you run "ssh -x" (note the lowercase) without
DISPLAY= and -Y?  If so, you may indeed have a general ssh issue -- try to
get a working prompt first, and then set up X forwarding.

 

ssh -x (lowercase) works just fine. I enter my password and immediately 
receive a command prompt.



One more place to check is your startup scripts on the remote machine.
Do they change the value of DISPLAY (they shouldn't -- it should be left
at whatever ssh sets it to)?  Do they try to launch an X client if DISPLAY
is set (that could be what's causing the apparent "hang")?
Igor
[*] Well, there are more configuration options to check, but the two
things above are required regardless of the configuration.
 

I don't see any scripts that would change the DISPLAY variable on the 
server. Also, if I ssh directly in to the server, "echo $DISPLAY" shows 
that the variable is empty. Should this have a value?


If I kill the shell process on my windows machine, the xterm throws an 
error: "Warning: No xauth data; using fake authentication data for X11 
forwarding." and then logs me in to the server with a text command 
prompt. I'm not sure if this is important or anything.


Thanks for the help so far.

-Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Freeze on startup

2005-08-29 Thread Andy Schmidgall
I thought reinstalling the latest version of cygwin/X might help with my 
remote login issues, but now I can't even get X started. It just freezes 
up. I'm not running ZoneAlarm (I used to, but it is long since 
uninstalled) and I tried remounting the /tmp directory in binary mode. 
If I go into the task manager and kill a shell process, then everything 
frees up and X starts running. Are there other programs that might be 
interfering?


I tried removing the -multiwindow and -clipboard parameters from the 
command, but all that happened was that then I could see the 
unresponsive window.


Here's my output:
-
startxwin.sh
Welcome to the XWin X Server
Vendor: The Cygwin/X Project
Release: 6.8.2.0-4

Contact: cygwin-xfree@cygwin.com

XWin was started with the following command line:

XWin -silent-dup-error

_XSERVTransmkdir: Cannot create /tmp/.X11-unix with root ownership
winValidateArgs - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
(II) XF86Config is not supported
(II) See http://x.cygwin.com/docs/faq/cygwin-x-faq.html for more information
(==) FontPath set to 
"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/TTF/,/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/CID/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/"

winDetectSupportedEngines - Windows NT/2000/XP
winDetectSupportedEngines - DirectDraw installed
winDetectSupportedEngines - DirectDraw4 installed
winDetectSupportedEngines - Returning, supported engines 0007
winSetEngine - Using Shadow DirectDraw NonLocking
winAdjustVideoModeShadowDDNL - Using Windows display depth of 32 bits 
per pixel

winFinishScreenInitFB - Masks: 00ff ff00 00ff
MIT-SHM extension disabled due to lack of kernel support
XFree86-Bigfont extension local-client optimization disabled due to lack 
of shared memory support in the kernel

(--) Setting autorepeat to delay=500, rate=31
(--) winConfigKeyboard - Layout: "0409" (0409)
(--) Using preset keyboard for "English (USA)" (409), type "4"
Rules = "xorg" Model = "pc105" Layout = "us" Variant = "(null)" Options 
= "(null)"

-

Thanks,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Joe Krahn

Colin Harrison wrote:

Hi,

Just did a hack along the lines of:-

Make Icons from X hints at 32 pixel iconSize (using Earle's algorithms as
they stand) and convert the icon to
whatever size was requested from winXIconToHICON along the lines of:
http://www.codeguru.com/Cpp/G-M/bitmap/icons/article.php/c4943/


Worked for me 16x16 (no stripped mask problems).

I've got to find some 24x24 etc examples somehow?

I'm on XP, 48,32,24 and 16 pixel icons only possible. Should we just work
with these values?
48x48, 32x32 and 16x16 are recommended by MS (no 24x24?).
We should only create SM_CXICON and SM_CXSMICON sizes, which for now 
means 16 or 32 bits. I think 48-bit is recommended mainly for displaying 
icons from file resources in explorer windows.




This one may be useful for alpha blending code in future:-

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318876

I'm lazy, surfing for code is sometimes easier than writing it :)

Surfing for code is always good. Why re-invent the 'wheel'?

I already have code that handles Alpha, and creates 'standard' icons if 
Alpha is not supported (only important for pre-XP). Alpha icons in X are 
currently only supported by NET_WM properties. The trick for Alpha is 
realizing that RGB values must be pre-multiplied by Alpha. This is why 
colored pixels show up where the 'alpha' bitmask is zero: the RGB pizels 
are supposed to have been multiplied by zero.


I'll work in some new code and post it [hopefully] tonight.

Joe

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Multi-window design rationale

2005-08-29 Thread Igor Pechtchanski
On Mon, 29 Aug 2005, Joe Krahn wrote:

> Why is multi-window mode designed as an "internal window manager"
> instead of an external Win32-aware external WM? It seems to me that the
> advantages of an internal WM are no different from an internal WM on a
> normal X server.
>
> I think it would be less of a hack for an X-Client WM to make Win32
> calls than is having WM code embedded into X. Are there important
> reasons it was done differently?

You're not the only one to think so.  ISTR that there was a multiwindow
external WM mode, where the multiwindow mode was implemented as a separate
WM.  Kensuke was working on it -- you should be able to find the
discussions in the archives searching for "mwextwm".
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Colin Harrison
Hi,

Just did a hack along the lines of:-

Make Icons from X hints at 32 pixel iconSize (using Earle's algorithms as
they stand) and convert the icon to
whatever size was requested from winXIconToHICON along the lines of:
http://www.codeguru.com/Cpp/G-M/bitmap/icons/article.php/c4943/


Worked for me 16x16 (no stripped mask problems).

I've got to find some 24x24 etc examples somehow?

I'm on XP, 48,32,24 and 16 pixel icons only possible. Should we just work
with these values?
48x48, 32x32 and 16x16 are recommended by MS (no 24x24?).

This one may be useful for alpha blending code in future:-

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318876

I'm lazy, surfing for code is sometimes easier than writing it :)

Colin Harrison



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Multi-window design rationale

2005-08-29 Thread Joe Krahn
Why is multi-window mode designed as an "internal window manager" 
instead of an external Win32-aware external WM? It seems to me that the 
advantages of an internal WM are no different from an internal WM on a 
normal X server.


I think it would be less of a hack for an X-Client WM to make Win32 
calls than is having WM code embedded into X. Are there important 
reasons it was done differently?


Joe

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread Igor Pechtchanski
On Mon, 29 Aug 2005, mrflippy wrote:

> Quoting Igor Pechtchanski <[EMAIL PROTECTED]>:

.  Thanks.

> > > > If you open a non-X cygwin session in a "dos box", and then type:
> > > > cygwin-prompt> DISPLAY=:0 xwininfo.exe -root
> > > > Does that show information or an error message?
> > >
> > > It waits a minute, and then gives me:
> > > xwininfo:  unable to open display ':0'
> > > usage:  xwininfo [-options ...]
> >
> > Heh.  To get X forwarding over ssh, you need at least 2 things: a
> > running X server, and for ssh to know which display the X server runs
> > on[*].  The above seems to indicate that the X server is either not
> > running, or is running on the wrong display.
>
> Ah, I may have misunderstood the original question, as I didn't run the
> X server for that. When I was working with it on my own, I did have the
> X server running. However, I was trying to connect to the remote server
> from an xterm. (the FAQ/docs indicated that was the correct way) I'll
> try connecting from just a regular cygwin session (with an X server
> running) tonight when I get home from work. I'll look at your other
> questions later on tonight too.

Well, actually, running it from an xterm essentially ensures that the X
server is running -- as long as DISPLAY is set properly (and it usually is
in an xterm), there should be little difference between running ssh from
an xterm or from a console shell.  Unless...  Make sure you're running a
Cygwin ssh client, or it may not react nicely to ptys (Cygwin's
implementation of ttys) that xterm uses.

Do try running ssh with -x, though, just to confirm that the problem is
indeed with X forwarding, and not generally with ssh.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread mrflippy
Quoting Igor Pechtchanski <[EMAIL PROTECTED]>:
> > > If you open a non-X cygwin session in a "dos box", and then type:
> > > cygwin-prompt> DISPLAY=:0 xwininfo.exe -root
> > > Does that show information or an error message?
> >
> > It waits a minute, and then gives me:
> > xwininfo:  unable to open display ':0'
> > usage:  xwininfo [-options ...]
>
> Heh.  To get X forwarding over ssh, you need at least 2 things: a running
> X server, and for ssh to know which display the X server runs on[*].  The
> above seems to indicate that the X server is either not running, or is
> running on the wrong display.

Ah, I may have misunderstood the original question, as I didn't run the X server
for that. When I was working with it on my own, I did have the X server running.
However, I was trying to connect to the remote server from an xterm. (the
FAQ/docs indicated that was the correct way) I'll try connecting from just a
regular cygwin session (with an X server running) tonight when I get home from
work. I'll look at your other questions later on tonight too.

Thanks,
Andy


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: high CPU load

2005-08-29 Thread Eric S. Johansson

Eric S. Johansson wrote:
I'll try some experiments to see if it's the same under XP as it is 
under 2k, if XP works, I'll shovel some money into the furnace of Redmond.


I have confirmed that Windows 2000 has excessively high CPU loads with 
cygwin X11 when combined with NaturallySpeaking at the same time.  At 
least, on my particular instance of Windows 2000 with god knows what cruft.


If I run on my local copy of Windows XP, everything seems to work fine

cygwin 1.5.18-1

Looks like I will need to go give some money to Chairman Bill's 
retirement fund.


---eric


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread Igor Pechtchanski
On Mon, 29 Aug 2005, Andy Schmidgall wrote:

> Peter Valdemar Morch wrote:
>
> > Hi,
> >
> > This is a mailing list about the X server in Cygwin. Sounds to me like
> > you are asking about ssh specific stuff.

I'm not sure this is true -- this pertains to X forwarding over ssh, so
IMO belongs on this list.

> > Andy Schmidgall mrflippy-at-tresgeek.net |Lists| wrote:
> >
> > > I'm running cygwin/X on my Windows XP Home box, and am trying to
> > > connect to my Linux (Fedora Core 4) box. X runs fine on my windows
> > > machine, but I can't seem to get the remote connection working. I've
> > > tried ssh -X, ssh -Y, multiple combinations of options for those.
> > > All result in the same thing: I'm asked for my password, I enter it,
> > > and then... nothing. Nothing else happens. The logs on the linux box
> > > indicate that it accepted the ssh session. X Forwarding is enabled
> > > in my ssh config file on the linux box. I've read and reread the FAQ
> > > and documentation. I see nothing of note in any logs that I can
> > > find. Any ideas what might be wrong?
> >
> > If you open a non-X cygwin session in a "dos box", and then type:
> > cygwin-prompt> DISPLAY=:0 xwininfo.exe -root
> > Does that show information or an error message?
>
> It waits a minute, and then gives me:
> xwininfo:  unable to open display ':0'
> usage:  xwininfo [-options ...]

Heh.  To get X forwarding over ssh, you need at least 2 things: a running
X server, and for ssh to know which display the X server runs on[*].  The
above seems to indicate that the X server is either not running, or is
running on the wrong display.

> (and then a bunch of options)
>
> > cygwin-prompt> DISPLAY=:0 ssh -Y [EMAIL PROTECTED]
> > do you then get a
> > Password:
> > prompt?
> >
> > If you do, and you enter your linux password, do you then get a prompt
> > on your linux box? If not, this question is probably not related to X
> > at all. Contact e.g. another cygwin list.
>
> I get a password prompt, but after entering my password, nothing else
> happens. I do not get a command prompt after entering my password.

Does the same happen if you run "ssh -x" (note the lowercase) without
DISPLAY= and -Y?  If so, you may indeed have a general ssh issue -- try to
get a working prompt first, and then set up X forwarding.

> If there is another list I should be sending this too, please let me
> know. I wasn't quite sure what specific area the problem fell under.

I think until we determine otherwise, let's continue this on cygwin-xfree.

One more place to check is your startup scripts on the remote machine.
Do they change the value of DISPLAY (they shouldn't -- it should be left
at whatever ssh sets it to)?  Do they try to launch an X client if DISPLAY
is set (that could be what's causing the apparent "hang")?
Igor
[*] Well, there are more configuration options to check, but the two
things above are required regardless of the configuration.
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Ghost "HOME" key keypresses revisited...

2005-08-29 Thread Brian Keener
This is a problem that cropped up months ago, but had disappeared after 
switching my Microsoft wireless mouse out for a Microsoft wired USB mouse.


Now, it's back regardless of which mouse I use.

The problem is that ever once in a short while, the X server acts as if 
the home key has been pressed, when in fact it has NOT been pressed.


I've captured both the real homekey event and this ghost homekey event 
with xev, and they look identical; the x-server thinks the homekey 
really has been pressed.  If I happen to be in a terminal, it shows the 
keycode "^[OH" on the screen, which is exactly what I get if I press "home".


So, what on earth could be going wrong here?

Using an evaluation of Hummingbird Exceed 10 does not display this behavior.

For the moment, I used xmodmap to map the home key to something useless, 
and mapped the Pause/Scr lock key to home, but that's a bit inconvenient.


Brian K

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Joe Krahn

Colin Harrison wrote:

Hi,

Here are my screen dumps

http://www.straightrunning.com/test/icons_working.png

http://www.straightrunning.com/test/icons_faulty.png

Ignore the taskbar entries for [EMAIL PROTECTED] they are my PuTTY shells.

Shows icon stripes and crappy X icon on exit window (exit one needs keen
eyesight!)

...
Yes, pictures clarify a lot. It's the mask that's bad, not the icon.

I'll look through the code again this evening.

Joe

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Colin Harrison
Hi,

Joe Krahn wrote:-

> (Are you running XP?) 

Running XP and 2003 Server.

Colin Harrison


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Joe Krahn

Colin Harrison wrote:

Hi,

Tried your patch..I get no converted icons at all on my taskbar or X
windows.
In the right area though.

If I force 16 iconSize in winXIconToHICON...background stripes on icons.
If I force 32 iconSize in winXIconToHICON...works correctly (reported a few
days ago)
All run in multiwindow mode
Earle's algorithms don't appear to work with anything other than 32, which
is probably why iconSize was hard wired when he wrote them.
I thought icons were DIB's and DWORD aligned?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/
msdn_icons.asp

I'll extract my faulty/good converted icons to files and have a play.
I'll also post some screen dumps on my website and call back (with and
without various icon faults).

Colin Harrison


Icons in resources and files are stored as DIBS, therefore 32-bit 
aligned. When these are loaded into an HICON, they are converted to a 
device-dependent bitmap, and are WORD aligned.


The usual method is to let Windows convert from DIB to DDB. However, the 
multiwindow code creates a DDB directly using CreateBitmap(), rather 
than CreateDIBitmap() or CreateDIBSection(). If X-Pixmap bit data is 
packed the same as Win-Bitmap data, but with alignment differences, then 
a packed-to-packed transfer is faster.


One possible source of the current problem is that WinXP changed how the 
device-dependent data is stored, by adding an Alpha channel. (Are you 
running XP?) This is mostly undocumented, because they assume everyone 
creates DIB icons. So, the icon code should probably always unpack RGB 
data into a DIB, and let Windows do the DDB conversion.


Now, I just need to figure out how to unpack the pixmap data. That can 
also be tricky to get right, unless we can use RENDER extension routines 
to do the work.


Joe

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Colin Harrison
Hi,

Here are my screen dumps

http://www.straightrunning.com/test/icons_working.png

http://www.straightrunning.com/test/icons_faulty.png

Ignore the taskbar entries for [EMAIL PROTECTED] they are my PuTTY shells.

Shows icon stripes and crappy X icon on exit window (exit one needs keen
eyesight!)
All clients are remote and desktop is 32 bit.

Patches used to achieve this:-
For the stripped icons:

--- ./programs/Xserver/hw/xwin/save_winmultiwindowicons.c   2005-08-28
09:38:25.0 +0100
+++ ./programs/Xserver/hw/xwin/winmultiwindowicons.c2005-08-28
09:39:14.0 +0100
@@ -285,6 +285,8 @@
   iconPtr = (PixmapPtr) LookupIDByType (hints.icon_pixmap, RT_PIXMAP);

   if (!iconPtr) return NULL;
+
+  iconSize = 32;

   hDC = GetDC (GetDesktopWindow ());
   planes = GetDeviceCaps (hDC, PLANES);

and for the exit and about window:

--- ./programs/Xserver/hw/xwin/save_windialogs.c2005-08-28
09:35:54.0 +0100
+++ ./programs/Xserver/hw/xwin/windialogs.c 2005-08-28
09:36:19.0 +0100
@@ -318,7 +318,7 @@
/* Set icon to standard app icon */
PostMessage (hDialog,
 WM_SETICON,
-ICON_SMALL,
+ICON_BIG,
 (LPARAM) LoadIcon (g_hInstance,
MAKEINTRESOURCE(IDI_XWIN)));

@@ -616,7 +616,7 @@
   /* Set icon to standard app icon */
   PostMessage (hwndDialog,
   WM_SETICON,
-  ICON_SMALL,
+  ICON_BIG,
   (LPARAM) LoadIcon (g_hInstance,
MAKEINTRESOURCE(IDI_XWIN)));

   /* Override the URL buttons */

Colin Harrison


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Colin Harrison
Hi,

Tried your patch..I get no converted icons at all on my taskbar or X
windows.
In the right area though.

If I force 16 iconSize in winXIconToHICON...background stripes on icons.
If I force 32 iconSize in winXIconToHICON...works correctly (reported a few
days ago)
All run in multiwindow mode
Earle's algorithms don't appear to work with anything other than 32, which
is probably why iconSize was hard wired when he wrote them.
I thought icons were DIB's and DWORD aligned?

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwui/html/
msdn_icons.asp

I'll extract my faulty/good converted icons to files and have a play.
I'll also post some screen dumps on my website and call back (with and
without various icon faults).

Colin Harrison


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Icons

2005-08-29 Thread Joe Krahn

Joe Krahn wrote:

Joe Krahn wrote:

One thing I found is that some Bitmap data are 16-bit aligned and some 
are 32-bit aligned. This is probably the source of horizontal line 
patterns, which I suspect occur for any not-divisible-by-32 size.



A test: if 16 versus 32 bit alignment is the problem, then icons 33-48 
bits wide should be broken, but 49-64 should work. Does someone have 
some X client code handy to test this idea? If so, can you test both NET 
icons, and traditional Pixmap icons?


Joe


Wow... I see that 4 of 7 Active Contributors are working on icon 
support. I guess it's time to really get icon handling done right.


The alignments are definitely wrong. 32-bit alignment is for DIBs. Other 
Win32 bitmaps are 16 bit aligned. But, 32-bit may work sometimes by 
chance. I don't have problem icons, so someone else should test this:


In winmultiwindowicons.c, change these (first line occurs twice):

  stride = ((iconSize * effBPP + 31) & (~31)) / 8;
  ...
  maskStride = ((iconSize * 1 + 31) & (~31)) / 8;

to:

  stride = ((iconSize * effBPP + 15) & (~15)) / 4;
  ...
  maskStride = ((iconSize * 1 + 15) & (~15)) / 4;

I also prefer ">> 2" instead if "/ 4", but optimization should convert 
it to a shift anyhow.



I also noticed that winScaleXBitmapToWindows() seems to totally 
disregard mapping the pixel data to RGB. I assume this means that the 
device-dependent X Pixmaps have an identical data format as 
device-dependent Win32 bitmaps. However, image scaling is by 
nearest-neighbor only, and it does not handle monochrome bitmaps or 
NET_WM icons.


Also, there is too much duplicated but inconsistent stuff among the 
window-manager modes. I think the right thing to do is to extract all 
icons functions into one place. It would be good to consolidate some 
other things as well, like some of the Window functions.


Joe

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread Andy Schmidgall



Peter Valdemar Morch wrote:


Hi,

This is a mailing list about the X server in Cygwin. Sounds to me like 
you are asking about ssh specific stuff.


Andy Schmidgall mrflippy-at-tresgeek.net |Lists| wrote:

I'm running cygwin/X on my Windows XP Home box, and am trying to 
connect to my Linux (Fedora Core 4) box. X runs fine on my windows 
machine, but I can't seem to get the remote connection working. I've 
tried ssh -X, ssh -Y, multiple combinations of options for those. All 
result in the same thing: I'm asked for my password, I enter it, and 
then... nothing. Nothing else happens. The logs on the linux box 
indicate that it accepted the ssh session. X Forwarding is enabled in 
my ssh config file on the linux box. I've read and reread the FAQ and 
documentation. I see nothing of note in any logs that I can find. Any 
ideas what might be wrong?



If you open a non-X cygwin session in a "dos box", and then type:
cygwin-prompt> DISPLAY=:0 xwininfo.exe -root
Does that show information or an error message?


It waits a minute, and then gives me:
xwininfo:  unable to open display ':0'
usage:  xwininfo [-options ...]

(and then a bunch of options)


cygwin-prompt> DISPLAY=:0 ssh -Y [EMAIL PROTECTED]
do you then get a
Password:
prompt?

If you do, and you enter your linux password, do you then get a prompt 
on your linux box? If not, this question is probably not related to X 
at all. Contact e.g. another cygwin list.


I get a password prompt, but after entering my password, nothing else 
happens. I do not get a command prompt after entering my password.


If there is another list I should be sending this too, please let me 
know. I wasn't quite sure what specific area the problem fell under.


Thanks,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



RE: Remote login, then nothing happens

2005-08-29 Thread Soong, SylokeJ
I am wondering if my problem is related.

I have win2k box on cat5 to solaris box.
I have my XP/pro laptop on 802.1g to solaris box.
Both through respective routers, of course.

Using the same win domain account on both boxes
to rsh to the same solaris account,

rsh from win2k box to solaris box is successful.
rsh from xp/pro laptop to solaris box returns no authorisation.
(Using both rsh on windows cmd and cygwin xterm/bash).

Must be something to do with routers security and nothing
with cygwin and much less anything with cygwin/x.

I am going to check with my network security
person.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Andy Schmidgall
Sent: Sun, August 28, 2005 11:14 PM
To: cygwin-xfree@cygwin.com
Subject: Remote login, then nothing happens


Hello,

I'm running cygwin/X on my Windows XP Home box, and am trying to connect 
to my Linux (Fedora Core 4) box. X runs fine on my windows machine, but 
I can't seem to get the remote connection working. I've tried ssh -X, 
ssh -Y, multiple combinations of options for those. All result in the 
same thing: I'm asked for my password, I enter it, and then... nothing. 
Nothing else happens. The logs on the linux box indicate that it 
accepted the ssh session. X Forwarding is enabled in my ssh config file 
on the linux box. I've read and reread the FAQ and documentation. I see 
nothing of note in any logs that I can find. Any ideas what might be wrong?

Thanks,
Andy

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Cygwin/X and GDM

2005-08-29 Thread Josselin Mouette
Le lundi 29 août 2005 à 14:19 +0200, Alexander Gottwald a écrit :
> On Mon, 29 Aug 2005, Josselin Mouette wrote:
> 
> > Hi,
> > 
> > I've been hit by the copy&paste problems with GDM you're talking about
> > at http://www.cygwin.com/ml/cygwin-xfree/2004-12/msg00169.html
> > In this message, you mention a configuration option that would appear,
> > working around this issue. Is it present in the latest Cygwin/X release?
> > I didn't find anything about it in the documentation.
> 
> It's not there yet. The situation was more problematic than I thought and
> there has not been much work to make gdm work. I always suggest using 
> wdm as a replacement. 

Thanks anyway. I wouldn't recommend switching to wdm, though, as it is
based on an outdated xdm release.
-- 
 .''`.   Josselin Mouette/\./\
: :' :   [EMAIL PROTECTED]
`. `'[EMAIL PROTECTED]
   `-  Debian GNU/Linux -- The power of freedom

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Cygwin/X and GDM

2005-08-29 Thread Alexander Gottwald
On Mon, 29 Aug 2005, Josselin Mouette wrote:

> Hi,
> 
> I've been hit by the copy&paste problems with GDM you're talking about
> at http://www.cygwin.com/ml/cygwin-xfree/2004-12/msg00169.html
> In this message, you mention a configuration option that would appear,
> working around this issue. Is it present in the latest Cygwin/X release?
> I didn't find anything about it in the documentation.

It's not there yet. The situation was more problematic than I thought and
there has not been much work to make gdm work. I always suggest using 
wdm as a replacement. 

Followup to [EMAIL PROTECTED] I'm not Cygwin/X maintainer anymore.

bye
ago

-- 
 [EMAIL PROTECTED] 
 http://www.gotti.org   ICQ: 126018723

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/



Re: Remote login, then nothing happens

2005-08-29 Thread Peter Valdemar Morch

Hi,

This is a mailing list about the X server in Cygwin. Sounds to me like 
you are asking about ssh specific stuff.


Andy Schmidgall mrflippy-at-tresgeek.net |Lists| wrote:
I'm running cygwin/X on my Windows XP Home box, and am trying to connect 
to my Linux (Fedora Core 4) box. X runs fine on my windows machine, but 
I can't seem to get the remote connection working. I've tried ssh -X, 
ssh -Y, multiple combinations of options for those. All result in the 
same thing: I'm asked for my password, I enter it, and then... nothing. 
Nothing else happens. The logs on the linux box indicate that it 
accepted the ssh session. X Forwarding is enabled in my ssh config file 
on the linux box. I've read and reread the FAQ and documentation. I see 
nothing of note in any logs that I can find. Any ideas what might be wrong?


If you open a non-X cygwin session in a "dos box", and then type:
cygwin-prompt> DISPLAY=:0 xwininfo.exe -root
Does that show information or an error message?

cygwin-prompt> DISPLAY=:0 ssh -Y [EMAIL PROTECTED]
do you then get a
Password:
prompt?

If you do, and you enter your linux password, do you then get a prompt 
on your linux box? If not, this question is probably not related to X at 
all. Contact e.g. another cygwin list.


If you then do e.g.
linux-prompt> echo $DISPLAY
and then
linux-prompt> xterm
 or
linux-prompt> xwininfo -root

Then what happens?

Or have I misunderstood your problem? Regardless of the answer to that 
question, does ssh -Y work like I've just described?


Peter


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://x.cygwin.com/docs/
FAQ:   http://x.cygwin.com/docs/faq/