Friday, September 29, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  7] [ 0]  / answers: 1 / hits: 8744  / 2 Years ago, thu, october 14, 2021, 1:31:58

I am using Xubuntu 16.04. I have set the default application to Vim for plain text files in Thunar. By default Vim opens in XTerm and not in Xfce Terminal. I would like for it to default to Xfce4 Terminal.

In Thunar the Open Terminal Here context menu item opens Xfce4 Terminal, and Xfce4 Terminal is set to default in Preferred Applications. Whisker Menu and the other menus open Vim in Xfce4 Terminal. I have tried creating a .desktop file, and this did not work. I have tried the option "Use a custom command:" under "Open With" > "Other Application" in Thunar. I have also tried uninstalling Xterm, and Thunar just shows an error.

More From » xfce


I initially tried editing /usr/share/applications/vim.desktop. I commented out #Exec=vim %F and added Exec=xfce4-terminal -e 'vim %F'. This worked for a while and then it started opening both Xterm and Xfce4 Terminal.

Instead in Thunar I right clicked on a txt file. I went to Properties > Open With: > Other Application > Use a custom command. I added xfce4-terminal -e 'vim %F'. This now works perfect.

To access the .desktop file you just created you can go to ~/.local/share/applications/. In the file you will see Exec=xfce4-terminal -e 'vim %F' %f. You can remove the %f if you'd like. Mine initially used a folder icon in Thunar. I changed it to use the Xfce4 Terminal icon instead by adding the line Icon=utilities-terminal.

[#14750] Thursday, October 14, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 335
Total Questions: 132
Total Answers: 110

Location: Tanzania
Member since Wed, Feb 24, 2021
3 Years ago