From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#38926: pcmanfm-qt unable to open files by double click Date: Mon, 6 Jan 2020 20:44:53 +0100 Message-ID: <20200106204453.44cc2213@scratchpost.org> References: <20200105105655.5dde2d6c@scratchpost.org> <2e3e1ced-2c3c-4084-817d-ac19aca5562d@www.fastmail.com> <20200105233729.10add7f5@scratchpost.org> <20200105235739.6de82e76@scratchpost.org> <20200106173857.09760737@scratchpost.org> <8334f32d-e27e-4c91-896c-096de07fbdf2@www.fastmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/E5EnTQqY4Ky/bR23d+hzfeb"; protocol="application/pgp-signature"; micalg=pgp-sha256 Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:53052) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioYJD-00074I-9B for bug-guix@gnu.org; Mon, 06 Jan 2020 14:45:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioYJC-0001KL-5C for bug-guix@gnu.org; Mon, 06 Jan 2020 14:45:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40862) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioYJC-0001K9-1w for bug-guix@gnu.org; Mon, 06 Jan 2020 14:45:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ioYJB-0006A3-W9 for bug-guix@gnu.org; Mon, 06 Jan 2020 14:45:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <8334f32d-e27e-4c91-896c-096de07fbdf2@www.fastmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Reza Alizadeh Majd Cc: 38926@debbugs.gnu.org --Sig_/E5EnTQqY4Ky/bR23d+hzfeb Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi Reza, On Mon, 06 Jan 2020 20:15:43 +0330 "Reza Alizadeh Majd" wrote: > + (add-before 'build 'patch-gio-launch-desktop > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((bin-path (assoc-ref outputs "bin") "/bin")) > + (setenv "GIO_LAUNCH_DESKTOP" > + (string-append bin-path "/bin/gio-launch-desktop"= )) > + #t))) I don't think that will work. According to the glib source code[1], the variable is read at runtime of the final program. What you could do is use your wrap-program in pcmanfm-qt, but with GIO_LAUNCH_DESKTOP (value like above) instead of PATH. That should fix pcmanfm-qt and I don't see any forward incompatibility or side effects introduced by it either. Also, glib would be unmodified. The downside would be that we would have to patch other broken programs one by one (after *finding* them). But I would still be in favor of that fix for now. Could you try it and send a patch? In the end I hope upstream realizes the insane situation that is the status quo and fixes it on their end (see https://gitlab.gnome.org/GNOME/glib/issues/1633 for a bug report of this problem). We could also use /bin/sh instead of gio-launch-desktop like the bug report suggests, but I'm not keen on increasing the attack surface so much, not after the security vulnerabilities in bash. The source code of gio-launch-desktop.c is very small and DOES NOT LINK TO GLIB so we could just make it an extra package independent of glib. Or we could just put it into the "out" output even though it's an executable. I've posted a patch to core-updates that does the latter[2]. [1] https://gitlab.gnome.org/GNOME/glib/merge_requests/95/diffs?commit_id= =3D742efe6232aba81c2c52c229c900a57ec2afedfd [2] https://bugs.gnu.org/38994 --Sig_/E5EnTQqY4Ky/bR23d+hzfeb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAl4TjjUACgkQ5xo1VCww uqUZLQgAmzbruEBvXo+nVr+poixM/aOYEN9/bCxqfwXjJuzUxmAYpVaUA3xdGkjW G4IAUHo345uXZjiR0ny2MyenwipOg04NEXnfkRA5Q4u7NnrUFbnqU9WLkDhsl5wu hE+V2gM8+/eKCfMQqWgTEeDEYVGpiymodYOZRGylNukQU2sm5wOlpKpMIdhDhczj QkNfyINxIvNz9bzKO+QyuWuyj4WYQBjN/S2FVeXJuHbnfua5VaGeQmse/OGXPqSY 84+wgt8LjtjqjzK+D17beOE7geEdtehMmCZCvIlP9J/yGe7l1Q+2YMzCHUudy/kg vUa37Oy/wS2A49txSBSJnz6B3wWQeQ== =phB7 -----END PGP SIGNATURE----- --Sig_/E5EnTQqY4Ky/bR23d+hzfeb--