我想问一个问题,但是我先要展示我的文件。
<html>
<body>
<a href="cloudje:firefox">Open firefox</a>
</body>
</html>
我的 .desktop 文件:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Exec=/usr/bin/cloudjerun -c gedit
Name[en_US]=Gedit
Comment[en_US]=Small, easy-to-use program to access iTunesU media
Name=TunesViewer
Comment=Small, easy-to-use program to access iTunesU media
Icon=/usr/share/icons/hicolor/scalable/apps/tunesview.svg
Categories=Application;Network;
MimeType=x-scheme-handler/cloudje;
Comment[en_US.utf8]=Small, easy-to-use program to access iTunesU media
教程: http://jarrpa.net/2011/10/28/creating-custom-url-handlers-in-ubuntu-11-04-11-10-gnome-3-0/ 好的,很棒。.desktop文件将被放置在/usr/share/applications中。如果您执行命令“xdg-open cloudje:firefox”或类似“xdg-open cloudje:example”,它将始终使用名为“cloudjerun”的Python脚本使用gedit。如何使用命令“xdg-open cloudje:firefox”运行firefox?
我需要将“Exec=/usr/bin/cloudjerun -c gedit”替换为“Exec=/usr/bin/cloudjerun -c %U”或“Exec=/usr/bin/cloudjerun -c %s”或其他什么吗?