日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

ubuntu 配置url地址重定向协议

發布時間:2024/8/24 Ubuntu 46 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu 配置url地址重定向协议 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

參考網址:

http://blog.csdn.net/eroswang/article/details/1594795

http://hi.baidu.com/pluto632/item/5007737da31344326f29f666

http://msdn.microsoft.com/en-us/library/aa767914.aspx#prot_sec

http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx

http://kb.mozillazine.org/Register_protocol

http://superuser.com/questions/162092/how-can-i-register-a-custom-protocol-with-xdg

https://support.shotgunsoftware.com/entries/86754-How-to-launch-external-applications-using-custom-protocols-rock-instead-of-http-

針對ubuntu

1:

All Firefox versions (Requires certain Gnome libraries to be installed) In a terminal, type: gconftool-2 -s /desktop/gnome/url-handlers/foo/command '/path/to/app %s' --type String gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled --type Boolean true Replace foo on both lines with the protocol you want to register and /path/to/app with the path to the application you want to run.

以上如果不行,可以試試一下操作 gconftool-2 -t string -s /desktop/gnome/url-handlers/foo/command 'foo "%s"'
gconftool-2 -s /desktop/gnome/url-handlers/foo/needs_terminal false -t bool
gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled true -t bool

2:

在firefox地址欄輸入about:config,出現如下界面

之后firefox version >3.5 執行一下操作

在preference name 下面,右鍵-》new,選擇不同的類型建立不同的值

主要是如下幾個值:

最后的testfile,要替換成你自己的協議。

并且要確保network.protocol-handler.expose-all 為true

?

3.

? 建立應用程序的桌面文件:/usr/share/applications/testfile.desktop (文件名稱應該要與協議名稱一樣)

? 內容如下:

[Desktop Entry] Encoding=UTF-8 Name=testfile Comment=testfile Exec=/home/ubuntu/workspace/test_file/Debug/test_file %u Terminal=false StartupNotify=true Type=Application Categories=Application;Internet; Name[en_US]=testfile

? ?之后在?/etc/gconf/gconf.xml.defaults/%gconf-tree.xml文件中添加以下內容

x-cheme-handler/testfile=testfile.desktop application/x-testfile=testfile.desktop application/testfile=testfile.desktop

? ? 然后在~/.local/share/applications/mimeapps.list文件中添加以下內容

[Default Applications] //這一行必須要有
x-scheme-handler/testfile=testfile.desktop application/x-testfile=testfile.desktop application/testfile=testfile.desktop

4.

? ?之后在firefox地址欄中輸入testfile://就能彈出你想要打開的程序

轉載于:https://www.cnblogs.com/flyingdirt/p/3776903.html

總結

以上是生活随笔為你收集整理的ubuntu 配置url地址重定向协议的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。