unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Reza Alizadeh Majd <r.majd@pantherx.org>
Cc: 38926@debbugs.gnu.org
Subject: bug#38926: pcmanfm-qt unable to open files by double click
Date: Mon, 6 Jan 2020 20:44:53 +0100	[thread overview]
Message-ID: <20200106204453.44cc2213@scratchpost.org> (raw)
In-Reply-To: <8334f32d-e27e-4c91-896c-096de07fbdf2@www.fastmail.com>

[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]

Hi Reza,

On Mon, 06 Jan 2020 20:15:43 +0330
"Reza Alizadeh Majd" <r.majd@pantherx.org> 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=742efe6232aba81c2c52c229c900a57ec2afedfd
[2] https://bugs.gnu.org/38994

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-01-06 19:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-04 20:24 bug#38926: pcmanfm-qt unable to open files by double click Reza Alizadeh Majd
2020-01-05  9:56 ` Danny Milosavljevic
2020-01-05 13:52   ` Reza Alizadeh Majd
2020-01-05 22:37     ` Danny Milosavljevic
2020-01-05 22:57       ` Danny Milosavljevic
2020-01-06 10:06         ` Danny Milosavljevic
2020-01-06 16:38         ` Danny Milosavljevic
2020-01-06 16:45           ` Reza Alizadeh Majd
2020-01-06 19:44             ` Danny Milosavljevic [this message]
2020-01-07  6:23               ` Reza Alizadeh Majd
2020-01-07  8:03                 ` Reza Alizadeh Majd
2020-01-07 11:19       ` Hartmut Goebel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200106204453.44cc2213@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=38926@debbugs.gnu.org \
    --cc=r.majd@pantherx.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).