Subject: bug#56013: 28.1; "gio open" and "xdg-open" fail silently under eshell

From: Jeff Kowalski <[email-masked]>
Date: Wed, 15 Jun 2022 20:18:18 -0700

Setup:
$ echo "Hello, world!" > /tmp/hello.txt

Normal behavior:
$ gnome-terminal
;; now within terminal
$ gio open /tmp/hello.txt
;; GOOD RESULT - file is opened in app, as described by mime type. On my
system, app is 'Xed'

Emacs behavior:
$ emacs -Q
;; now in emacs
M-x eshell
;; now in eshell buffer
$ gio open /tmp/hello.txt
;; BAD RESULT - nothing happens, app not opened, silent failure, nothing
in message buffer
$ xdg-open /tmp/hello.txt
;; BAD RESULT - nothing happens, app not opened, silent failure, nothing
in message buffer

I've tried making my $ENV identical between normal terminal and eshell,
but I get the same results.

Thanks for your help,
Jeff Kowalski
---------

In GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20,
cairo version 1.16.0)
 of 2022-05-30 built on lcy02-amd64-022
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Linux Mint 20.3

Configured using:
 'configure --build=x86_64-linux-gnu --prefix=/usr
 '--includedir=${prefix}/include' '--mandir=${prefix}/share/man'
 '--infodir=${prefix}/share/info' --sysconfdir=/etc --localstatedir=/var
 --disable-silent-rules '--libdir=${prefix}/lib/x86_64-linux-gnu'
 '--libexecdir=${prefix}/lib/x86_64-linux-gnu' --disable-maintainer-mode
 --disable-dependency-tracking --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man
 --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/28.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/28.1/site-lisp:/usr/share/emacs/site-lisp
 --program-suffix=28 --with-modules --with-file-notification=inotify
 --with-mailutils --with-harfbuzz --with-json --with-zlib --with-x=yes
 --with-x-toolkit=gtk3 --with-lcms2 --with-cairo --with-xpm=yes
 --with-gif=yes --with-gnutls=yes --with-jpeg=yes --with-png=yes
 --with-tiff=yes --with-xwidgets 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs28-jmphgn/emacs28-28.1~1.git5a223c7f2e=.
-fstack-protector-strong
 -Wformat -Werror=format-security -no-pie' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro
 -no-pie''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS
X11 XDBE XIM XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Info

Minor modes in effect:
  minions-mode: t
  doom-modeline-mode: t
  dimmer-mode: t
  auto-dim-other-buffers-mode: t
  global-atomic-chrome-edit-mode: t
  org-super-agenda-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  global-rbenv-mode: t
  counsel-mode: t
  eshell-vterm-mode: t
  eshell-syntax-highlighting-global-mode: t
  cua-mode: t
  display-time-mode: t
  which-key-mode: t
  override-global-mode: t
  global-flycheck-mode: t
  global-hl-todo-mode: t
  which-function-mode: t
  key-chord-mode: t
  global-company-mode: t
  company-mode: t
  ivy-mode: t
  erc-truncate-mode: t
  erc-track-mode: t
  erc-spelling-mode: t
  editorconfig-mode: t
  global-diff-hl-mode: t
  winner-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-anzu-mode: t
  anzu-mode: t
  projectile-mode: t
  volatile-highlights-mode: t
  global-hl-line-mode: t
  super-save-mode: t
  windmove-mode: t
  recentf-mode: t
  savehist-mode: t
  save-place-mode: t
  show-smartparens-global-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  prelude-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  size-indication-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/jeff/.emacs.d/elpa/git-modes-20220422.1611/gitignore-mode hides
/home/jeff/.emacs.d/elpa/gitignore-mode-20210528.1856/gitignore-mode
/home/jeff/.emacs.d/elpa/el-get-20211224.959/el-get-install hides
/home/jeff/.emacs.d/elpa/load-relative-20201130.2202/el-get-install
/home/jeff/.emacs.d/el-get/emacs-web-server/web-server-status-codes hides
/home/jeff/.emacs.d/elpa/web-server-20210708.2242/web-server-status-codes
/home/jeff/.emacs.d/el-get/emacs-web-server/web-server hides
/home/jeff/.emacs.d/elpa/web-server-20210708.2242/web-server
/home/jeff/.emacs.d/elpa/cmake-mode-20220322.1258/cmake-mode hides
/usr/share/emacs/site-lisp/cmake-mode
/home/jeff/.emacs.d/elpa/clang-format-20191121.1708/clang-format hides
/usr/share/emacs/site-lisp/clang-format/clang-format
/home/jeff/.emacs.d/elpa/transient-20220527.2213/transient hides
/usr/share/emacs/28.1/lisp/transient
/home/jeff/.emacs.d/el-get/flymake/flymake hides
/usr/share/emacs/28.1/lisp/progmodes/flymake

Features:
(shadow sort mail-extr emacsbug sendmail goto-addr esh-autosuggest
em-unix em-script em-prompt em-ls em-hist em-pred em-glob em-cmpl
em-dirs esh-var em-basic em-banner diary-lib diary-loaddefs cal-iso
org-duration ffap ol-eww eww url-queue mm-url ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnselect gnus-search eieio-opt speedbar ezimage dframe
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr kinsoku
svg gnus-group gnus-undo gnus-start gnus-dbus dbus gnus-cloud nnimap
nnmail mail-source utf7 netrc nnoo gnus-spec gnus-int gnus-range
gnus-win gnus nnheader ol-docview ol-bibtex ol-bbdb ol-w3m ol-doi
org-link-doi origami origami-parsers solarized-gruvbox-dark-theme
solarized-palettes rainbow-mode rainbow-delimiters elisp-slime-nav
personal mule-util company-ispell company-anaconda anaconda-mode
pythonic minions doom-modeline doom-modeline-segments doom-modeline-env
doom-modeline-core all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons
data-alltheicons solarized-theme solarized solarized-faces dimmer
auto-dim-other-buffers hydra atomic-chrome websocket bindat let-alist
shackle trace org-ehtml org-ehtml-server ox-ehtml org-ehtml-util ox-org
org-lint org-attach org-id org-protocol org-clock org-super-agenda ts
htmlize org-habit ox-odt ox-latex ox-icalendar org-agenda ox-html table
ox-ascii ox-publish ox org-indent ob-gnuplot ob-latex ob-dot ob-ruby
ob-python ob-shell ace-window magit-bookmark magit-submodule
magit-obsolete magit-popup magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log magit-diff smerge-mode
git-commit log-edit message rfc822 mml mml-sec epa gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mailabbrev mail-utils gmm-utils
mailheader add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor server magit-mode transient
magit-git magit-base magit-section crm compat-27 compat-26
platformio-mode async irony-eldoc irony-completion irony-snippet
flycheck-irony irony-diagnostics irony irony-iotask realgud-byebug
realgud:byebug-track-mode realgud:byebug-init realgud:byebug-core
realgud-pry realgud:pry-track-mode realgud:pry-init realgud:pry-core
realgud realgud-lang-java realgud-zshdb realgud:zshdb-track-mode
realgud:zshdb-core realgud:zshdb-init realgud-trepan3k
realgud:trepan3k-track-mode realgud:trepan3k-core realgud:trepan3k-init
realgud-trepan2 realgud:trepan2-track-mode realgud:trepan2-core
realgud:trepan2-init realgud-trepanpl realgud:trepanpl-track-mode
realgud:trepanpl-core realgud:trepanpl-init realgud-trepanjs
realgud:trepanjs-track-mode realgud:trepanjs-core realgud:trepanjs-init
realgud-lang-js realgud-trepan realgud:trepan-track-mode
realgud:trepan-core realgud:trepan-init realgud-remake
realgud:remake-track-mode realgud:remake-core realgud:remake-init
realgud-rdebug realgud-rdebug-track-mode realgud-rdebug-core
realgud-rdebug-init realgud-lang-ruby realgud-perldb
realgud:perldb-track-mode realgud:perldb-core realgud:perldb-init
realgud-lang-perl realgud-pdb realgud:pdb-track-mode realgud:pdb-core
realgud:pdb-init realgud-lang-python python-el-fgallina-expansions
smartparens-python python tramp-sh realgud-kshdb
realgud:kshdb-track-mode realgud:kshdb-core realgud:kshdb-init
realgud-gub realgud:gub-track-mode realgud:gub-core realgud:gub-init
realgud-gdb realgud:gdb-track-mode realgud:gdb-init realgud:gdb-core
realgud-bashdb realgud:bashdb-track-mode realgud:bashdb-core
realgud:bashdb-init realgud-lang-posix-shell realgud:run
realgud-locals-mode realgud-breakpoint-mode realgud-backtrack-mode
realgud-track-mode realgud-backtrace-mode realgud-track realgud-init
realgud-file realgud-attach realgud-shortkey realgud-menu realgud-eval
realgud-cmds realgud-core realgud-reset realgud-bp realgud-bp-image-data
realgud-lang realgud-send realgud-window realgud-buffer-helper
realgud-buffer-breakpoint realgud-buffer-backtrace realgud-locals
realgud-buffer-locals realgud-utils realgud-buffer-command
realgud-buffer-info realgud-regexp realgud-lochist realgud-loc
realgud-buffer-source realgud-key realgud-custom key realgud-follow
loc-changes realgud-fringe realgud-helper load-relative inf-ruby rbenv
ruby-tools ruby-mode-expansions smartparens-ruby ruby-mode counsel xdg
swiper smex ido cmake-mode smartparens-rst rst eshell-vterm em-term
vterm face-remap term ehelp vterm-module term/xterm xterm em-smart
eshell-syntax-highlighting em-alias esh-mode shrink-path fish-mode
flycheck-plantuml plantuml-mode xml ob-plantuml graphviz-dot-mode
doc-view jka-compr image-mode exif cperl-mode-expansions cperl-mode
cua-base package-utils time ccls ccls-member-hierarchy
ccls-inheritance-hierarchy ccls-call-hierarchy ccls-tree ccls-code-lens
ccls-semantic-highlight ccls-common lsp-mode lsp-protocol spinner
network-stream puny nsm rmc smartparens-markdown markdown-mode lv f
f-shortdoc shortdoc epg rfc6068 epg-config which-key lpr
use-package-chords bind-chord equake buffer-focus-hook
org-capture-pop-frame org-capture org-refile web-server mm-encode
web-server-content-types web-server-status-codes eshell-git-prompt s
org-cua-dwim org-expiry el-get el-get-autoloading el-get-list-packages
el-get-dependencies el-get-build el-get-status el-get-methods
el-get-fossil el-get-svn el-get-pacman el-get-github-zip
el-get-github-tar el-get-http-zip el-get-http-tar el-get-hg el-get-go
el-get-git-svn el-get-fink el-get-emacswiki el-get-http el-get-notify
el-get-emacsmirror el-get-github el-get-git el-get-elpa el-get-darcs
el-get-cvs el-get-bzr el-get-brew el-get-builtin el-get-apt-get
el-get-recipes el-get-byte-compile el-get-custom el-get-core autoload
radix-tree validate req-package view req-package-cycles req-package-args
req-package-hooks ht inline log4e use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core prelude-yaml prelude-xml nxml-mode-expansions rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap html-mode-expansions
sgml-mode facemenu dom nxml-util nxml-enc xmltok prelude-web
web-mode-expansions smartparens-html web-mode disp-table prelude-shell
sh-script smie executable prelude-ruby prelude-python prelude-perl
prelude-org the-org-mode-expansions org-element avl-tree smartparens-org
org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-footnote
org-src ob-comint org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob-core ob-eval org-table oc-basic
bibtex ol org-keys oc org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs prelude-js js2-mode-expansions js2-mode js-mode-expansions
smartparens-javascript js cc-mode-expansions smartparens-c cc-mode
cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs prelude-emacs-lisp prelude-lisp prelude-c prelude-programming
flycheck find-func hl-todo compat compat-macs which-func
prelude-key-chord key-chord prelude-company company-oddmuse
company-keywords make-mode company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-clang
company-capf company-cmake company-semantic company-template
company-bbdb company prelude-ivy two-column ivy ivy-faces ivy-overlay
colir color prelude-erc erc-truncate erc-track erc-match erc-autoaway
erc-spelling erc-notify erc-networks erc-log erc-goodies erc erc-backend
erc-loaddefs prelude-linux exec-path-from-shell
prelude-global-keybindings warnings prelude-editor editorconfig
editorconfig-core editorconfig-core-handle editorconfig-fnmatch
operate-on-number calc-bin calc-ext calc calc-loaddefs calc-macs diff-hl
smartrep log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode
winner undo-tree diff queue eshell esh-cmd esh-ext esh-opt esh-proc
esh-io esh-arg esh-module esh-groups esh-util re-builder whitespace
tabify browse-kill-ring derived midnight ediff ediff-merg ediff-mult
ediff-wind ediff-diff ediff-help ediff-init ediff-util dired-x dired
dired-loaddefs anzu avy projectile lisp-mnt mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr grep compile ibuf-ext ibuffer
ibuffer-loaddefs bookmark text-property-search expand-region
text-mode-expansions er-basic-expansions expand-region-core
expand-region-custom flyspell ispell rect etags fileloop generator xref
project volatile-highlights hl-line super-save windmove recentf
tree-widget savehist saveplace diminish smartparens-config
smartparens-text smartparens advice dash autorevert filenotify delsel
prelude-mode edmacro kmacro crux easy-mmode pcase tramp tramp-loaddefs
trampver tramp-integration files-x tramp-compat shell pcomplete comint
ansi-color ring parse-time iso8601 time-date ls-lisp format-spec
thingatpt imenu-anywhere imenu prelude-core epl prelude-ui zenburn-theme
prelude-custom prelude-packages cl-extra help-mode finder-inf preload
cus-edit pp cus-load wid-edit ede/auto eieio-base tex-site rx
realgud-recursive-autoloads cl info package browse-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache json subr-x map
url-vars seq byte-opt gv bytecomp byte-compile cconv cl-loaddefs cl-lib
iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit
x multi-tty make-network-process emacs)

Memory information:
((conses 16 2427653 696067)
 (symbols 48 85570 62)
 (strings 32 379359 114192)
 (string-bytes 1 10987724)
 (vectors 16 131074)
 (vector-slots 8 2422995 586466)
 (floats 8 1318 2569)
 (intervals 56 140887 10141)
 (buffers 992 28))