I often log in remotely to a specific server using ssh -X from a Macbook Pro terminal instance. When I use gvim then usually I get a local Xwindow and can edit normally while the terminal session remains available for input. However, this is not always the case. Often I will run gvim, do some editing, and close the window. Frequently after I do this when I re-run gvim I get the following messages:

E2backupdir=~/.vim/tmplay Press ENTER or type command to continue

E8backupdir=~/.vim/tmps failed to start the GUI Press ENTER or type command to continue

I would like to track down what is causing this and if possible eliminate it. However, I cannot seem to discover how to debug gvim startup. Can anyone provide some advice on how to proceed?

  • Those errors look like something tried to write error messages and the output of set backupdir? at the same time. Try How to debug my vimrc for some advice tracking down these kinds of problems
    – D. Ben Knoble
    Apr 29, 2023 at 15:15

1 Answer 1


This problem is solved by substituting -Y for -X on the ssh client invocation. There are problems reported with using the -X option (treat remote host as untrusted) involving some software applications. It appears that Vim is one of these. By using the -Y option (treat remote host as trusted) these problems disappear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.