Opera (简体中文)

From ArchWiki
Revision as of 03:53, 1 March 2017 by Kingofthepirates (talk | contribs) (更新翻译至“外观”以前)
Jump to navigation Jump to search

Tango-preferences-desktop-locale.png本页面需要更新翻译,内容可能已经与英文脱节。要贡献翻译,请访问简体中文翻译组Tango-preferences-desktop-locale.png

附注: please use the first argument of the template to provide more detailed indications.

Opera浏览器,是一款自1994年以来由挪威Opera Software公司开发的免费浏览器软件。该浏览器因曾经最先引入诸如标签式浏览、内置搜索等功能而闻名。

安装

Opera 26 于 2014 年 12 月上旬发布;它仅仅提供了 64 位版本。作为一个里程碑,从此以后,旧的专有 Presto 排版引擎被更先进的开源引擎 Blink 所替代。之前的 12.16 版本仍然支持 32 位系统。

Opera 可以在 官方软件仓库安装。官方仓库为 x86_64 架构的系统提供新的 Blink 版本 Opera,而为 i686 架构的系统提供旧的 Presto 版本的 Opera。

12.16 版 Opera 同样可以在 AURopera-legacyAUR 中找到,包含 x86_64 以及 i686 架构的支持。

插件

有关不同插件和安装说明的详细信息,请参阅Browser plugins。注意,Opera不再支持Netscape插件API(NPAPI),而只支持较新的Pepper插件API(PPAPI)。

Adblock

提示: Opera也有一个内置的广告拦截器,可以在设置中启用。

安装 opera-adblock-completeAUR 软件包以获取 Adblock 支持。

性能调整

虽然Opera在现代硬件上运行相当快,但可以进一步调整。有关更多示例,请参阅 Opera Wiki page

禁用功能和服务

最大化应用程序性能的关键之一,是通过opera:config Preferences Editor.禁用不需要的功能和服务。

一些不需要的功能:

  • Systray Icon: uncheck Show Tray Icon under opera:config#UserPrefs.
  • BitTorrent: uncheck Enable under opera:config#BitTorrent.
  • Geolocation: uncheck Enable geolocation under opera:config#Geolocation.
  • Multimedia: unckeck desired options under opera:config#Multimedia.
  • Web Server: uncheck Enable under opera:config#Web Server.

为了更容易找到这些选项,只需在地址栏中输入相应的路径(无空格)即可。 例如 opera:config#UserPrefs|ShowTrayIcon或者使用内置搜索。

Profile in tmpfs

将浏览器配置文件重新定位到 tmpfs文件系统,包括 / tmp,以改进应用程序响应,因为整个配置文件现在都存储在RAM中。另一个好处是减少了磁盘读写操作,其于SSD最为有利。

目前有两种方法:

  • 使用Profile-sync-daemon,自动检测并将Opera配置文件重定位到tmpfs。
  • 使用 -pd命令行标志告诉Opera在哪里存储其配置文件数据:
$ opera -pd /tmp/opera

外观

主题

虽然Opera是跨平台的,但是它可以在不同版本的 Linux 桌面环境中工作得很好。

Qt
安装并通过应用qtconfig来使用你的 Qt,这样可以使你的菜单更加丰富。
KDE
你能够安装一个像这样[dead link 2014-04-05]的主题使你的 Opera 使用KDE的图标。
GTK+
一个很棒的使用 Tango 图标的主题clicked here[dead link 2014-04-05].

标题栏

在标签栏点击鼠标右键取消选中“显示边框”可以隐藏标题栏。

标签模式

Opera原生支持标签级联和平铺模式上。可以通过激活“主”工具栏或通过拖放所需的任何位置上的按钮可以找到适当的按钮 Menu > Appearance > Buttons > Browser.

字体

可以在 Settings > Preferences... > Advanced > Fonts下配置字体.

如果在第一次运行Opera之前已经安装ttf-ms-fontsAUR软件包。不管是由本地 GTK+ 选项GNOME还是 KDE 字体管理器指定,Opera都将使用默认字体配置。要强制已经安装的Opera使用系统设置选项:

  • Close all running instances of Opera.
  • Un-install the ttf-ms-fontsAUR package.
  • Move the existing profile folder: mv -i ~/.opera ~/.opera.bak
  • Run an instance of Opera and verify that your font manager settings have been applied.
  • Restore bookmarks and desired filter files from ~/.opera.bak to ~/.opera except for the operaprefs.ini file.
  • Re-install the ttf-ms-fontsAUR package, if desired.
Note: If no text except numbers is showing on some of the webpages that might be a problem with the fonts. A known issue that causes this problem is the helvetica pfb postscript fonts.

私有标签

如果你要浏览你访问过却没有留下明显痕迹的网站节点,你可以使用私有标签。当你关闭私有标签的时候,下面相关的数据将被删除:

  • Cache
  • Cookies
  • History
  • Logins

--incognito option Chrome/ChromiumPrivateBrowsing Firefox这是很相似的.

使用命令行去打开一个私有标签:

$ opera -newprivatetab

为了确保整个会话持续时间只有私有标签使用:

  • Set Settings > Preferences... > General > Startup > Start without open tabs.
  • Clear any entries in Settings > Preferences... > General > Home page option.
  • Enable Settings > Preferences... > Advanced > Tabs > Additional tab options... > Allow windows with no tabs.

当你已经Opera的时候,你想打开一个私有标签,你能按 Ctrl+Shift+N 或者查看 Menu > New Tabs and Windows > New Private Window. 随后打开的所有标签也是私有的。

辅助提示

禁用文本选择

在Opera上可以禁用文本选择。然而,JavaScript的文本选择将一直工作(例如 in forms, etc.). 通过以下方法设置:

opera:config#System|DisableTextSelect

Grab and scroll mode

Besides setting text selection off, grab and scroll mode makes page scrolling possible with mouse dragging. It is very useful, especially when you have a touchscreen. Copy and paste the link bellow to get to the mentioned setting.

opera:config#UserPrefs|ScrollIsPan

It is also possible to change this setting on the fly by dragging and dropping the appropriate Opera button into a toolbar. The button can be found in Menu > Appearance > Buttons > Browser View.

Long pressing a link opens it in a background tab (extension)

It is possible to open up any long-clicked link in a new background tab by installing this extension.

虚拟屏幕键盘 (扩展)

有一个允许使用虚拟屏幕键盘的扩展。可以在 here上找到更进一步的细节和安装链接。

故障排除

NVIDIA 显卡上出现条纹

运行下面的命令:

$ nvidia-settings -a InitialPixmapPlacement=2

在某些计算机上, http://helion.pl 运行及其缓慢,使它成为一个完美的测试节点。

卧式鼠标滚轮滚动

Check Settings > Preferences... > Advanced > Shortcuts > Mouse > Middle-Click Options... > Enable horizontal panning.

or

  • Highlight Settings > Preferences... > Advanced > Shortcuts > Mouse > Opera Standard.
  • Duplicate Settings > Preferences... > Advanced > Shortcuts > Mouse > Opera Standard.
  • Edit... Settings > Preferences... > Advanced > Shortcuts > Mouse > Copy of Opera Standard.
  • Search the Forward and Back input contexts and edit the appropriate button shortcuts to scroll left and scroll right.
  • Rename Settings > Preferences... > Advanced > Shortcuts > Mouse > Copy of Opera Standard as desired.

启动外部浏览器

如果Opera不能很好的显示网站,一个解决方案是在外部浏览器中显示当前显示的网页。

Note: The following method appears to be deprecated in favor of the built-in Open With menu accessed via the right mouse button.
  • $HOME/.opera/toolbar/standard_toolbar.ini中设置下面的行[Site Navigation Toolbar.content]:
Button0, "Chromium"="Execute program, "chromium, "%u", , "Chromium""
  • 如果需要 firefox,或者是首选:
Button0, "Firefox"="Execute program, "firefox", "%u", , "Firefox""
  • 任意数量的命令行选项可以被包括在字符串中:
Button0, "Chromium"="Execute program, "chromium --block-nonsandboxed-plugins --disable-java --incognito --safe-plugins --start-maximized --user-data-dir=/tmp/.chromium", "%u", , "Chromium""

Opera crashes when starting or closing with GTK+ 2.24.7+

If this crash occurs, you can work around it by changing the DialogToolkit option to 4:

opera:config#FileSelector|DialogToolkit

This will disable GTK+ styling support and hence avoid the issue.

Unreadable input fields and address bar with dark GTK+ themes

When using a dark GTK theme, one might encounter Opera address bar and Internet pages with unreadable input and text fields (e.g. Amazon can have black text on black text field background). This can happen because the site only sets either background or text color, and Opera takes the other one from the theme.

Using an installed clear theme and a command help to work around the problem: env GTK2_RC_FILES=/usr/share/themes/<light-theme-name/gtk-2.0/gtkrc opera

to turn it as default, use a prefered text editor and edit the file /usr/bin/opera. e.g. using Opera 12.14:

sudo gedit /usr/bin/opera
...
#!/bin/sh
export OPERA_DIR=${OPERA_DIR:-/usr/share/opera}
export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-$HOME/.opera}
exec /usr/lib/opera/opera "$@"

edit the file and follow the example changing to...

/usr/bin/opera
...
#!/bin/sh
export OPERA_DIR=${OPERA_DIR:-/usr/share/opera}
export OPERA_PERSONALDIR=${OPERA_PERSONALDIR:-$HOME/.opera}
env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc /usr/lib/opera/opera "$@"

this will make the browser use a clear theme that you set in the file /usr/bin/opera that was used in the above example the theme "Clearlooks" and the problems will be solved.

See Also