Closed arthurcgusmao closed 4 years ago
I think in your position I would note the values of environment variables in Emacs before and after running exec-path-from-shell-initialize
, and see what's different. You can do this by inspecting the process-environment
variable. Probably there is a change that affects the x-terminal-emulator
script.
Thank you for the helpful tip @purcell. Indeed, changing the values solved the issue; the culprit was /home/user/.miniconda3/bin
in the PATH
variable.
My particular solution was to add just the path that I needed manually instead of all paths:
(defun add-to-env-path (path)
"Add PATH (first position) to the PATH environment variable"
(setenv "PATH" (concat (expand-file-name path)
path-separator (getenv "PATH"))))
(add-to-env-path "~/.local/bin")
Great, glad you figured it out!
Issue
After running
(exec-path-from-shell-initialize)
, trying to launchgnome-terminal
from Emacs (e.g., M-!gnome-terminal
RET) fails, with following output:Emacs version: GNU Emacs 27.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.30) of 2020-02-22
Context
I'm used to launching instances of a terminal emulator (gnome-terminal) as an Emacs subprocess, to quickly execute commands on the directory I'm currently in, by running
, which I put inside a function and bind to a keybinding.
After using the package (specifically, after running
(exec-path-from-shell-initialize)
), the process is created but no terminal window is launched on my OS (Ubuntu).Investigating it further, it seems that after
(exec-path-from-shell-initialize)
, trying to launchx-terminal-emulator
(which points tognome-terminal
) from Emacs fails, giving the output discussed in previous section.Any idea on what should be going on? Any ideas or solutions are welcome.
PS: Thank you for the good work :)