RE: no need to install xfree86

2002-07-13 Thread Dockeen

You can control how many windows are present, there size, placement etc.
by editing the .xinitrc file you created in your home directory.  The
commands for creating the windows are down at the bottom of the file.
(Also starts a clock)

(Still learning X stuff myself, I did get KDE going pretty good!)

Wayne Keen



Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

I forgot to check if the batch file already existed or not. Attached is 
the corrected script.

Jehan


#!/bin/sh

BATCH_FILE=/usr/X11R6/bin/startxwin.bat

if [ ! -f ${BATCH_FILE} ]; then

  
  # First part of the batch file
  cat  EOF  $BATCH_FILE
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/XFree86, 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 

EOF

  
  # Get the DOS path to cygwin
  echo SET CYGWIN_ROOT=`cygpath -w /`  $BATCH_FILE
  
  
  # Second part of the batch file
  cat  EOF  $BATCH_FILE

SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%

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 Startup the X Server, the twm window manager, and an xterm.
REM 
REM Notice that the window manager and the xterm will wait for
REM the server to finish starting before trying to connect; the
REM error Cannot Open Display: 127.0.0.1:0.0 is not due to the
REM clients attempting to connect before the server has started, rather
REM that error is due to a bug in some versions of cygwin1.dll.  Upgrade
REM to the latest cygwin1.dll if you get the Cannot Open Display error.
REM See the Cygwin/XFree86 FAQ for more information:
REM http://xfree86.cygwin.com/docs/faq/
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/XFree86
REM fonts are accessed through.  See the Cygwin/XFree86 FAQ for more 
REM information:
REM http://xfree86.cygwin.com/docs/faq/cygwin-xfree-faq.html#q-error-font-eof
REM

REM
REM Use the /B switch only when we can positively confirm that the OS
REM is Windows NT/2000.  Do not use the switch in any other case.  This
REM should work fine, as it assumes we cannot use /B, except when a certain
REM criterion is met.  A previous version of this batch file assumed that
REM we could use /B, except when some criterion was met; needless to say,
REM that didn't work.
REM 

if %OS% == Windows_NT goto USE-B-SWITCH

REM Windows 95/98/Me
echo startxwin.bat - Starting on Windows 95/98/Me

REM Startup the X Server.

start XWin

REM Startup an xterm, using bash as the shell.

run xterm -sl 1000 -sb -ms red -fg gray -bg black -e /usr/bin/bash

REM Startup the twm window manager.

run twm

goto END


REM
REM Use the /B switch.  This starts the specified process in the background;
REM in other words, it does not cause a new Command Prompt window to be
REM opened for each 'start' command.
REM

:USE-B-SWITCH

REM Windows NT/2000
echo startxwin.bat - Starting on Windows NT/2000

REM Startup the X Server.

start XWin

REM Startup an xterm, using bash as the shell.
run xterm -sl 1 -sb -ms red -fg gray -bg black -e /usr/bin/bash

REM Startup the twm window manager.

run twm

:END


REM Set a background color to comply with FCC regulations :)

run xsetroot -solid aquamarine4
EOF

  
  # Convert the file to dos format
  # and update the permission
  u2d $BATCH_FILE
  chmod 755 $BATCH_FILE

fi


Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms

--- Jehan [EMAIL PROTECTED] wrote:
 I forgot to check if the batch file already existed or not. Attached is 
 the corrected script.
 
   Jehan
  #!/bin/sh
 
 BATCH_FILE=/usr/X11R6/bin/startxwin.bat
 
 if [ ! -f ${BATCH_FILE} ]; then
 
   
   # First part of the batch file
   cat  EOF  $BATCH_FILE
 @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/XFree86, 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 
 
 EOF
 
   
   # Get the DOS path to cygwin
   echo SET CYGWIN_ROOT=`cygpath -w /`  $BATCH_FILE
   
   
   # Second part of the batch file
   cat  EOF  $BATCH_FILE
 
 SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%
 
 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 Startup the X Server, the twm window manager, and an xterm.
 REM 
 REM Notice that the window manager and the xterm will wait for
 REM the server to finish starting before trying to connect; the
 REM error Cannot Open Display: 127.0.0.1:0.0 is not due to the
 REM clients attempting to connect before the server has started, rather
 REM that error is due to a bug in some versions of cygwin1.dll.  Upgrade
 REM to the latest cygwin1.dll if you get the Cannot Open Display
 error.
 REM See the Cygwin/XFree86 FAQ for more information:
 REM http://xfree86.cygwin.com/docs/faq/
 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/XFree86
 REM fonts are accessed through.  See the Cygwin/XFree86 FAQ for more 
 REM information:
 REM

http://xfree86.cygwin.com/docs/faq/cygwin-xfree-faq.html#q-error-font-eof
 REM
 
 REM
 REM Use the /B switch only when we can positively confirm that the OS
 REM is Windows NT/2000.  Do not use the switch in any other case.  This
 REM should work fine, as it assumes we cannot use /B, except when a
 certain
 REM criterion is met.  A previous version of this batch file assumed
 that
 REM we could use /B, except when some criterion was met; needless to
 say,
 REM that didn't work.
 REM 
 
 if %OS% == Windows_NT goto USE-B-SWITCH
 
 REM Windows 95/98/Me
 echo startxwin.bat - Starting on Windows 95/98/Me
 
 REM Startup the X Server.
 
 start XWin
 
 REM Startup an xterm, using bash as the shell.
 
 run xterm -sl 1000 -sb -ms red -fg gray -bg black -e /usr/bin/bash
 
 REM Startup the twm window manager.
 
 run twm
 
 goto END
 
 
 REM
 REM Use the /B switch.  This starts the specified process in the
 background;
 REM in other words, it does not cause a new Command Prompt window to be
 REM opened for each 'start' command.
 REM
 
 :USE-B-SWITCH
 
 REM Windows NT/2000
 echo startxwin.bat - Starting on Windows NT/2000
 
 REM Startup the X Server.
 
 start XWin
 
 REM Startup an xterm, using bash as the shell.
 run xterm -sl 1 -sb -ms red -fg gray -bg black -e /usr/bin/bash
 
 REM Startup the twm window manager.
 
 run twm
 
 :END
 
 
 REM Set a background color to comply with FCC regulations :)
 
 run xsetroot -solid aquamarine4
 EOF
 
   
   # Convert the file to dos format
   # and update the permission
   u2d $BATCH_FILE
   chmod 755 $BATCH_FILE
 
 fi

Jehan,

You still have the chicken-and-the egg issue.  How is a user going to
startxwin from a console window if /usr/X11R6/bin is not in their path? 
Obviously, if the user installs these packages, they want to be able to
access them.  The answer to this is to make 2 scripts that get installed
in the /etc/profile.d directory by the XFree86-base package.  One is for
the tcsh/csh users and the other is for the bash/ash/zsh users.  In these
two scripts we establish the following:

1)Add /usr/X11R6/bin to the $PATH
2)Resolve the new environmental CYGWIN_X_ROOT by using the method you
specified above.

Then have the various startxwin scripts employ CYGWIN_X_ROOT, but strip
the  PATH setting from them.  This way you avoid multiple instances of the
XFree directories in your path.  So what about the .bat file you say? 
Easy, just have it 

RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Harold L Hunt
 Sent: Saturday, 13 July 2002 6:38 AM
 To: [EMAIL PROTECTED]
 Subject: Re: Bug in startxwin.bat after installing with 
 setup.exe in win98SE
 
 
 Jehan [EMAIL PROTECTED] said:
 
  Harold L Hunt wrote:
   Okay, if you are so smart, explain to me how I can put a 
 drive letter into a
   batch file that is expected to work on computers where 
 Cygwin could be
   installed on ``c:\cygwin'' or ``d:\cygwin''?  I certainly 
 could not put ``c''
   as the drive, nor could I put ``d'' as the drive.  So, 
 what do you suggest?

I missed this the first time around.

What you need is a small sed script in your postinstall script. The sed
script can replace some symbol with the output from 'cygpath -w
/usr/X11/'.

As for linefeed issues, AFAIK windows will process bat files with unix
format, but you could always use d2u in your script.

Additionally you need to make your package depend on the tools you use
in your script.

Rob




Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Nicholas Wourms wrote:
 You still have the chicken-and-the egg issue.  How is a user going to
 startxwin from a console window if /usr/X11R6/bin is not in their path? 

Two things:
- For what I understood of the problem, Michael already found the batch 
file but then, CYGWIN_ROOT was pointing to the wrong drive (or more 
exactly didn't point to any drive at all) with the end result that 
cygwin application couldn't find the dll.
My shell script, once run by the installation, create a batch file with 
an absolute path to cygwin. So when someone runs it, the dll will be 
found = Michael's problem fixed.
- Correct me if I'm wrong but the batch file is to be run from Explorer 
or the like, not from a console. If you want to use the console, then 
use startxwin.sh (assuming that your console is Bash, which, from the 
rest of your message, seems to be the case)


 Obviously, if the user installs these packages, they want to be able to
 access them.  The answer to this is to make 2 scripts that get installed
 in the /etc/profile.d directory by the XFree86-base package.  One is for
 the tcsh/csh users and the other is for the bash/ash/zsh users.  In these
 two scripts we establish the following:
 
 1)Add /usr/X11R6/bin to the $PATH
 2)Resolve the new environmental CYGWIN_X_ROOT by using the method you
 specified above.
 
 Then have the various startxwin scripts employ CYGWIN_X_ROOT, but strip
 the  PATH setting from them.  This way you avoid multiple instances of the
 XFree directories in your path.  So what about the .bat file you say? 
 Easy, just have it run bash - which then executes the xfree script in
 /etc/profile.d, followed by the script startxwin.sh.  So my recommendation
 is to examine the openssl.csh and openssl.sh scripts in /etc/profile.d for
 some examples.  You can also look in /etc/profile.d on linux.

Ok, Harold, find attached the two scripts that will add the X path to 
the PATH environment variable when one starts a shell. That way he/she 
doesn't have to use the full path for startxwin.sh. The export PATH in 
startxwin.sh can then be removed.

As to have the batch file running Bash which will execute startxwin.sh, 
two things:
1) that doesn't fix your chicken-and-egg problem, you still have to find 
the batch file.
2) once you have the batch file, it still have to find Bash!

My little install.sh script fixes 2).

For 1), I know of three solutions:
- what we have currently: have the guy search for the batch, and create 
a shortcut if he wants to, in a more accesible place (desktop, start 
menu, whatever). Not ideal, but works ok if documented.
- modify the windows path environment (I'm not found of that) and ask 
the user to run a command prompt and then startxwin.bat. No better than 
starting Bash and running startwin.sh (actually worse because we have to 
globally change the Windows path).
- Create a shortcut to the batch file in the start menu. That would be 
the best solution except that I don't know how to do it. Cygwin does 
something like that for cygwin.bat but IIRC it has the cygwin path 
hardcoded to C:\cygwin even if you installed cygwin in t:\foo\bar.


 However, since it is your idea, I don't want to steal your show.

I like to defend my ideas, it satisfies my ego when their chosen over 
someone else's. But that doesn't mean I don't like people helping me 
out. Participating to a project/idea doesn't make it your own so have no 
fear.

Jehan


if ( $?PATH ) then
  setenv PATH ${PATH}:/usr/X11R6/bin
else
  setenv PATH :/usr/X11R6/bin
endif


export PATH=${PATH}:/usr/X11R6/bin


Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

 I missed this the first time around.
 
 What you need is a small sed script in your postinstall script. The sed
 script can replace some symbol with the output from 'cygpath -w
 /usr/X11/'.
 
 As for linefeed issues, AFAIK windows will process bat files with unix
 format, but you could always use d2u in your script.
 
 Additionally you need to make your package depend on the tools you use
 in your script.

Too late ;)
http://cygwin.com/ml/cygwin-xfree/2002-07/msg00318.html

but thanks anyway
Jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Robert Collins wrote:
- Create a shortcut to the batch file in the start menu. That 
would be 
the best solution except that I don't know how to do it. Cygwin does 
something like that for cygwin.bat but IIRC it has the cygwin path 
hardcoded to C:\cygwin even if you installed cygwin in t:\foo\bar.
 
 
 The cygwin bat file is created based on the output of mount, so it's
 always correct.

I'm not talking of the batch file, I have that figured out but about the 
shortcut one gets in Start | Cygwin. Doesn't this always point to 
c:\cygwin\cygwin.bat even if cygwin.bat is actually in t:\foo\bar?

Jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Robert Collins wrote:
 Nope, it's also generated from mount information. Cygwin could be
 z:\bar\foo\bar and it would still be correct.

Is there a way then for a program to add (after asking the user) to 
create a shortcut on the desktop/start menu? Is there also way to get 
the information about the installing for all users or just me?

Jehan






RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: Jehan [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 14 July 2002 8:18 AM
 To: Robert Collins
 Subject: Re: Bug in startxwin.bat after installing with 
 setup.exe in win98SE
 
 
 Robert Collins wrote:
  Nope, it's also generated from mount information. Cygwin could be
  z:\bar\foo\bar and it would still be correct.
 
 Is there a way then for a program to add (after asking the user) to 
 create a shortcut on the desktop/start menu? Is there also way to get 
 the information about the installing for all users or just me?
 
   Jehan

Yes to the first, it's a tool in cygutils - Chuck answered the same
question here less than a week ago.
No to the second, that's not exported anywhere by setup. Perhaps it
should be.

Rob




RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Thomas Chadwick

 I hate to jump into the middle of a religious argument (which this is 
 turning out to be) but it seems to me that a plausible 
 solution would be to 
 urge the maintainers of the cygwin setup program to define a 
 CYGWIN_ROOT 
 environment variable for us.  Cygwin setup is already putting 
 stuff in the 
 registry, isn't it, so why not this?

No. Use `mount -w /` in your postinstall shell script.

Rob




Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Robert Collins wrote:
 
-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]] On Behalf Of Thomas Chadwick
 
 
I hate to jump into the middle of a religious argument (which this is 
turning out to be) but it seems to me that a plausible 
solution would be to 
urge the maintainers of the cygwin setup program to define a 
CYGWIN_ROOT 
environment variable for us.  Cygwin setup is already putting 
stuff in the 
registry, isn't it, so why not this?
 
 
 No. Use `mount -w /` in your postinstall shell script.

You mean `cygpath -w /` I guess. Mount doesn't have an option -w.

Jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Robert Collins wrote:
 
-Original Message-
From: Jehan [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, 14 July 2002 8:18 AM
To: Robert Collins
Subject: Re: Bug in startxwin.bat after installing with 
setup.exe in win98SE


Robert Collins wrote:

Nope, it's also generated from mount information. Cygwin could be
z:\bar\foo\bar and it would still be correct.

Is there a way then for a program to add (after asking the user) to 
create a shortcut on the desktop/start menu? Is there also way to get 
the information about the installing for all users or just me?

  Jehan
 
 
 Yes to the first, it's a tool in cygutils - Chuck answered the same
 question here less than a week ago.

Kool, thanks! I missed that thread.

Harold, here is an updated install.sh that will ask the user if he wants 
a shortcut on the desktop and in the Start menu. Again, this script 
requires cygutils (for both u2d and mkshortcut now)

Jehan


#!/bin/bash

BATCH_FILE=/usr/X11R6/bin/startxwin.bat

if [ ! -f ${BATCH_FILE} ]; then

  
  # First part of the batch file
  cat  EOF  ${BATCH_FILE}
@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/XFree86, 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 

EOF

  
  # Get the DOS path to cygwin
  echo SET CYGWIN_ROOT=`cygpath -w /`  ${BATCH_FILE}
  
  
  # Second part of the batch file
  cat  EOF  ${BATCH_FILE}

SET PATH=.;%CYGWIN_ROOT%\bin;%CYGWIN_ROOT%\usr\X11R6\bin;%PATH%

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 Startup the X Server, the twm window manager, and an xterm.
REM 
REM Notice that the window manager and the xterm will wait for
REM the server to finish starting before trying to connect; the
REM error Cannot Open Display: 127.0.0.1:0.0 is not due to the
REM clients attempting to connect before the server has started, rather
REM that error is due to a bug in some versions of cygwin1.dll.  Upgrade
REM to the latest cygwin1.dll if you get the Cannot Open Display error.
REM See the Cygwin/XFree86 FAQ for more information:
REM http://xfree86.cygwin.com/docs/faq/
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/XFree86
REM fonts are accessed through.  See the Cygwin/XFree86 FAQ for more 
REM information:
REM http://xfree86.cygwin.com/docs/faq/cygwin-xfree-faq.html#q-error-font-eof
REM

REM
REM Use the /B switch only when we can positively confirm that the OS
REM is Windows NT/2000.  Do not use the switch in any other case.  This
REM should work fine, as it assumes we cannot use /B, except when a certain
REM criterion is met.  A previous version of this batch file assumed that
REM we could use /B, except when some criterion was met; needless to say,
REM that didn't work.
REM 

if %OS% == Windows_NT goto USE-B-SWITCH

REM Windows 95/98/Me
echo startxwin.bat - Starting on Windows 95/98/Me

REM Startup the X Server.

start XWin

REM Startup an xterm, using bash as the shell.

run xterm -sl 1000 -sb -ms red -fg gray -bg black -e /usr/bin/bash

REM Startup the twm window manager.

run twm

goto END


REM
REM Use the /B switch.  This starts the specified process in the background;
REM in other words, it does not cause a new Command Prompt window to be
REM opened for each 'start' command.
REM

:USE-B-SWITCH

REM Windows NT/2000
echo startxwin.bat - Starting on Windows NT/2000

REM Startup the X Server.

start XWin

REM Startup an xterm, using bash as the shell.
run xterm -sl 1 -sb -ms red -fg gray -bg black -e /usr/bin/bash

REM Startup the twm window manager.

run twm

:END


REM Set a background color to comply with FCC regulations :)

run xsetroot -solid aquamarine4
EOF

  
  # Convert the file to dos format
  # and update the permission
  u2d ${BATCH_FILE}
  chmod 755 ${BATCH_FILE}

fi


# Create Desktop and Start menu icons
while /bin/true; do
  read -p Do you want to add an icon for Cygwin/Xfree on the Desktop? [y|n]  ANSWER
  case $ANSWER 

Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

I forgot to attach the X.ico file. It's not the best in the world but 
I guess it will do (it's the same I sent you with the systray patch a 
while ago). It is to be installed in /usr/X11R6/bin (or you have to 
modify the script)

Jehan




Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms


--- Jehan [EMAIL PROTECTED] wrote:
 I forgot to attach the X.ico file. It's not the best in the world but 
 I guess it will do (it's the same I sent you with the systray patch a 
 while ago). It is to be installed in /usr/X11R6/bin (or you have to 
 modify the script)
   
   Jehan
 

 ATTACHMENT part 2 image/x-icon name=X.ico

Jehan,

If you search the archives, others have already made icons ready for you
use :).  Meanwhile, I've been thinking about this and looking at the
setup.exe code.  If no-one minds, I'm going to generate and submit a patch
that has setup.exe do all the shortcut stuff.  Though your bat file is
still useful.  I wonder why not just can all the dos stuff by having the
batch file call bash which then calls startxwin.sh?  One file is *much*
easier to maintain then two.  Anywho, let me know your thoughts on this..

Cheers,
Nicholas

P.S. - Robert that goes for you too...

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms


--- Charles Wilson [EMAIL PROTECTED] wrote:
 Better hold off on that patch, Nicholas -- it's opposite of the 
 direction Robert wants to go.  Setup should be , itself, as generic as 
 possible, and all actions driven by external data.
 
 (granted, I haven't been reading this thread, so I might've missed 
 something...like discussion of the mkshortcut tool in cygutils...)
 
 
 Nicholas Wourms wrote:
 
  --- Jehan [EMAIL PROTECTED] wrote:
  
 I forgot to attach the X.ico file. It's not the best in the world
 but 
 I guess it will do (it's the same I sent you with the systray patch a 
 while ago). It is to be installed in /usr/X11R6/bin (or you have to 
 modify the script)
 
 Jehan
 
 
  
 ATTACHMENT part 2 image/x-icon name=X.ico
 
  
  Jehan,
  
  If you search the archives, others have already made icons ready for
 you
  use :).  Meanwhile, I've been thinking about this and looking at the
  setup.exe code.  If no-one minds, I'm going to generate and submit a
 patch
  that has setup.exe do all the shortcut stuff.  Though your bat file is
  still useful.  I wonder why not just can all the dos stuff by having
 the
  batch file call bash which then calls startxwin.sh?  One file is
 *much*
  easier to maintain then two.  Anywho, let me know your thoughts on
 this..
  
  Cheers,
  Nicholas
  
  P.S. - Robert that goes for you too...

Chuck,

For crying out loud, 95% of the installers out there create shortcuts for
the user in the startmenu and on the desktop.  Why is this such a bad
thing for setup.exe to do?  What does external data have to do with the
price of potatos?  Seriously, I'm proposing a simple solution which is
the norm for most installers.  Where have I gone astray?

Cheers,
Nicholas


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan Bing

Nicholas Wourms wrote:

Excuse me?  All I was suggesting is to reword the final setup screen to
something like the following:

-Create Icon on Desktop for Cygwin Command Prompt
-Create Icon on Desktop for Cygwin/XFree86
-Add Icon to Start Menu for Cygwin Command Prompt
-Add Icon to Start Menu for Cygwin/XFree86

Then have setup create the shortcuts in the same fasion it does already. 
Eventually, I'd like to have it gray-out the check boxes for
Cygwin/XFree86 if it is not already installed.  How is this not data
driven?  Isn't this what the setup program is for?  The last time I
checked, most Windows installers handled the shortcut creation.


Robert is right Nicholas (oh no not this guy again! :p). The question is 
why add XFree to the list and not SSH and RSH, and Lynx, and, and, and
And since we can create the shortcuts via the postinstall script, why do 
you want to add this feature to setup.exe?
The script is not very cool looking, I give you that, but it's far more 
flexible.

Jehan





Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Nicholas Wourms wrote:
 --- Jehan [EMAIL PROTECTED] wrote:
 
 If you search the archives, others have already made icons ready for you
 use :).  

Well, I had this one for quite a while already.

 I wonder why not just can all the dos stuff by having the
 batch file call bash which then calls startxwin.sh?  One file is *much*
 easier to maintain then two.  Anywho, let me know your thoughts on this..

That would be nice I agree. But for what I see on this mailing list, 
lots of people have problems with startxwin.sh (.xinitrc and .Xautorithy 
stuff) while very few people complain about startxwin.bat. So until we 
can have startxwin.sh to work as is for most people, I think it's better 
to stick with the batch file for now.

Jehan






RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Nicholas Wourms
 Sent: Sunday, 14 July 2002 10:29 AM
 Chuck,
 
 For crying out loud, 95% of the installers out there create 
 shortcuts for
 the user in the startmenu and on the desktop.  Why is this such a bad
 thing for setup.exe to do?  What does external data have to 
 do with the
 price of potatos?  Seriously, I'm proposing a simple 
 solution which is
 the norm for most installers.  Where have I gone astray?

Because simple solutions often increase coupling, wheres a more thought
out solution decreases coupling.

Also, I know you are subscribed to cygwin-apps, and I just posted there
just a couple of days ago about wanting to remove the hardcoded stuff
from setup.exe.

Rob




RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: Nicholas Wourms [mailto:[EMAIL PROTECTED]] 
 Sent: Sunday, 14 July 2002 10:57 AM
 To: Jehan Bing
...
 No he isn't.  There are two ways that someone will interface 
 with Cygwin,
 via Console or via X11.  The other apps you mention are Console apps,
 therefore you can't expect them to have shortcuts.  However X 
 is much more
 than an Application, it is an interface.  Therefore, one can 
 argue that it
 deserves setup.exe making it a shortcut just as much as 
 setup.exe making
 the console a shortcut.  Lastly, something you will not disagree with,
 ALOT of people want to use just X and not the console, especially for
 doing XDMCP.  This is even more reason why setup.exe should make the
 shortcut.

The above is an argument for the creation of the shortcut, not for
setup.exe creating it.

Rob




Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms


--- Jehan [EMAIL PROTECTED] wrote:
 Nicholas Wourms wrote:
  --- Jehan [EMAIL PROTECTED] wrote:
  
  If you search the archives, others have already made icons ready for
 you
  use :).  
 
 Well, I had this one for quite a while already.
 
  I wonder why not just can all the dos stuff by having the
  batch file call bash which then calls startxwin.sh?  One file is
 *much*
  easier to maintain then two.  Anywho, let me know your thoughts on
 this..
 
 That would be nice I agree. But for what I see on this mailing list, 
 lots of people have problems with startxwin.sh (.xinitrc and .Xautorithy
 
 stuff) while very few people complain about startxwin.bat. So until we 
 can have startxwin.sh to work as is for most people, I think it's better
 
 to stick with the batch file for now.
 

You are mistaking startx for startxwin.sh.  startxwin.sh is basically
the same thing as startxwin.bat, but without all the nasty path
conversions and soforth.  Look again, it has nothing to do with .xinitrc
and .Xauthority.

Cheers,
Nicholas

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms


--- Robert Collins [EMAIL PROTECTED] wrote:
 
 
  -Original Message-
  From: Nicholas Wourms [mailto:[EMAIL PROTECTED]] 
  Sent: Sunday, 14 July 2002 10:24 AM
 
   I mind. Setup should become -more- data driven not less. 
   
  
  Excuse me?  All I was suggesting is to reword the final setup 
  screen to
  something like the following:
  
  -Create Icon on Desktop for Cygwin Command Prompt
  -Create Icon on Desktop for Cygwin/XFree86
  -Add Icon to Start Menu for Cygwin Command Prompt
  -Add Icon to Start Menu for Cygwin/XFree86
  
  Then have setup create the shortcuts in the same fasion it 
  does already. 
  Eventually, I'd like to have it gray-out the check boxes for
  Cygwin/XFree86 if it is not already installed.  How is this not data
  driven?  Isn't this what the setup program is for?  The last time I
  checked, most Windows installers handled the shortcut creation.
 
 If you need to recompile setup.exe to change it's behaviour, it is not
 data driven. Most windows installers are driven by an data that drives
 the dialogs. 
 
 The 'right' way to do it, is something like the menu's that dpkg uses,
 they are pure data, and can be interpreted and shown as gui interfaces,
 or as text menus, or set via the command line.
 
 So, here are some options:
 1) Implement an interpreter for dpkg's configure menus in setup.
 2) Create something new along similar lines.
 3) Use a slang interface or something like that in the postinstall
 script (*).
 

Robert,

I'll have none of this debian talk.  You know full well that I am working
very hard to get rpm-4.1 ready for inclusion into the distribution.  At
that point, Chuck and I will start figuring out ways to interface it with
setup.  Also, we will be figuring out how to best transition setup to use
rpms.  The point of this is that all this talk is a long way off.  I'm not
going to invent a new interface when others already exist.  The fact of
the matter is, that for right now, setup is well suited to perform the
task at hand, which is to support all of the future X users.  Like it or
not, there is enough of them to warrant a separate mailing list.  Lets
temporarily let setup do this now and then we'll replace it when something
better comes along.

Cheers,
Nicholas

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



RE: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Robert Collins



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Nicholas Wourms
 Sent: Sunday, 14 July 2002 11:09 AM
 Robert,
 
 I'll have none of this debian talk.  You know full well that 
 I am working
 very hard to get rpm-4.1 ready for inclusion into the 
 distribution.  At
 that point, Chuck and I will start figuring out ways to 
 interface it with
 setup.  Also, we will be figuring out how to best transition 
 setup to use
 rpms.  The point of this is that all this talk is a long way 
 off.  I'm not
 going to invent a new interface when others already exist.  
 The fact of
 the matter is, that for right now, setup is well suited to perform the
 task at hand, which is to support all of the future X users.  
 Like it or
 not, there is enough of them to warrant a separate mailing list.  Lets
 temporarily let setup do this now and then we'll replace it 
 when something
 better comes along.

Nicholas, no consensus has been reached for using the rpm database as
the backend. If rpm has a similar system to the one I referenced,
substitute rpm for dpkg in my previous comments. I *did not* suggest
that we use dpkg as a backend for this particular thing either - I
pointed out the best practice pattern to address the issue we are
facing. Lets stick to that topic, shall we?

For now, try listening, not taking the conversation off on tangents. I
happen to have put quite a bit of effort into the Cygwin Xfree86 project
in the past, and continue to make various contributions as and when it's
appropriate. I strongly resent your implying that I might dislike the
presence of the cygwin-xfree86 community - which I am a member of!

The simple fact is, I disagree with your proposal, and you have made no
convincing arguments to change my mind. What you are suggesting is not
what 'most' windows installers do, it is not flexible, it is a step
backwards in approach, and a proper solution is not that hard to do!

Rob





Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Nicholas Wourms wrote:
 --- Jehan [EMAIL PROTECTED] wrote:
 
Nicholas Wourms wrote:

--- Jehan [EMAIL PROTECTED] wrote:

If you search the archives, others have already made icons ready for

you

use :).  

Well, I had this one for quite a while already.


I wonder why not just can all the dos stuff by having the
batch file call bash which then calls startxwin.sh?  One file is

*much*

easier to maintain then two.  Anywho, let me know your thoughts on

this..

That would be nice I agree. But for what I see on this mailing list, 
lots of people have problems with startxwin.sh (.xinitrc and .Xautorithy

stuff) while very few people complain about startxwin.bat. So until we 
can have startxwin.sh to work as is for most people, I think it's better

to stick with the batch file for now.

 
 
 You are mistaking startx for startxwin.sh.  startxwin.sh is basically
 the same thing as startxwin.bat, but without all the nasty path
 conversions and soforth.  Look again, it has nothing to do with .xinitrc
 and .Xauthority.

One would think so but no. I have an old .Xauthority from a linux 
account. If I use this one and run X with startxwin.sh, I get a bunch of

Xlib: connection to :0.0 refused by server
Xlib: No protocol specified
xsetroot:  unable to open display ':0.0'

for each application I try to run.
If I use an empty .Xauthority, then everything works fine. Well, not 
everything actually but at least I have xterm starting. I don't know 
what differs between the shell and the batch version of startxwin, but 
there is definitely something.

Jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Nicholas Wourms wrote:
 Because scripts are unreliable.  Because users are stupid.  Because people
 like to have a GUI checkbox over a text console prompting them for input. 
 You are admirable for defending your script, but the fact of the matter is
 that people prefer the graphical setup.  Why?  Well look at the the
 various linuxes out there, they are, for the most part, migrating to a
 graphical install.  They don't rely on crummy shell scripts any more.  

Hmm, I'm not sure about that. A lot of application uses GUI as a front 
end to script and command line tools.

I
 think you are missing the original point, Slashdot did an article on
 Cygwin/XFree86, not Cygwin/OpenSSH, not Cygwin/RXVT.  The point is that X
 is a special interface that deserves a special shortcut that is made by
 setup.exe.  

So before Slashdot, XWin didn't deserve the shortcut? And for what I saw 
in the cygwin mailing list, some people want rxvt to be the default. 
Currently, I have two shortcuts, one for rxvt and one for bash. If the 
xlauncher comes, we will want a shortcut for it because people won't 
have to configure X by hand, they will have a GUI.


 Until we have a data-driven database system which can interact
 with setup.exe and respond to user input, this is probably the best bet. 

I fear I disagree. We have a way to creat shortcuts already. It's not 
pretty but it works. This way is also flexible because it doesn't 
prevent other applications to do the same.
So instead of creating another way (even if it's simple) to create 
shortcuts, that isn't even flexible, I would say the best bet is to 
focus on a data-driven GUI.


 But realize that I'm not trying to tell people what to do, I'm just
 strongly voicing my opinion.

Good because you can't! Sorry! *grin*.

Jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Nicholas Wourms


--- Jehan [EMAIL PROTECTED] wrote:
 Nicholas Wourms wrote:
  --- Jehan [EMAIL PROTECTED] wrote:
  
 Nicholas Wourms wrote:
 
 --- Jehan [EMAIL PROTECTED] wrote:
 
 If you search the archives, others have already made icons ready for
 
 you
 
 use :).  
 
 Well, I had this one for quite a while already.
 
 
 I wonder why not just can all the dos stuff by having the
 batch file call bash which then calls startxwin.sh?  One file is
 
 *much*
 
 easier to maintain then two.  Anywho, let me know your thoughts on
 
 this..
 
 That would be nice I agree. But for what I see on this mailing list, 
 lots of people have problems with startxwin.sh (.xinitrc and
 .Xautorithy
 
 stuff) while very few people complain about startxwin.bat. So until we
 
 can have startxwin.sh to work as is for most people, I think it's
 better
 
 to stick with the batch file for now.
 
  
  
  You are mistaking startx for startxwin.sh.  startxwin.sh is
 basically
  the same thing as startxwin.bat, but without all the nasty path
  conversions and soforth.  Look again, it has nothing to do with
 .xinitrc
  and .Xauthority.
 
 One would think so but no. I have an old .Xauthority from a linux 
 account. If I use this one and run X with startxwin.sh, I get a bunch of
 
 Xlib: connection to :0.0 refused by server
 Xlib: No protocol specified
 xsetroot:  unable to open display ':0.0'
 
 for each application I try to run.
 If I use an empty .Xauthority, then everything works fine. Well, not 
 everything actually but at least I have xterm starting. I don't know 
 what differs between the shell and the batch version of startxwin, but 
 there is definitely something.
 
   Jehan

Well this is obviously a bug in X and needs to be fixed.  I dunno, maybe
I'm wrong, but it just seems a bit silly to have two identical scripts for
two different situations.  I'm of the camp that loves reusable code...

Cheers,
Nicholas

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com



Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Jehan

Nicholas Wourms wrote:
 --- Robert Collins [EMAIL PROTECTED] wrote:
 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]] On Behalf Of Nicholas Wourms
Sent: Sunday, 14 July 2002 11:09 AM
Robert,

I'll have none of this debian talk.  You know full well that 
I am working
very hard to get rpm-4.1 ready for inclusion into the 
distribution.  At
that point, Chuck and I will start figuring out ways to 
interface it with
setup.  Also, we will be figuring out how to best transition 
setup to use
rpms.  The point of this is that all this talk is a long way 
off.  I'm not
going to invent a new interface when others already exist.  
The fact of
the matter is, that for right now, setup is well suited to perform the
task at hand, which is to support all of the future X users.  
Like it or
not, there is enough of them to warrant a separate mailing list.  Lets
temporarily let setup do this now and then we'll replace it 
when something
better comes along.

Nicholas, no consensus has been reached for using the rpm database as
the backend. If rpm has a similar system to the one I referenced,
substitute rpm for dpkg in my previous comments. I *did not* suggest
that we use dpkg as a backend for this particular thing either - I
pointed out the best practice pattern to address the issue we are
facing. Lets stick to that topic, shall we?
 
 
 Hey, you were the one who brought up debian...
 
 
For now, try listening, not taking the conversation off on tangents. I
happen to have put quite a bit of effort into the Cygwin Xfree86 project
in the past, and continue to make various contributions as and when it's
appropriate. I strongly resent your implying that I might dislike the
presence of the cygwin-xfree86 community - which I am a member of!
 
 
 I am listening...  I don't know where you got this one from, but I respect
 your membership in the Cygwin/XFree86 community.
 
 
The simple fact is, I disagree with your proposal, and you have made no
convincing arguments to change my mind. What you are suggesting is not
what 'most' windows installers do, it is not flexible, it is a step
backwards in approach, and a proper solution is not that hard to do!

 
 What you are suggesting is akin to Windows installers run batch files in
 the background?  I don't think so, so why should we run shell scripts?  

Several points here:
1- You have one setup.exe per application in the Windows world. Cygwin 
is actually several applications, all using the same setup.exe.
2- A couple years ago, I used Installshield. For what I remember, *there 
is* a script. For standard stuff (like destination directory and the 
like), this is just field to enter. For more complicated stuff (adding 
key to the registry for instance), you can write a script. With 
setup.exe, we have a same thing. The standard stuff are descriptions, 
dependencies, version,... and non standard are through scripts. 
Shortcuts isn't used enough to add a field in setup.ini but could be 
used to often enough to just hardcode it in the binary.


 Fine, how's this, I'll rip out
 the specific references to cygwin.bat and instead have setup parse the ini
 for what it should display in that last window and how many it should
 display.  

That's a better solution that I could settle for even if I think that 
too few application would use it to be worthwhile.

jehan






Re: Bug in startxwin.bat after installing with setup.exe in win98SE

2002-07-13 Thread Christopher Faylor

On Sun, Jul 14, 2002 at 07:44:51AM +1000, Robert Collins wrote:
As for linefeed issues, AFAIK windows will process bat files with unix
format, but you could always use d2u in your script.

I don't think Windows 9x systems will understand bat files with unix
line endings.

cgf
(boy what a strange thread this has been)