
我希望能夠雙擊 Nautilus 內的 Python 腳本(或 SH 腳本),然後運行它。所以我製作了一個自訂桌面文件,內容:
[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;
我把它放在一個run-txtexe.desktop
名為~/.local/share/applications
.
我轉到 Nautilus,右鍵單擊 Python 腳本 (text/x-python),然後將滑鼠懸停在“開啟方式”選單上。不在那裡。我點擊“其他應用程式...”。不在那裡。然後我單擊“顯示其他應用程式”。也不在那裡!
這是一個錯誤還是我只是做錯了什麼?
我在跑步:
Fedora 19
Nautilus 3.8.2
答案1
這是 Nautilus 3.8 的新功能,它會忽略 NoDisplay=true 的 .desktop 文件
可能的解決方法:將 NoDisplay=true 替換為 NotShowIn=NAME-OF-YOUR-DESKTOP-ENVIRONMENT
https://bugzilla.redhat.com/show_bug.cgi?id=1001988
https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1238634