X-Spam-Check-By: sourceware.org Date: Tue, 22 Aug 2006 20:16:47 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: Richard Foulk cc: cygwin AT cygwin DOT com Subject: Re: running cygwin from file server In-Reply-To: <200608222349.k7MNnhhF002712@sd.skydive1.com> Message-ID: References: <200608222349 DOT k7MNnhhF002712 AT sd DOT skydive1 DOT com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Tue, 22 Aug 2006, Richard Foulk wrote: > Aloha, > > I've installed Cygwin on a file server common to a large number of > clients. This allows various tools and scripts to be run on any > of the clients without cluttering them with their own installations. > > Occasionally it would be nice to obtain a quick interactive shell > environment on one of the clients, including having /tmp, /etc and > others in place on the server partition. Preferrably without leaving > a lasting trace on the client. Perhaps by invoking a single batch file > from the server partition. > > Is there a quick, easy, or already done, way of doing this? Something like this is quick, dirty, and ought to do it: @echo off set SCRIPT_DIR=%~dp0 REM Set up mounts %SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%" / %SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%bin" /usr/bin %SCRIPT_DIR%bin\mount -u "%SCRIPT_DIR%lib" /usr/lib REM Start the Cygwin shell call %SCRIPT_DIR%cygwin.bat REM Clean up mounts %SCRIPT_DIR%bin\umount -uA (put it in your Cygwin root on the file server, won't work on Win9x/ME). Note that this will trash the user mounts in your existing Cygwin environment on the client (if there is one). Detecting existing Cygwin user mounts using the mount command is left as an exercise for the reader. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!) |,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte." "But no -- you are no fool; you call yourself a fool, there's proof enough in that!" -- Rostand, "Cyrano de Bergerac" -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/