From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24835 invoked by alias); 26 Feb 2004 17:38:51 -0000 Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com Reply-To: cygwin-xfree@cygwin.com Received: (qmail 24827 invoked from network); 26 Feb 2004 17:38:50 -0000 Received: from unknown (HELO slinky.cs.nyu.edu) (128.122.20.14) by sources.redhat.com with SMTP; 26 Feb 2004 17:38:50 -0000 Received: from slinky.cs.nyu.edu (localhost [127.0.0.1]) by slinky.cs.nyu.edu (8.12.10+Sun/8.12.10) with ESMTP id i1QHco1t007449 for ; Thu, 26 Feb 2004 12:38:50 -0500 (EST) Received: from localhost (pechtcha@localhost) by slinky.cs.nyu.edu (8.12.10+Sun/8.12.2/Submit) with ESMTP id i1QHcoYX007446 for ; Thu, 26 Feb 2004 12:38:50 -0500 (EST) X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Fri, 27 Feb 2004 08:41:00 -0000 From: Igor Pechtchanski Reply-To: cygwin-xfree@cygwin.com To: cygwin-xfree@cygwin.com Subject: Re: cygwin/xfree86/emacs problems after upgrading In-Reply-To: Message-ID: References: <40218BC0.3010100@msu.edu> <20040226164943.57EA.TAKUMA@dgp.ne.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 X-SW-Source: 2004-02/txt/msg00287.txt.bz2 List-Id: On Thu, 26 Feb 2004, Igor Pechtchanski wrote: > On Thu, 26 Feb 2004, Takuma Murakami wrote: > > > Igor, > > > > > Yes, it's a neat trick *if* the only thing people changed was the install > > > drive. If they change the path, all bets are off. I'm surprised you > > > don't actually customize startxwin.bat (and similar files, like > > > startxdmcp.bat) in a postinstall script (which can run under a Cygwin > > > shell, and thus know the root of the install). You could choose a > > > template value, e.g. "%$CYGWIN_ROOT$%", and replace that with "`cygpath -w > > > /`" using, say, sed. If you're interested, I could whip up an example > > > postinstall script for you in the next week or so. > > > > I'm interested in that trick out of curiosity. > > Could you show me your boilerplate? > > > > Takuma Murakami > > Well, something like the script below (untested) should do... This uses > '%$CYGWIN_ROOT$%' as the template string. > HTH, > Igor > > -------------- BEGIN /etc/postinstall/fix-startxwin.sh -------------- > #!/bin/sh > > fix_cygwin_root() { > TMPNAME="$1.$$" && \ > mv "$1" "$TMPNAME" && \ > sed 's/%\$CYGWIN_ROOT\$%/"'"`cygpath -w /`"'"/' "$TMPNAME" > "$1" && \ > rm "$TMPNAME" > } > > cd /usr/X11R6/bin && \ > for i in startxwin.bat startxdmcp.bat; do \ > fix_cygwin_root "$i" \ ^ s/ \\$/ ; \\/ > done > --------- Note: cutting here may damage your screen surface --------- I did say it was untested... Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha@cs.nyu.edu ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "I have since come to realize that being between your mentor and his route to the bathroom is a major career booster." -- Patrick Naughton