3

When I run vim from the start menu, it opens up an xfce terminal window and runs vim. However, when I set vim to be my default text editor and double-click a file, it runs in xterm instead of the xfce terminal for some reason. I'd rather have it run in the xfce terminal all the time because xterm's text size is too small on my screen.

I tried changing the vim.desktop file to try to force vim to start in xfce4-terminal:

Exec=vim %F

to:

Exec=xfce4-terminal -e vim %F

but when I double clicked a file, it just started in xterm again before immediately closing. Can someone offer insight?

Here's the rest of the vim.desktop:

[Desktop Entry]
Version=1.0
Type=Application
Name=Vim
GenericName=Text Editor
Comment=Edit text files
Icon=vim
TryExec=vim
Exec=xfce4-terminal -e vim %F
NoDisplay=false
Categories=TextEditor;Utility;
MimeType=text/plain;
StartupNotify=false
Terminal=true

1 Answer 1

1

This is old post, but I was just looking for this, so here's what worked for me.

[Desktop Entry]
Version=1.0
Type=Application
Name=Vim
GenericName=Text Editor
Comment=Edit text files
Icon=vim
TryExec=vim
Exec=xfce4-terminal -e "vim %F"
NoDisplay=false
Categories=TextEditor;Utility;
MimeType=text/plain;
StartupNotify=false
Terminal=false

quote the vim command and set terminal to false

1
  • Oh man this saved my day! You really need to use Terminal=false! Commented Apr 9, 2020 at 20:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.