Put Java application into file manager's context menu

不想你离开。 提交于 2019-12-31 05:16:10

问题


I'm using Eclipse IDE on Ubuntu. My app offers encryption services and I want to integrate it into the client OS. My question is: Is there a way to put my app programmatically into the context menu (right-click options) of the file manager, irrespective of the file manager a person is using? I would also like to know if there is any way I could do this on Windows explorer as well. But my guess is that it involves adding values to the registry and can be easily achieved.

So, is there a general solution to adding context-menu support on linux file managers, and also please correct me if I'm wrong about doing it in the windows system.

Please inform me if the question is unclear.


回答1:


If you target vanilla ubuntu, you can assume that the file manager is Gnome Nautilus. You can write an extension (probably in Vala/C/python) to nautilus :

http://developer.gnome.org/libnautilus-extension/stable/

Or you could re-use existing extensions, like nautilus-action or nautilus-script which allow you to bind scripts to contextual-menu entries.

If you want to support all file managers out there, you have to look at dolphin(for KDE), thunar(for xcfe), and maybe pcmanfm...

Edit : If you want to write your plugin in java, you might want to look at Gobject Introspection. Don't know if it works yet.



来源:https://stackoverflow.com/questions/11549529/put-java-application-into-file-managers-context-menu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!