Re: Icons
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
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: Remote login, then nothing happens
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/
Re: high CPU load
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/
Freeze on startup
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: Remote login, then nothing happens
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/
Re: Icons
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
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/