X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; q=dns; s=default; b=WMy80qhY+/Hkh1Jn
	8MH5K2QANWBIONopOwdeI3j6ouhfp/3CJF3XDOregG/Hpo0dp5x1XnesYhYmg6xm
	vsD9nlB/J4fei5BAoHW5TU6M5u/VH7eXu/4ierecJFeywRU3GrVkIALzsib/xV8H
	zr7X68mFjWbiQC9dnix1V6HinMw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:date:from:reply-to:message-id:to:subject
	:in-reply-to:references:mime-version:content-type
	:content-transfer-encoding; s=default; bh=IVOKqrUOaYAMacKRJZEgV9
	ncroA=; b=Vz0/3U7d/9CxchajZnONt0o7rn0qrdTu1t376sTcAOtnt0j1ZkzBsD
	wtltuQ4TmuwvhBhN7O0kAdPdBGr579Xekd+ClsBJHdw1f0i/tfb/rnT3TlL/hhfN
	jRoZzia/39ol2eiTh6a9dAr5ldlmfTKTSgSBiCw88VB85uD5ZHn5o=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
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
Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Thu, 5 Apr 2018 20:39:04 +0300
From: Andrey Repin <anrdaemon@yandex.ru>
Reply-To: cygwin@cygwin.com
Message-ID: <1209462188.20180405203904@yandex.ru>
To: Peter Bauer <peter.m.bauer@gmail.com>, cygwin@cygwin.com
Subject: Re: How to handle length limit of PATH environment variable
In-Reply-To: <ebd804f3-8e24-d96f-7ef4-0e1279afd929@gmail.com>
References: <ebd804f3-8e24-d96f-7ef4-0e1279afd929@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

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

