From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9346 invoked by alias); 5 Apr 2018 17:50:15 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 9327 invoked by uid 89); 5 Apr 2018 17:50:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*F:D*yandex.ru, HX-Priority:Normal, associations, shop X-HELO: forward100o.mail.yandex.net Received: from forward100o.mail.yandex.net (HELO forward100o.mail.yandex.net) (37.140.190.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Apr 2018 17:50:12 +0000 Received: from mxback12j.mail.yandex.net (mxback12j.mail.yandex.net [IPv6:2a02:6b8:0:1619::87]) by forward100o.mail.yandex.net (Yandex) with ESMTP id A19142A22533; Thu, 5 Apr 2018 20:50:09 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback12j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7BOYwp0wtL-o9CKHses; Thu, 05 Apr 2018 20:50:09 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id swpEFKIsHY-o8imVaqv; Thu, 05 Apr 2018 20:50:08 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Thu, 05 Apr 2018 17:39:04 -0000 Date: Thu, 05 Apr 2018 17:50:00 -0000 From: Andrey Repin Reply-To: cygwin@cygwin.com Message-ID: <1209462188.20180405203904@yandex.ru> To: Peter Bauer , cygwin@cygwin.com Subject: Re: How to handle length limit of PATH environment variable In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00039.txt.bz2 Greetings, Peter Bauer! > hi, > i was bitten by the length limit of the PATH variable of 4095 characters > (see [1]) and could not find a way around it. This means i have a lot of > software packages in different directories and each of them adds itself > to the PATH so one can run the executables and have the shared libs > available. Under Windows there is the "short path workaround" but what > to do under Cygwin? > Creating links with shorter names to the directories is not feasible > since there may be different users and different directories per user. > Any ideas? 1. HKCR (document associations) Many applications do not realistically need to be in %PATH%, as they are only usually called through associations. You can register these associations and safely clean PATH of those offenders. 2. HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths Many applications are adding to %PATH% for just one binary, which could happily be registered there and no longer pollute global environment table. Please report such applications to their authors. Spare hammers for better reporting efficiency are available at your nearby carpenters' tool shop. P.S. As a joke of the topic, I've had GPAC register its directory in the PATH 3 times from a single installation. P.P.S. Partial solution could be a wrapper that reduce PATH length by dropping nonessential/duplicate/Win-specific paths before invoking Cygwin terminal. I have such a wrapper for my own reasons. -- With best regards, Andrey Repin Thursday, April 5, 2018 20:31:52 Sorry for my terrible english... -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple