[Wine] Re: "cmd.exe /c echo '%ProgramFiles%' returned empty string

dE_logics wineforum-user at winehq.org
Sat Nov 12 06:46:00 CST 2011


Martin Gregorie wrote:
> On Thu, 2011-11-10 at 22:35 -0600, dimesio wrote:
> 
> > dE_logics wrote:
> > 
> > > Nothing will happen (and nothing happened), winetricks is only available in the current directory, so it says command not found.
> > > 
> > > 
> > 
> > How did you get winetricks? I've never used ./ in front of it, and it executes just fine for me.
> > 
> > 
> Some distros (the RedHat ones and probably others) don't include '.' or
> $HOME in $PATH by default. The first thing I do when I set up a new
> login users is to make sure '.', $HOME and $HOME/bin are added to $PATH,
> preferably at the right end. Its such an automatic action that its easy
> to forget you did it years ago.
> 
> To dE_logics:
> 
> It sounds like your $HOME directory isn't in your search path. Post the
> output from this:
> 
> <code>
> echo $PATH
> </code>
> 
> So we can see what your search path looks like.
> 
> 
> Martin


I've not seen any distro which sets '.' in it's PATH.

Also why will I need $HOME in $PATH?

PATH for user is - 
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.5.3:/usr/games/bin

Also '.' in $HOME doesn't make sense.


Martin Gregorie wrote:
> On Fri, 2011-11-11 at 07:33 -0600, Usurp wrote:
> 
> 
> > Having '.' and $HOME in $PATH can lead to subtle failures,
> > if you create a file that has the same name as an existing command.
> > 
> > Simple example: the updatedb command from mlocate
> > 
> > 
> That is why, if you're wise, you always run 'which' to check check
> whether the script/program name you just thought up is going to clash
> with anything else. Its also why I said "add them to the right hand
> end", as in:
> 
> export PATH="$PATH:$HOME/bin:."
> 
> $PATH is searched left to right, so doing it this way guarantees that
> pre-existing stuff takes precedence over anything you wrote without
> first checking for name clashes.
> 
> Martin


I didn't know that presidency part, thanks.







More information about the wine-users mailing list