Paul A. Rubin wrote:
Ed Gatzke wrote:
So, cmd.exe and command.exe when started from Start->Run both do not
respond to
Alt-F4 for me either. Other things started from cmd.exe command
prompt do
listen to Alt F4 c:\windows\system32\winmine.exe and dvdplay.exe both
respond to
Alt-F4.
I run most of my stuff from a cygwin shell, but everything closes on
Alt-F4
except cmd.exe and lyx.exe. Even when I start lyx from the desktop
shortcut, it
does not respond to Alt-F4. Even when I double click on the cmd.exe in
windows/system32 it does not respond to F4.
I have tried cmd.exe on about 6 xp machines, Alt-F4 does nothing on
any of them
for cmd.exe.
I finally got around to trying this on my home PC, which runs XP Home
rather than XP Pro. Under XP Home, alt-F4 did *not* kill cmd.exe. On
my laptop (XP Pro), it does. I haven't had a chance to try the XP Pro
machine in my office (as I'm assiduously avoiding going anywhere near
the office).
The exact lyx installer is the most recent, the 2.0 installer for 1.41
lyxwininstall/LyxWin141Complete-2.01.exe
Even just running lyx.exe (not lyx.bat) appears to open a shell for a
second
before the application launches... Very odd, I wonder what is up.
Maybe the
shell is the root of all problems with Alt-F4.
I'm not sure what goes on in that fleeting shell, but according to the
task manager I use, when you run lyx.exe directly it is not running in a
shell. LyX does, however, make extensive use of shell scripts (for
converting graphics, running the configuration script, etc.), so it may
be running some quick script at that point.
This stuff is crazy. I tried posting on some MS "help" pages, and
the "MS
experts" suggested I use Alt-Space then C, which breaks the standard
that Alt-F4
closes everything, like hitting the big red X.
I agree it's strange, but as far back as I can remember, Microsoft's
insistence that third-party developers adhere to their rules for Windows
programs has not extended to their own programmers. Nor have they been
philosophically consistent. Thus Windows 3.x came with an FTP client
that had a GUI, but Windows 95/98 et seq. come only with a DOS FTP
client -- even though Microsoft has been trying to phase out DOS in the
last few iterations of Windows.
I'm quite curious why you and Steve and I get three different behavior
patterns from ostensibly the same OS. (I'm assuming that you and Steve
are both using XP Pro, fully patched.)
/Paul
No, I think Ed mentioned he used Cygwin. Luckily, Enrico tutored me
(everything beautiful belongs to Enrico and the ugly is all mine).
When Ed starts LyX from a cygwin shell the batfile he is using
leaves the (bash) shell open as a hanging process. I had that problem
too and I wanted the X-server (the one in a white window,xterm) to
close so that I could use it to open another program besides LyX. I
mean it spawns lyx and then returns to being available separately.
So I sort of fixed it. I'll put the lyx11.bat text at the end. I
used some other file as a basis (startxwin.bat) and mostly just
tacked on "run c:\cygwin\usr\local\bin\lyx-x11.exe: at the end.
I start it with a desktop icon:
target C:\cygwin\usr\X11R6\bin\LyX11.bat
start in C:\cygwin\usr\X11R6\bin
I can create the problem if I start *native* LyX from the
cygwin shell, then it opens a black/bash window that won't
close. Otherwise I can close both the shell and lyx using
alt-f4. It works ok to open from cmd.exe shell, lyx with
either lyx.bat or lyx.exe and then close with alt-f4.
I researched and found a few reports complaining about not
being able to close cmd.exe with alt-f4. I found no report
of being able to close cmd.exe shell with alt-f4. I think
Paul has a very talented machine. I don't think it is meant
or built to close under native Windows, so use "exit" <return>
if you don't want to use the mouse.
I think if you are using cygwin to open native windows lyx
rather than cygwin lyx, you could modify the startxwin.bat
to lyx11.bat and point it to "run C:\lyx142\LyX14\bin\lyx11.bat"
(modify appropriately) and start in: C:\lyx142\LyX14\bin
(desktop icon) rather than
C:\cygwin\usr\X11R6\bin\LyX11.bat
the last line in startxwin.bat changed to lyx11.bat would change
"run c:\cygwin\usr\local\bin\lyx-x11.exe"
and would change to "run C:\lyx142\LyX14\bin\lyx.bat or lyx.exe
not lyx-x11.exe
I mean that I can start native LyX from an xterm window,
with two separate windows that each close with alt-f4.
Incidentally, the cygwin version of lyx1.4.1 runs on Windows 98
"Re: Installing LyX on Windows 98 - Solved fairly well with Cygwin"
Cheers, Stephen
-------------------------------------- cut and paste lyx11.bat
@echo off
SET DISPLAY=127.0.0.1:0.0
REM
REM The path in the CYGWIN_ROOT environment variable assignment assume
REM that Cygwin is installed in a directory called 'cygwin' in the root
REM directory of the current drive. You will only need to modify
REM CYGWIN_ROOT if you have installed Cygwin in another directory. For
REM example, if you installed Cygwin in \foo\bar\baz\cygwin, you will need
REM to change \cygwin to \foo\bar\baz\cygwin.
REM
REM This batch file will almost always be run from the same drive (and
REM directory) as the drive that contains Cygwin/X, therefore you will
REM not need to add a drive letter to CYGWIN_ROOT. For example, you do
REM not need to change \cygwin to c:\cygwin if you are running this
REM batch file from the C drive.
REM
SET CYGWIN_ROOT=\cygwin
SET RUN=%CYGWIN_ROOT%\bin\run -p /usr/X11R6/bin
SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
SET XAPPLRESDIR=/usr/X11R6/lib/X11/app-defaults
SET XCMSDB=/usr/X11R6/lib/X11/Xcms.txt
SET XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
SET XNLSPATH=/usr/X11R6/lib/X11/locale
REM
REM Cleanup after last run.
REM
if not exist %CYGWIN_ROOT%\tmp\.X11-unix\X0 goto CLEANUP-FINISH
attrib -s %CYGWIN_ROOT%\tmp\.X11-unix\X0
del %CYGWIN_ROOT%\tmp\.X11-unix\X0
:CLEANUP-FINISH
if exist %CYGWIN_ROOT%\tmp\.X11-unix rmdir %CYGWIN_ROOT%\tmp\.X11-unix
REM
REM The error "Fatal server error: could not open default font 'fixed'" is
REM caused by using a DOS mode mount for the mount that the Cygwin/X
REM fonts are accessed through. See the Cygwin/X FAQ for more
REM information:
REM http://x.cygwin.com/docs/faq/cygwin-x-faq.html#q-error-font-eof
REM
if "%OS%" == "Windows_NT" goto OS_NT
REM Windows 95/98/Me
echo startxwin.bat - Starting on Windows 95/98/Me
goto STARTUP
:OS_NT
REM Windows NT/2000/XP/2003
echo startxwin.bat - Starting on Windows NT/2000/XP/2003
:STARTUP
REM Brief descriptions of XWin-specific options:
REM
REM -screen scr_num [width height]
REM Enable screen scr_num and optionally specify a width and
REM height for that screen.
REM Most importantly, any parameters specified before the first -screen
REM parameter apply to all screens. Any options after the first
-screen
REM parameter apply only to the screen that precedes the parameter.
REM Example:
REM XWin -fullscreen -screen 0 -screen 1 -depth 8 -screen 2
REM All screens will be fullscreen, but screen 2 will be depth 8, while
REM screens 0 and 1 will be the default depth (whatever depth Windows
REM is currently running at).
REM -multiwindow
REM Start an integrated Windows-based window manager. Not to be used
REM with -rootless nor -fullscreen.
REM -rootless
REM Use a transparent root window with an external window manager
REM (such as twm). Not to be used with -multiwindow nor
REM with -fullscreen.
REM -fullscreen
REM Use a window as large as possible on the primary monitor.
REM -multiplemonitors
REM Create a root window that covers all monitors on a
REM system with multiple monitors.
REM -clipboard
REM Enable the integrated version of xwinclip. Do not use in
REM conjunction with the xwinclip program.
REM -depth bits_per_pixel
REM Specify the screen depth to run at (in bits per pixel) using a
REM DirectDraw-based engine in conjunction with the -fullscreen
REM option, ignored if the -fullscreen option is not specified.
REM By default, you will be using a DirectDraw based engine on any
REM system that supports it.
REM -unixkill
REM Trap Ctrl+Alt+Backspace as a server shutdown key combination.
REM -nounixkill
REM Disable Ctrl+Alt+Backspace as a server shutdown key combination
(default).
REM Example:
REM XWin -unixkill -screen 0 -screen 1 -screen 2 -nounixkill
REM Screens 0 and 1 will allow Ctrl+Alt+Backspace, but screen 2
will not.
REM -winkill
REM Trap Alt+F4 as a server shutdown key combination (default).
REM -nowinkill
REM Disable Alt+F4 as a server shutdown key combination.
REM -scrollbars
REM Enable resizing of the server display window. Do not use in
conjunction
REM with -multiwindow nor with -rootless.
REM -nodecoration
REM Draw the server root window without a title bar or border.
REM Do not use with -mutliwindow nor with -rootless.
REM -lesspointer
REM Hide the Windows mouse cursor anytime it is over any part of the
REM window, even if Cygwin/X is not the window with the focus.
REM -refresh rate_in_Hz
REM Specify a refresh rate to use when used with the -fullscreen
option.
REM -trayicon
REM Enable the tray icon (default).
REM -notrayicon
REM Disable the tray icon.
REM Example:
REM XWin -notrayicon -screen 0 -screen 1 -screen 2 -trayicon
REM Screens 0 and 1 will not have tray icons, but screen 2 will.
REM -emulate3buttons [timeout]
REM Emulate 3 button mouse with an optional timeout in milliseconds.
REM -xf86config
REM Specify an XF86Config-style configuration file.
REM -keyboard
REM Specify a keyboard device from the configuration file.
REM
REM Startup the programs
REM
REM Startup the X Server with the integrated Windows-based window manager.
REM WARNING: Do not use 'xwinclip' in conjunction with the ``-clipboard''
REM command-line parameter for XWin. Doing so would start two clipboard
REM managers, which is never supposed to happen.
%RUN% XWin -multiwindow -clipboard -silent-dup-error
REM Startup an xterm, using bash as the shell.
%RUN% xterm -e /usr/bin/bash -l
REM
REM Startup the twm window manager.
REM WARNING: Do not use an external window manager in conjunction with
REM the ``-multiwindow'' command-line parameter for XWin. Doing so
REM would start two window managers, which is never supposed to happen.
REM
REM %RUN% twm
REM Set a background color. Only needed when not using -multwindow for
XWin.
REM %RUN% xsetroot -solid aquamarine4
run c:\cygwin\usr\local\bin\lyx-x11.exe
------------------------------------------------------------