delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/05/13:50:26

X-Recipient: archive-cygwin AT delorie DOT 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 AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT 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 AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1209462188.20180405203904@yandex.ru>
To: Peter Bauer <peter DOT m DOT bauer AT gmail DOT com>, cygwin AT cygwin DOT 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 AT gmail DOT com>
MIME-Version: 1.0
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019