This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UNC paths are not supported. Defaulting to Windows directory.

Adrian C. Brown wrote:

>Why would I get this error when trying to start cygwin from the
>shortcut placed on the desktop?
>CMD.EXE was started with '\\coruscant\users\adrianb\Desktop' as the
>current dire ctory path.  UNC paths are not supported.  Defaulting to
>Windows directory.

NT-Shells only except working directories that are on a mapped directory

>I am using Windows 2000 professional in a Windows 2000 domain with
>folder redirection.
>What can I do to solve this?

Here's my solution:

----------------------- bash.bat -----------------------------

@echo off
rem  Bash.Bat
rem  Add this registry entry to get a bash menu item in
rem  in your context menu (right mouse button) in the
rem  windows explorer.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Bash\command\Bash.Bat "%L"

if %1%xxx == xxx goto usage

set CYGWIN=tty
set _NT_SHELL_DIR=%1
set _BASH_ARGS=%1 %2 %3 %4 %5 %6 %7 %8

bash.exe --norc -noprofile --login ~/.dosLogin
goto ende

echo "usage: Bash.bat working_directory [bash args]"


-------------------------------- .dosLogin -------------------------

_BASH_SHELL_DIR=$(cygpath -u "$_NT_SHELL_DIR")
exec bash --norc -noprofile -c \
"cd $_BASH_SHELL_DIR 2>/dev/null; \
if [ $? = 0 ] ; then exec bash $_BASH_ARGS; fi"

----------------------------- end ------------------------------------

Now put Bash.Bat on your PATH and .dosLogin in you HOME directory. You may
now use a UNC working directory to start bash from the explorer context menu
(right mouse button) or via redirection. You still get an error message from
windows, that UNC Paths are unsupported. Bash will, however, have the UNC
directory as the working directory.

Hope this helps.

- Troy Holly 

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]