Subject: Re: runlyx.bat does not start Cygwin LyX
From: Milos Komarcevic <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Thu, 20 Feb 2003 17:59:27 +0000

At 15:15 18/02/2003 -0800, you wrote:
> >>So what's the difference between lyx.exe and lyxwin32.exe?
> >>lyxwin32.exe will do the following to ensure a proper environment:
> >>
> >>   1) Running all startup scripts, i.e. the system wide /etc/profile
> >>      all script in /etc/profile.d as well as your personal
> >>      $HOME/.profile and your $HOME/.bashrc.
> >>   2) Executes the file /etc/lyxprofile
> >>   3) It starts lyx.exe sending error output into the file /tmp/lyx.out
> >>
> >>So any command in any of those files will be executed before calling
> >>lyx. lyxwin32 does not call tr a standard unix command (translate). It
> >>seems that that tr command does not terminate and therefore lyxwin32
> >>can't proceed to start lyx.exe at the end. So who does call that? SO
> >>why does it not exit?
> >
> > The only one I could find is the line
> >
> > export HOSTNAME=`hostname | tr '[A-Z]' '[a-z]'`
> >
> > in /etc/profile (that is the default one, hasn't been changed).
>
>Curious, there's no such line in my profile (also default).

Do you have  base-files-1.1-1 installed?
That comes with /etc/profile.default that has that line in it,
and hence my /etc/profile too

> > But that doesn't seem to cause problems and hang when I open a
> > bash window, start XFree86 and xterm or anything else,
> > just with lyxwin32.exe
> > The only change I did to /etc/lyxprofile is comment out the 'export
> > HOME=...' as I've already set it as my Windows env. variable.
>
>Try commenting out the export HOSTNAME line in /etc/profile and see if
>the problem disappears.

That did solve the problem and LyX started successfully.
So now we know which 'tr' is hanging, can we find out why is it so?
It does not hang when I open just a bash window, and the HOSTNAME var
is set correctly.

>FWIW, I've bumped into situations where something worked ok in DOS but
>not Cygwin, or vice versa.  It turns out that permissions for the same
>file may be different (or at least appear different) between DOS/Windoze
>and Cygwin.  (This only applies to Win 2K and XP, and maybe NT.)  I'm
>wondering if maybe lyxwin32, running under DOS rather than Cygwin, tries
>to invoke some other program for which it lacks, or appears to lack,
>permission.

I've tried this with or without CYGWIN=ntsec, no difference.

I'm cc'ing this to the cygwin list also, maybe somebody can shed
some new light on this. 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/