GNU bug report logs - #55261
file:// links geneated by --hyperlink

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: coreutils; Reported by: Stephen Eglen <sje30@HIDDEN>; dated Wed, 4 May 2022 13:35:02 UTC; Maintainer for coreutils is bug-coreutils@HIDDEN.

Message received at 55261 <at> debbugs.gnu.org:


Received: (at 55261) by debbugs.gnu.org; 5 May 2022 13:13:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 05 09:13:40 2022
Received: from localhost ([127.0.0.1]:44798 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nmbIa-00069w-I1
	for submit <at> debbugs.gnu.org; Thu, 05 May 2022 09:13:40 -0400
Received: from mail-wr1-f47.google.com ([209.85.221.47]:46004)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pixelbeat@HIDDEN>) id 1nmbIY-00069f-Jl
 for 55261 <at> debbugs.gnu.org; Thu, 05 May 2022 09:13:39 -0400
Received: by mail-wr1-f47.google.com with SMTP id w4so6042725wrg.12
 for <55261 <at> debbugs.gnu.org>; Thu, 05 May 2022 06:13:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:message-id:date:mime-version:user-agent:subject
 :content-language:to:references:from:in-reply-to
 :content-transfer-encoding;
 bh=YzMe+l55VCAxZRv9Sw5zOo5fVZ4ni2OOolgIqU0PAjE=;
 b=kU+LhDHotAXOfrctpeIO0V4dpLcP9wtIsppx8CSGpnnVsqJvUtA34SJfEF35WiBkAO
 AsIy3mKd7XyLKf9jtZH2IpmN/RPjosjAMA9WMBkERBVTdix7kENySK5n0976wLee54II
 JAyZnLLylbZP/BHRtNe/9o6p9Isny9hUmchVe4+hv6y5Jy5IGHkuUkZ5BsDgQB25bZfU
 4D/K+ocjj5KUwODwVCCH9OeMoOz9TMBLlq5SOkvpRMdHTu4aRIC0hGrJwnwEJr9ZiaSv
 v83MqWWDZhOIAW01peKQ2jdhHqHp0n3G1CvGAszqu5Ml+KedCvS/jyHWVh+xjj46MgwD
 1/Tg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:sender:message-id:date:mime-version:user-agent
 :subject:content-language:to:references:from:in-reply-to
 :content-transfer-encoding;
 bh=YzMe+l55VCAxZRv9Sw5zOo5fVZ4ni2OOolgIqU0PAjE=;
 b=bI5ialH01xmepGBvhSHbu1e5knbaJ9KBmy7MK6urjNTWnvBu6N6M3qt7NtsF9q2ytx
 k9xQC13/VShX05/Y0j4WSCNvETJvzrlT6Vpfz7mAJFZFQ5j+4Dv8fpPZ/k+//JkZJhi/
 tF4+z8lWFp/FtFZ6oDLCz4um1LforNWhOi8xaBrMD57J71nyshYSNBvDShSnNQ89F9C9
 PCJVrcwRe4SxaIrsvEAO4gY0mWQky7bSH1RwkdfJ6okynkKQwFlL4SHxPvR7rfT5+n4y
 y8adfsjOnqwJOJ4cC8F/sZv+jL/mmUj8K+YAbDQY6HgVwW5ZSNSzbWF8qyKlSF1nZdgs
 gNoA==
X-Gm-Message-State: AOAM531mgmqFBsGBNdbNevjBPp4TykFzCSFJUtvzhNPngPgNeSeWga5R
 E4W3rj/aCv3axAuNXlkB6ho=
X-Google-Smtp-Source: ABdhPJyyGsP/j2cM/kMxs11GdDzk2RDd486dV6lr7Yd9JjHfmcbRcK335kh35PjMJMDl+HOeqGHm0Q==
X-Received: by 2002:a05:6000:1448:b0:20c:7be8:c2e with SMTP id
 v8-20020a056000144800b0020c7be80c2emr7899870wrx.692.1651756412724; 
 Thu, 05 May 2022 06:13:32 -0700 (PDT)
Received: from [192.168.1.9]
 (95-44-90-175-dynamic.agg2.lod.rsl-rtd.eircom.net. [95.44.90.175])
 by smtp.googlemail.com with ESMTPSA id
 q1-20020adf9dc1000000b0020c5253d8b8sm1334096wre.4.2022.05.05.06.13.31
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 05 May 2022 06:13:32 -0700 (PDT)
Message-ID: <f77abe05-2f7e-b74d-264f-fc92d87d21cd@HIDDEN>
Date: Thu, 5 May 2022 14:13:31 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:97.0) Gecko/20100101
 Thunderbird/97.0
Subject: Re: bug#55261: file:// links geneated by --hyperlink
Content-Language: en-US
To: Stephen Eglen <sje30@HIDDEN>, 55261 <at> debbugs.gnu.org
References: <875ymla0cb.fsf@HIDDEN>
From: =?UTF-8?Q?P=c3=a1draig_Brady?= <P@HIDDEN>
In-Reply-To: <875ymla0cb.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.5 (/)
X-Debbugs-Envelope-To: 55261
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.5 (/)

On 04/05/2022 14:27, Stephen Eglen wrote:
> hi,
> 
> With ls (GNU coreutils) 9.0 if I generate a hyperlink e.g.:
> 
> $ ls --hyperlink /etc/anacrontab
> 
> it generates the following filename (after removing the markup)
> 
> file://light/etc/anacrontab
> 
> where 'light' is the name of my laptop (running arch linux).
> browse-url-xdg-open is my browser-function, and
> 
> $ xdg-open file://light/etc/anacrontab
> 
> generates the error:
> 
> xdg-open: file 'file://light/etc/anacrontab' does not exist
> 
> As the file URI is local, I think it might be a mistake to include the
> machine name, light, unless it is a FQDN.  If I edit the URL to remove
> 'light' the link works as expected.
> 
> This was reported for kitty terminal last year and fixed by dropping the
> hostname: https://github.com/kovidgoyal/kitty/issues/2970
> 
> However, kitty seems to be able to connect to machines remotely via
> ssh  ( https://download.calibre-ebook.com/videos/kitty.mp4 ) and so
> maybe having the domain name in the hyperlink is useful.
> 
> Stephen

The scheme we're following for this is described at:
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#file-uris-and-the-hostname

What is $HOSTNAME for you?
Is it perhaps a FQDN and that might work better?
I guess if we went with $HOSTNAME if set, it would allow one to override
the hostname used by ls like: HOSTNAME=blah ls --hyper

For reference, on my system `xdg-open file://blah/etc/hostname`
ignores "blah" and opens the local file, while gnome-terminal
opening such a link will refuse with:
"file" scheme with remote hostname not supported.

cheers,
Pádraig





Information forwarded to bug-coreutils@HIDDEN:
bug#55261; Package coreutils. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 May 2022 13:34:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 04 09:34:19 2022
Received: from localhost ([127.0.0.1]:42080 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1nmF90-0003h1-OF
	for submit <at> debbugs.gnu.org; Wed, 04 May 2022 09:34:18 -0400
Received: from lists.gnu.org ([209.51.188.17]:37704)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sje30@HIDDEN>) id 1nmF8y-0003gs-BM
 for submit <at> debbugs.gnu.org; Wed, 04 May 2022 09:34:16 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57158)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sje30@HIDDEN>) id 1nmF8x-00024y-R7
 for bug-coreutils@HIDDEN; Wed, 04 May 2022 09:34:16 -0400
Received: from ppsw-40.csi.cam.ac.uk ([131.111.8.140]:38956)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sje30@HIDDEN>) id 1nmF8t-0007k3-JF
 for bug-coreutils@HIDDEN; Wed, 04 May 2022 09:34:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cam.ac.uk; 
 s=20210802.ppsw;
 h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From:
 Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description:
 Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
 In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=9VaPdA6IZmT8tcQjcVtcfdF9c19JRC303KjFnCOIgzI=; b=x1gPy4wQXcunwgzsPKmXa92Jpz
 tcYOTbNIKRnyph5ESWbE3EzNTwuHLnJWp0prY/sk6gdlwm+a/3OavjG0OJtnFFOTbjS/kJgfbY3J9
 3CqFtbbETeCxaJomFGW8V+CaxS95orw648FmdD09CfvAJN3AhH3DJU9T04KTqWOQkUA8=;
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: https://help.uis.cam.ac.uk/email-scanner-virus
Received: from smtp.maths.cam.ac.uk ([131.111.20.158]:52685
 helo=evander.maths.cam.ac.uk)
 by ppsw-40.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.138]:25)
 with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
 id 1nmF8h-000BzN-jV (Exim 4.95) for bug-coreutils@HIDDEN
 (return-path <sje30@HIDDEN>); Wed, 04 May 2022 14:33:59 +0100
Received: from 36.224.115.87.dyn.plus.net ([87.115.224.36] helo=localhost)
 by evander.maths.cam.ac.uk with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93)
 (envelope-from <sje30@HIDDEN>) id 1nmF8g-00CKvs-B9
 for bug-coreutils@HIDDEN; Wed, 04 May 2022 14:33:58 +0100
User-agent: mu4e 1.6.10; emacs 28.1
From: Stephen Eglen <sje30@HIDDEN>
To: bug-coreutils@HIDDEN
Subject: file:// links geneated by --hyperlink
Date: Wed, 04 May 2022 14:27:11 +0100
Message-ID: <875ymla0cb.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=131.111.8.140; envelope-from=sje30@HIDDEN;
 helo=ppsw-40.csi.cam.ac.uk
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001,
 DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.7 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

hi,

With ls (GNU coreutils) 9.0 if I generate a hyperlink e.g.:

$ ls --hyperlink /etc/anacrontab

it generates the following filename (after removing the markup)

file://light/etc/anacrontab

where 'light' is the name of my laptop (running arch linux).
browse-url-xdg-open is my browser-function, and

$ xdg-open file://light/etc/anacrontab

generates the error:

xdg-open: file 'file://light/etc/anacrontab' does not exist

As the file URI is local, I think it might be a mistake to include the
machine name, light, unless it is a FQDN.  If I edit the URL to remove
'light' the link works as expected.

This was reported for kitty terminal last year and fixed by dropping the
hostname: https://github.com/kovidgoyal/kitty/issues/2970

However, kitty seems to be able to connect to machines remotely via
ssh  ( https://download.calibre-ebook.com/videos/kitty.mp4 ) and so
maybe having the domain name in the hyperlink is useful.   

Stephen




Acknowledgement sent to Stephen Eglen <sje30@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-coreutils@HIDDEN. Full text available.
Report forwarded to bug-coreutils@HIDDEN:
bug#55261; Package coreutils. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 5 May 2022 13:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.