默认 gnome 浏览器打开开始页面

默认 gnome 浏览器打开开始页面

令人恼火的是,当我单击应用程序中的链接(我使用 Quassel)时,firefox 会打开默认的开始页。

我有一个不太标准的配置设置。我使用的是 Firefox 的夜间版本,二进制文件位于 /opt/nightly/firefox。我有一个从 /usr/bin/firefox -> /opt/nightly/firefox 的符号链接。我有 Ubuntu 11.04,使用 Gnome 和 Docky。我的 docky 面板上有一个 Firefox 图标,可以正确使用我想要的 Firefox,但是当我单击 Quassel 等应用程序中的链接时,它只会打开默认的起始页,而不是我想要导航到的链接。此外,它会在新窗口中打开,而不是在我现有的会话中创建一个新选项卡。

我尝试使用 gconf-editor,命令gconftool-2 -R /desktop/gnome/url-handlers给出如下信息:

 /desktop/gnome/url-handlers/unknown:
  command = firefox "%s"
  needs_terminal = false
 /desktop/gnome/url-handlers/net:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/msnim:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/chrome:
  command = firefox "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/rtsp:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/cdda:
  command = sound-juicer %s
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/ftp:
  command = firefox "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/ut:
  command = /usr/share/ubuntu-tweak/uturl "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/uvox:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/h323:
  command = ekiga -c %s
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/about:
  command = firefox "%s"
  needs_terminal = false
 /desktop/gnome/url-handlers/mailto:
  command = thunderbird %s
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/sip:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/xmpp:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/vnc:
  command = vinagre %s
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/http:
  command = firefox "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/mmsh:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/rtp:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/mms:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/irc:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/pnm:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/callto:
  command = gnomemeeting -c %s
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/https:
  command = firefox "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/gg:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/trash:
  command = nautilus "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/ghelp:
  command = gnome-help "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/icq:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/ymsgr:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/icy:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/magnet:
  command = transmission '%s'
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/note:
  command = tomboy --open-note '%s'
  enabled = true
 /desktop/gnome/url-handlers/info:
  command = gnome-help "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/apt:
  command = apturl "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/man:
  command = gnome-help "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/icyx:
  command = totem "%s"
  needs_terminal = false
  enabled = true
 /desktop/gnome/url-handlers/webcal:
  command = /usr/lib/evolution-webcal/evolution-webcal %s
  need-terminal = false
  enabled = true
 /desktop/gnome/url-handlers/aim:
  command = purple-url-handler "%s"
  needs_terminal = false
  enabled = true

答案1

我遇到了完全相同的问题,下面是解决方法:

  1. 使用编辑器打开文件~/.local/share/applications/firefox.desktop
  2. 找到该行Exec: firefox(在我的例子中是第 149 行)
  3. 附加%u到它,这样 URL 就会被传递:Exec: firefox %u
  4. 测试一下xdg-open http://askubuntu.com

就是这样,它现在应该可以按预期工作了。

相关内容