Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a .desktop file in .local/share/applications for opening text files in vim (console version). This works perfectly in gnome, unity. In Lxde it fails. I tried using lxterminal in place of gnome-terminal. It opens copy of the file and not the file itself (when saving, it asks if I want to replace the original file).

What is wrong? How can I set it right?

And here is the .desktop file.

[Desktop Entry]
Encoding=UTF-8
Name=Vim Text Editor (Console)
Comment=Edit text files in a console using Vim
# Exec=gnome-terminal --window-with-profile=yaadyaa --maximize --execute bash -c "vim %u"
Exec=lxterminal -e vim "%u"
Terminal=true
Type=Application
Icon=/usr/share/pixmaps/vim.svg
Categories=Application;Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
NoDisplay=true
share|improve this question
add comment

1 Answer 1

Having Terminal=true is probably what breaks it. That tells the OS to open a terminal with the command in the Exec line. So set Terminal to false, and make sure you have the command string for lxterminal correctly formatted. Below is my desktop file for opening files in nano, another console text-editor.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Nano Text Editor (Console)
Comment=Edit text files in a console using Nano
Exec=lxterminal -t Nano --command=/usr/bin/nano\ "%f"
Terminal=false
Type=Application
Icon=lxterminal
Categories=Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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