13 votes

Tramp mode is much slower than using terminal to ssh

I have also found the solutions on the tramp FAQ that address speeding tramp up to work pretty well. From the page, here is what I added to my configuration: (setq remote-file-name-inhibit-cache nil)...
colelemonz's user avatar
11 votes

Tramp: Waiting for prompts from remote shell

I had this exact same problem but it had nothing to do with RVM on ( which I also have ) on my Ubuntu-16.10 machine. It was related to by custom prompt (PS1) The issue was the prompt PS1. This fix :...
Jimi 's user avatar
  • 111
11 votes

tramp and sudo: how to edit files under another account

To ssh in as you, and then run sudo su oracle, and then edit a file, do this: /ssh:you@remotehost|sudo:oracle@remotehost:/path/to/file
Bryan Murdock's user avatar
11 votes

Tramp unable to open some files

I had a similar problem when trying to open/save plain ASCII files via tramp's sftp: the files were fine, I was able to edit them with, for example,nano, but trying to open them via tramp would get ...
fr_andres's user avatar
  • 211
8 votes

equivalent of unix "which" for exec-path?

You can attempt locating an executable in exec-path with executable-find: (executable-find "ls") ;=> "/usr/bin/ls" (executable-find "sl") ;=> nil
wasamasa's user avatar
  • 22.2k
8 votes

How to execute sudo command in org-babel in relative path under current working directory

You must use an absolute local directory path. Like this: #+begin_src shell :dir "/sudo::/data/code/quirc" :cache no make sudo make install #+end_src See the leading slash in /data/code/quirc. Edit:...
Michael Albinus's user avatar
8 votes
Accepted

does tramp mode look at .dir-locals

enable-remote-dir-locals is a variable defined in ‘files.el’. Its value is nil You can customize this variable. This variable was introduced, or its default value was changed, in version 24.3 of ...
phils's user avatar
  • 51.3k
7 votes

TRAMP is unbearably slow (OSX, ssh)

I know it's an old question and that you maybe don't care about the answer now but I do faced the same issue. I was pretty sure it was OS X related but in fact lags and timeouts were caused by my ...
Bounga's user avatar
  • 81
7 votes

Executing remote commands with TRAMP with a single SSH connection

Emacs knows two basic commands for running external processes, call-process for synchronous processes, and start-process for asynchronous processes. For the remote case, these commands have been ...
Michael Albinus's user avatar
7 votes
Accepted

Disable remote file cleanup in recentf?

M-x customize-option RET recentf-keep RET, and be sure to read its description. You can use any arbitrary or conditional expression. And that includes file-remote-p.
Drew's user avatar
  • 77.6k
7 votes

cant connect with TRAMP (tramp-file-name-handler: Couldn’t find local shell prompt for /bin/sh)

Your remote prompt is not Tramp compatible. Check the Tramp documentation how to simplify it. Something like this might work: [ $TERM = "dumb" ] && PS1='$ ' If your remote shell is zsh, you ...
Michael Albinus's user avatar
7 votes

How to debug hanging tramp connections?

I had it hang because it couldn't detect the shell prompt, I added this to my .zshenv file.. # Fix for TRAMP [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' Alternatively you can ...
Darius's user avatar
  • 171
6 votes

Running ipython remotely

@serv-inc answear is the best approach here: (setq python-shell-interpreter "ssh yourhost ipython" python-shell-interpreter-args "--simple-prompt -i") but it will still fail with the error:...
atevm's user avatar
  • 948
6 votes

Can Emacs use tramp to run in an interactive session on a remote HPC node?

I have been struggling to do the same. I found a different route that allowed me to do basically the same thing. You can open a shell buffer by M-x shell and from there connect to the login node, and ...
Joonha Park's user avatar
6 votes
Accepted

Magit doesn't recognise git repo through ssh connection

Error (magit): Magit requires Git >= 1.9.4, you are using 1.8.3. I've already installed git 2.10.0 on /usr/local/git The list of directories to search for executables on remote hosts is ...
tarsius's user avatar
  • 25.7k
6 votes
Accepted

How to make Org-Babel support tangel to su/sudo file with tramp-sudo?

You can prefix tangle file path with /sudo::. #+NAME: privoxy config for convert socks5 to HTTP proxy #+BEGIN_SRC conf :tangle "/sudo::/etc/privoxy/config" listen-address localhost:8118 forward-...
stardiviner's user avatar
  • 1,928
6 votes
Accepted

How to execute sudo command in org-babel in relative path under current working directory

I suddenly come up with string concat idea. Here is the very simple solution. #+begin_src sh :dir (concat "/sudo::" (expand-file-name "data/code")) pwd #+end_src #+RESULTS[(2020-...
stardiviner's user avatar
  • 1,928
6 votes
Accepted

How can emacs org-mode execute shell code remotely as sudo?

Use TRAMP multi-hop syntax for :dir header. 4.4 Combining ssh or plink with su or sudo If the su or sudo option shall be performed on another host, it could be comnbined with a leading ssh or ...
Melioratus's user avatar
  • 4,644
6 votes
Accepted

Emacs find-file over SSH is too slow to connect

Indeed, Tramp doesn't like your fancy prompt. The Tramp manual explains what to do, the FAQ section. In short, you shall add to your remote .profile [[ $TERM == "dumb" ]] &&...
Michael Albinus's user avatar
5 votes
Accepted

Can Emacs Eshell show remote man pages in TRAMP mode?

I have found a work-around! Admittedly it is a bit hacky, and uses woman rather than man, but I think this might just work for me. Essentially, woman-find-file is tramp aware, so if we can pass it the ...
Stig Brautaset's user avatar
5 votes
Accepted

How to tell Emacs/TRAMP to use the local shell, instead the shell of remote machine?

You must change default-directory to be a local file name. Like this: (let ((default-directory temporary-file-directory)) (shell-command "python ~/Dropbox/Sys/Linux/chrome-refresh-back-emacs.py"))
Michael Albinus's user avatar
5 votes
Accepted

How to open a file with tramp mode when Helm is active?

the way it works for me is the following: call helm-find-files (usually C-xC-f) write /scp: if you have used tramp before you get a list with previous locations which you can select with C-j (or type ...
djames's user avatar
  • 66
5 votes

Working with tramp mode on slow connection, emacs does network trip when I start typing

When you start to type, Emacs starts to think about auto-saving. This could (or could not) include some checks on the remote side. Change the auto-save file location to your local directories, see the ...
Michael Albinus's user avatar
5 votes

Tramp: Waiting for prompts from remote shell

It looks like you've run the exec-path-from-shell from a Tramp buffer, so when it runs the shell, it attempts to do its magic on the remote server and then set the environment variables in your local ...
sanityinc's user avatar
  • 2,921
5 votes
Accepted

loading tramp overrides tramp-remote-path customization back to default value

Short answer: Don't edit custom-set-variables form by hand. Tramp must be loaded for custom-set-variables to work. Either load tramp before custom-set-variables: (require 'tramp) (custom-set-...
Clément's user avatar
  • 3,995
5 votes

Using sql-sqlite via TRAMP

After some experimentation and a bit of digging around in the source code, I recognized what went wrong. Running M-x sql-sqlite from the remote Dired buffer starts a remote SQLite process and that ...
Thomas's user avatar
  • 51
5 votes
Accepted

How to execute emacs commands in background

No, there is no silver bullet. Magit, and I am sure Tramp, do run some child processes like git and scp asynchronously in some cases and in other cases they do not. The author has to decide on a case-...
tarsius's user avatar
  • 25.7k
5 votes

What is the equivalent of /sudo:root@localhost:/ in windows?

For Tramp, this is not available. One would need to write a new package tramp-runas.el or tramp-elevate.el, which implements it. Since I'm not using MS Windows myself, it is unlikely that I'll ...
Michael Albinus's user avatar
5 votes
Accepted

How do you upgrade tramp?

There are regular Tramp releases at https://ftp.gnu.org/gnu/tramp/, the latest one is Tramp 2.3.3. This is roughly the same what Emacs 26.1 will bring. The Tramp manual describes also how to use git ...
Michael Albinus's user avatar
5 votes
Accepted

Run local command on remote file with TRAMP?

I've written the following snippet which (as far as I can tell) does what you're looking for from the point of view of the ! command. It does the following: Takes the files that would have operated ...
Mark's user avatar
  • 440

Only top scored, non community-wiki answers of a minimum length are eligible