1

I'm trying to install gvim on WSL (under windows 10) and use MobaXterm as my X server.

Bash informed me that:

 Command 'gvim' not found, but can be installed with:

 sudo apt install vim

Which I did and vim was installed but not gvim. Anyone know what I'm doing wrong or how to install the latest version of gvim on WSL

0

I don't have WSL in front of me at the moment, but going on the assumption that you're using the Ubuntu environment atop WSL, I tried to replicate your condition on an Ubuntu 18.04 LTS VM here:

$ gvim
Command 'gvim' not found, but can be installed with:

sudo apt install vim       
sudo apt install vim-gtk3  
sudo apt install vim-tiny  
sudo apt install neovim-qt 
sudo apt install vim-athena
sudo apt install vim-gtk   
sudo apt install vim-nox 

Did you trim the other outputs from that command, or does the command truly only tell you about the vim package under WSL?

APT is guessing here, based on the command name you tried, not prescribing. Some of those options will get you something like what you're expecting, and some won't; you're expected to be able to make the distinction. Of the options, I'd recommend vim-gtk3, but another might please you better.

0

Yes I had truncated the list of commands suggested by apt. I wasn't sure how apt determines the list of packages it suggests.

When I ran:

sudo apt install vim-gtk3

gvim did install and did display the expected file contents using a window created by MobaXterm.

While gvim appeared to be working based on my limited testing so far it did display a series of messages in the terminal window:

 (gvim:1869): dconf-WARNING **: 07:14:18.972: failed to 
commit changes to dconf: Failed to execute child process 
“dbus-launch” (No such file or directory)

After I installed dbus-x11:

 sudo apt install dbus-x11

The issue was resolved.

Many thanks for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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