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 vim.desktop file in ~/.local/share/applications/ directory with these lines:

[Desktop Entry]
Name=Vim Text Editor
Comment=Edit text files
TryExec=vim
Exec=vim
Terminal=true
Type=Application
Icon=terminal
Categories=Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;

This .desktop file works fine at this point (i.e. I can search in Unity dashboard it and click it to open vim)

But I wanted more from this desktop file. I wanted to start it in insert mode, so I changed some parts of it, like:

TryExec=vim -c 'startinsert'
Exec=vim -c 'startinsert'

But as soon as I save this file I am not able to search it.

share|improve this question
    
@WarriorIng64 This is not specific case for vim. This applies to all softwares. –  Santosh Kumar Sep 27 '12 at 0:35
add comment

1 Answer

Try logging out/in or even restarting to fix this. The following .desktop file works perfectly for me:

[Desktop Entry]
Name=Vim Text Editor
Comment=Edit text files
Exec=vim -c 'startinsert'
Terminal=true
Type=Application
Icon=terminal
Categories=Utility;TextEditor;
StartupNotify=true
MimeType=text/plain;

                            enter image description here

share|improve this answer
    
Fix in here removing TryExec line. Without logging off, it works. –  heartsmagic Sep 27 '12 at 1:11
    
@izx Hmm.. Its working. Can you tell me what is the role of TryExec? What does it actually does? Why is it even there in an .desktop file? –  Santosh Kumar Sep 27 '12 at 3:38
    
@izx And how is your dash yellowish? Mine is black and I don't find any way to configure it. –  Santosh Kumar Sep 27 '12 at 3:39
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.