Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to be able to double click on a Python script (or SH script) inside Nautilus and then it run. So I made a custom desktop file, contents:

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=ExecTxt
Exec=run-txtexe %f
Icon=application-x-executable
MimeType=text/x-python;application/x-shellscript;
NoDisplay=true
Comment=Runs executable text files
Terminal=false
Categories=System;Launchers;

I put this in a file named run-txtexe.desktop under ~/.local/share/applications.

I go to Nautilus, right-click on a Python script (text/x-python) and mouse over the "Open With " menu. Not there. I click on "Other Application...". Not there. I then click "Show other applications". Not there either!

Is this a bug or am I just doing something wrong?

I am running:

Fedora 19
Nautilus 3.8.2
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

This is a new... 'feature' of Nautilus 3.8, it ignores .desktop files that have NoDisplay=true

Possible workaround: replace NoDisplay=true with NotShowIn=NAME-OF-YOUR-DESKTOP-ENVIRONMENT

https://bugzilla.redhat.com/show_bug.cgi?id=1001988

https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1238634

share|improve this answer
    
Well that stinks. Thanks for the workaround. –  DanielTA Oct 11 '13 at 18:25
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.