Opera (简体中文)

From ArchWiki
Jump to navigation Jump to search

zh-CN:Opera

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 浏览器仍在不断开发创新。它的特色功能包括集成的邮件客户端、一键保存书签、标签栈(一种特别的标签组织方式)以及对 HTML5 的良好支持。

Opera 是跨平台浏览器,可以在 Windows, Mac 和 Linux 上运行。

安装

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

Opera 可以在 官方软件仓库安装。官方仓库为 x86_64 架构的系统提供新的 Blink 版本 Opera,而为 i686 架构的系统提供旧的 Presto 版本的 Opera。另外,你可以通过添加archlinuxcn源后安装opera的beta分支与dev分支。

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

插件

Opera可以使用大多数主流浏览器所支持的,基于Netscape的插件。 详见 Browser plugins. opera的插件选项见 Settings > Preferences... > Advanced > Content > Plug-in Options.

Adobe Flash

请见: Browser plugins#Flash Player

Java 支持

请见 the main article: Browser plugins#Java (IcedTea)

Adblock

可以安装 AURopera-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或者使用内置搜索。

禁用电子邮件客户端

其他命令行选项可用于进一步控制浏览器的功能和服务。不使用默认的内部电子邮件客户端启动Opera:

$ opera -nomail

另外,如果你想永久禁止内部电子邮件客户端,你可以取消选中opera:config#UserPrefs下的' '显示电子邮件客户端选项。

禁用 ARGB, LIRC and mailto links

没有ARGB (32-bit)的视觉效果开启Opera。 LIRC infrared control support and with mailto: 禁用链接:

$ opera -noargb -nolirc -nomaillinks

提高Flash性能

为了提高Flash的性能,在启动Opera之前你要设置以下环境变量,在xinitrc, 或者 ~/.bash_profile中export条目,或者全系统改变/etc/profile

 OPERAPLUGINWRAPPER_PRIORITY=0
 OPERA_KEEP_BLOCKED_PLUGIN=1

另外一个能帮你解决Flash问题的环境变量:

GDK_NATIVE_WINDOWS=1

看博客Linux上的Flash问题?去添加细节。

.xinitrc 例子

~/.xinitrc
...
export OPERAPLUGINWRAPPER_PRIORITY=0
export OPERA_KEEP_BLOCKED_PLUGIN=0
...

命令行例子

使用命令行变量作为Opera:

$ OPERAPLUGINWRAPPER_PRIORITY=0 OPERA_KEEP_BLOCKED_PLUGIN=1 opera &

Profile in tmpfs

Relocate the browser profile to a tmpfs filesystem, including /tmp for improvements in application response as the entire profile is now stored in RAM. Another benefit is a reduction in disk read and write operations, of which SSDs benefit the most.

There are currently two ways of doing this:

  • using Profile-sync-daemon, that automatically detects and relocates the Opera profile to tmpfs.
  • using the -pd command-line flag to tell Opera where to store its profile data:
$ opera -pd /tmp/opera

外观

主题

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

Qt
To make the menus look integrated with Qt, install your preferred Qt theme and apply it by using qtconfig.
KDE
To make Opera use KDE icons, you can install a theme such as this one[dead link 2014-04-05].
GTK+
A nice GTK+ skin that uses the Tango icon theme can be found 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