zsh-users
 help / color / mirror / code / Atom feed
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-12 20:54 Amol Deshpande
  0 siblings, 0 replies; 12+ messages in thread
From: Amol Deshpande @ 1999-02-12 20:54 UTC (permalink / raw)
  To: Larry P . Schrof, Trinh, Timothy, 'Bart Schaefer'
  Cc: 'zsh-users@math.gatech.edu'

on nt 4.0 zsh will actually look for a $USERPROFILE directory. it  may be
that
variable is not being set automatically. I don't quite know why that would
be.

If someone who has had to explicitly HOME (via the environment settings or
usrmgr)
would send me a dump of their environment from a cmd.exe prompt, I'll
try to figure out what's going on.

of course, please make sure that $ZSH_VERSION is 3.0.5-nt-beta-0.50 (or
greater).
If  the version does not contain the "nt-beta.." part, then you are probably
using 
a cygwin or u/win or interix zsh, not mine.


thanks,
-amol

> ----------
> From: 	Bart Schaefer[SMTP:schaefer@brasslantern.com]
> Sent: 	Friday, February 12, 1999 9:01 AM
> To: 	Larry P . Schrof; Trinh, Timothy
> Cc: 	'zsh-users@math.gatech.edu'
> Subject: 	Re: Problem running zsh on WinNT 4.0
> 
> On Feb 12,  9:49am, Larry P . Schrof wrote:
> } Subject: Re: Problem running zsh on WinNT 4.0
> }
> } I believe that should be called .zprofile instead of profile.zsh if you
> } want it automatically read at zsh startup. 
> 
> This part is correct.
> 
> } If the RCS option is unset, however, somewhere in /etc/zshenv, then the
> } file WON'T be read, even if it is named correctly. (I'll be honest,
> } I haven't looked at zsh on NT - functionality could be different
> } as far as what startup files are read.)
> 
> Assuming you're using Amol Deshpande's zsh port, it will indeed read the
> files \etc\zshenv, \etc\zshrc, etc. if you create a \etc directory on your
> default drive (e.g. C:\etc).
> 
> It also reads $HOME\.zshenv, $HOME\.zshrc, etc., where HOME has to be set
> in the environment by using the NT user account manager (use the option to
> assign the user a home directory, don't just add HOME to the environment).
> 
> -- 
> Bart Schaefer                                 Brass Lantern Enterprises
> http://www.well.com/user/barts              http://www.brasslantern.com
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-20  0:40 Trinh, Timothy
  0 siblings, 0 replies; 12+ messages in thread
From: Trinh, Timothy @ 1999-02-20  0:40 UTC (permalink / raw)
  To: 'Bart Schaefer'; +Cc: 'zsh-users@math.gatech.edu '

Hello All,

Once again I appreciated all the help that I have been given.  It was
definitely a typo problem when I place the
#!c:/bin/zsh/zsh.exe in my shell scripts.  After correcting the typo, the
shell script ran beautifully.

Thanks again to all who have taken the time to answer my questions,
Timothy


	----------
	From:  Bart Schaefer[SMTP:schaefer@brasslantern.com]
	Sent:  Friday, February 12, 1999 11:25 PM
	To:  Trinh, Timothy; 'zsh-users@math.gatech.edu '
	Subject:  Re: Problem running zsh on WinNT 4.0

	On Feb 12,  4:49pm, Trinh, Timothy wrote:
	} Subject: RE: Problem running zsh on WinNT 4.0
	}
	} Hello ALL,
	} 
	} I am not able to run shell script
	} like I do on Unix.  When I do an ls -l on the shell script, 
	} do not see any x permissions on the shell script.

	There's not really any such thing as "x permission" in NT.  Anything
with
	the right file extension (.exe, .bat, ...) has "execute permission."
I
	don't recall exactly how zsh's internal tests for executable-ness
are
	resolved in Amol's port.

	} Is there a particular way of executing the shell script via the
zsh
	} program on WinNT4.0?

	I don't believe so.

	} Do I need to name the shell script in a
	} certain way in order for it to execute?

	Zsh first attempts to let the system run the named file, and then
when
	(if) that fails it looks at it for a #! line.  So ...

	If you give the script a .exe extension, NT will try to run it as a
	binary, I think.  Not good.

	If you give it a .bat extension, it'll try to run it as a batch
file.
	That's probably even worse, as bits of the script might actually
look
	sensible enough to the batch processor to cause something to happen.

	} I have tried including the
	} following line at the beginning of the shell script:
	} 
	} #!c:/bin/zsh/zhs.exe 
	                ^^
	Did you spell "zsh.exe" correctly in the shell script?

	Otherwise I'm without clue.

	-- 
	Bart Schaefer                                 Brass Lantern
Enterprises
	http://www.well.com/user/barts
http://www.brasslantern.com
	


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-16  0:40 Amol Deshpande
  0 siblings, 0 replies; 12+ messages in thread
From: Amol Deshpande @ 1999-02-16  0:40 UTC (permalink / raw)
  To: Trinh, Timothy, 'Chavdar Ivanov'
  Cc: 'zsh-users@math.gatech.edu'

as long as the #! path at the top of the script is correct, there is no need
to create associations to run the script from within zsh/tcsh. Both these
shells do "hashbang emulation" where they will find the program to
be executed and feed it the script.



> ----------
> From: 	Chavdar Ivanov[SMTP:ci@delcam.com]
> Sent: 	Monday, February 15, 1999 5:37 AM
> To: 	Trinh, Timothy
> Cc: 	'zsh-users@math.gatech.edu'
> Subject: 	RE: Problem running zsh on WinNT 4.0
> 
> On Friday Trinh, Timothy gave us enlightenment about RE: Problem
> running...:
> 
> > Hello ALL,
> > 
> > I really appreciated all the suggestion I have received regarding
> setting up
> > the zsh program set up on WinNT40.
> > I am able to start up the zsh program and have it automatically source
> my
> > startup files.  Even though my zsh program 
> > is starting up properly on my WinNT4.0, I am not able to run shell
> script
> > like I do on Unix.  When I do an ls -l on the shell script, 
> > do not see any x permissions on the shell script.  When I chmod a+x
> <shell
> > script name>, I still do not see the x permissions on the 
> > shell script.  Is there a particular way of executing the shell script
> via
> > the zsh program on WinNT4.0?  Do I need to name the shell script in a
> > certain way in order for it to execute?  I have tried including the
> > following line at the beginning of the shell script:
> > 
> > #!c:/bin/zsh/zhs.exe 
> > 
> > Executing the shell script with the above line in it, I get the
> following
> > error: zsh: exec format error: <shell script name>.
> > 
> > Any suggestions and comments are greatly appreciated.
> > 
> > Thanks,
> > Timothy
> > 
> > PS:  Larry S.: Are there any other arguments I should be aware of in
> running
> > the zsh program?
> > 
> > 	----------
> > 
> 
> Use Explorer to associate files with extension, i.e., .zsh, with the zsh.
> I have two actions associated with it - Edit and Run; Edit invokes pfe32
> on the script, Run just runs it ( you point to your current zsh.exe
> location for this to work ). 
> 
> From CMD you can run zsh scripts by specifying the extension:
> 
> C:\ >  script.zsh
> 
> The trouble now is you apparently can not pass any parameters to the
> script, therefore you might resolve to using 'read' for them in the script
> itself.  Any ideas here?
> 
> 
> ----------------------------------------------------------------
> Chavdar Ivanov           | Talbot Way, Small Heath Business Park
> Delcam UK Limited        | Birmingham B10 0HJ, United Kingdom
> Customer Support Dept.   | (+44)121-6831014
> ----------------------------------------------------------------
> Keep Canada beautiful. Swallow your beer cans.      
> ----------------------------------------------------------------
> Monday, February 15, 1999
> 
> 


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-13  0:49 Trinh, Timothy
  1999-02-13  7:24 ` Bart Schaefer
  1999-02-15 13:37 ` Chavdar Ivanov
  0 siblings, 2 replies; 12+ messages in thread
From: Trinh, Timothy @ 1999-02-13  0:49 UTC (permalink / raw)
  To: 'zsh-users@math.gatech.edu'

Hello ALL,

I really appreciated all the suggestion I have received regarding setting up
the zsh program set up on WinNT40.
I am able to start up the zsh program and have it automatically source my
startup files.  Even though my zsh program 
is starting up properly on my WinNT4.0, I am not able to run shell script
like I do on Unix.  When I do an ls -l on the shell script, 
do not see any x permissions on the shell script.  When I chmod a+x <shell
script name>, I still do not see the x permissions on the 
shell script.  Is there a particular way of executing the shell script via
the zsh program on WinNT4.0?  Do I need to name the shell script in a
certain way in order for it to execute?  I have tried including the
following line at the beginning of the shell script:

#!c:/bin/zsh/zhs.exe 

Executing the shell script with the above line in it, I get the following
error: zsh: exec format error: <shell script name>.

Any suggestions and comments are greatly appreciated.

Thanks,
Timothy

PS:  Larry S.: Are there any other arguments I should be aware of in running
the zsh program?

	----------


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-12 20:53 Trinh, Timothy
  0 siblings, 0 replies; 12+ messages in thread
From: Trinh, Timothy @ 1999-02-12 20:53 UTC (permalink / raw)
  To: 'Larry P . Schrof'
  Cc: 'jr@scms.rgu.ac.uk', 'zsh-users@math.gatech.edu',
	'Bart Schaefer'

Thanks again that did the trick.  

As for my other problem, I looked at the .zshrc for a while and noticed that
there is a command called setopt.  So, I put the following
line in my .zshrc file:

setopt winntconvertbackslash

This did not solve the problem of the back slashes in window's environment
variable.

Instead of using the $HOMEDRIVE$HOMEPATH, I just specify as the path
explicitly.  So now, I just have the following line in my
.zprofile:

export MY_OUTPUT_DIR=e:/jobs/$USERNAME  (since $USERNAME contains on
backslashes, I avoid the problem entirely)

It would be nice to have this resolve in case I have to actually use the
window's environment variable which contains backslashes.

Thanks again for all your help,
Timothy

	----------
	From:  Larry P . Schrof[SMTP:schrof@cig.mot.com]
	Sent:  Friday, February 12, 1999 11:40 AM
	To:  Trinh, Timothy
	Cc:  'jr@scms.rgu.ac.uk'; 'zsh-users@math.gatech.edu'; 'Bart
Schaefer'; Larry P . Schrof
	Subject:  Re: Problem running zsh on WinNT 4.0

	On Fri, Feb 12, 1999 at 11:23:54AM -0800, Trinh, Timothy wrote:

	> When I set my window's HOME environment variable to
%HOMEDRIVE%HOMEPATH,
	> this allowed the zsh program to 
	> automatically source in my .zshrc (located in HOME), but not my
profile
	> file(also located in HOME).  I tried renaming the profile file to
.zprofile,
	> .profile, and profile.zsh, but it still did not source in my
profile file.

	In order for the .zprofile to be read, it hss to be a login shell.
	Try invoking zsh with a -l argument and see if that helps.

	- Larry
	


^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Problem running zsh on WinNT 4.0
@ 1999-02-12 19:23 Trinh, Timothy
  1999-02-12 19:40 ` Larry P . Schrof
  0 siblings, 1 reply; 12+ messages in thread
From: Trinh, Timothy @ 1999-02-12 19:23 UTC (permalink / raw)
  To: 'jr@scms.rgu.ac.uk'
  Cc: 'zsh-users@math.gatech.edu', 'Bart Schaefer',
	Larry P . Schrof

When I set my window's HOME environment variable to %HOMEDRIVE%HOMEPATH,
this allowed the zsh program to 
automatically source in my .zshrc (located in HOME), but not my profile
file(also located in HOME).  I tried renaming the profile file to .zprofile,
.profile, and profile.zsh, but it still did not source in my profile file.
As a workaround, I placed the following line in my .zshrc file to source in 
the profile file:

source $HOMEDRIVE$HOMEPATH/<profile file name>

If there is a better way of than what I have done, let me know.

One other thing, whenever I export a variable to a path which contain the
windows environment variable that contain backslashes, 
this messes up the variable.  Here is an example of what I mean:

export MY_OUTPUT_DIR="$HOMEDRIVE$HOMEPATH/output"  (I have something like
this in my profile file)

The window's environment variable $HOMEDRIVE returns e: and $HOMEPATH
returns \job\timothy
When you echo MY_OUTPUT_DIR, you get a broken path of some sort.  The broken
path is probably caused by the backslashes.  
If you cd MY_OUTPUT_DIR, you get a error message which states:  "cd: no such
file or directory: e:\job\timothy/output"
What do I need to do to have the zsh program interpret those backslashes as
forward slashes?  

I have read the readme file that comes along with the zsh application
regarding the problem above and this is what it says:

NT-specific setopts:
------------------
* winntignorecase: ignore case in completions
* winntlamepathfix: convert the PATH environment variable back to 
   '\'-delimited instead of  '/'-delimited when each child process is
forked.

* winntnoassociations: Do not try applications associated with extensions
                   if exec() fails.

* winntconvertbackslash: Convert backslashes to '/' when comparing named
        directories etc. May be useful if you derive HOME from '\'-delimited

        environment variables

It was nice to know this stuff, but it does not say anything about how to
implement it.
I am not sure what NT-specific setopts are and what and where I can deal
with them.

Any help is greatly appreciated and thanks for all the help you have given
me thus far.

Thanks again,
Timothy


	----------
	From:  jr@scms.rgu.ac.uk[SMTP:jr@scms.rgu.ac.uk]
	Sent:  Friday, February 12, 1999 1:03 AM
	To:  timothy.trinh@mccaw.com
	Subject:  Re: Problem running zsh on WinNT 4.0

	>I have just recently installed the zsh program on my WinNT 4.0.  It
runs
	>just fine, but each time it starts up, it does not source my
profile file.
	>I always have to source in the my profile manaually(.
./profile.zsh).  Is
	>there some way were I have my profile sourced in when I start the
program?

	I believe you have to have HOME set before zsh can find your
.profile file.  
	Check the FAQ, there should be some info there.

	-- 
	John Riddoch	Email: jr@scms.rgu.ac.uk	Telephone:
(01224)262730
	Room C4, School of Computer and Mathematical Science
	Robert Gordon University, Aberdeen, AB25 1HG
	I am Homer of Borg. Resistance is Fu... Ooooh! Donuts!
	


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Problem running zsh on WinNT 4.0
@ 1999-02-12  1:55 Trinh, Timothy
  1999-02-12 15:49 ` Larry P . Schrof
  0 siblings, 1 reply; 12+ messages in thread
From: Trinh, Timothy @ 1999-02-12  1:55 UTC (permalink / raw)
  To: 'zsh-users@math.gatech.edu'

Hello all,

I have just recently installed the zsh program on my WinNT 4.0.  It runs
just fine, but each time it starts up, it does not source my profile file.
I always have to source in the my profile manaually(. ./profile.zsh).  Is
there some way were I have my profile sourced in when I start the program?

Any comments or ideas regarding this delimma is greatly appreciated.

Thanks,
Timothy


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~1999-02-20 14:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-12 20:54 Problem running zsh on WinNT 4.0 Amol Deshpande
  -- strict thread matches above, loose matches on Subject: below --
1999-02-20  0:40 Trinh, Timothy
1999-02-16  0:40 Amol Deshpande
1999-02-13  0:49 Trinh, Timothy
1999-02-13  7:24 ` Bart Schaefer
1999-02-15 13:37 ` Chavdar Ivanov
1999-02-12 20:53 Trinh, Timothy
1999-02-12 19:23 Trinh, Timothy
1999-02-12 19:40 ` Larry P . Schrof
1999-02-12  1:55 Trinh, Timothy
1999-02-12 15:49 ` Larry P . Schrof
1999-02-12 17:01   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).