无法通过X11打开firefox浏览器

时间:2017-08-06 05:00:12

标签: amazon-web-services firefox amazon-ec2 x11

当我尝试通过X11在ec2实例(centos / 7)上启动firefox时,出现错误。 有办法解决这个问题吗? 我已经确认可以启动其他GUI应用程序,如xeyes或eog,可以启动。

的Env

ec2方面 操作系统:Centos 7.3.1611(核心)
SELinux:执行中 xauth版本:1.0.9
xterm版本:X.Org 7.6.0(295)
xorg-x11-apps.x86_64:7.7-6.el7

$ sudo cat /etc/ssh/sshd_config
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication no
ChallengeResponseAuthentication no
GSSAPIAuthentication yes
GSSAPICleanupCredentials no
UsePAM yes
X11Forwarding yes
X11UseLocalhost no
UsePrivilegeSeparation sandbox          # Default for new installations.
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
Subsystem sftp  /usr/libexec/openssh/sftp-server
当地方面

操作系统:Mac OS X 10.11.6
XQuartz版本:2.7.11(xorg-server 1.18.4)

$ sudo cat /etc/ssh/sshd_config
# Apple:
 Host *
   SendEnv LANG LC_*
Host *
    XAuthLocation /opt/X11/bin/xauth

复制方案

# ec2 side
sudo yum -y install xauth xterm xorg-x11-apps xeyes
exit

# local side
ssh -X fhiyo@ec2-xx-xx-xx-xx.ap-northeast-1.compute.amazonaws.com

# ec2 side
xeyes  # OK

sudo yum -y install eog
eog path/to/sample.png  # OK

sudo yum -y install firefox
$ firefox
[Parent 20819] WARNING: pipe error (36): Connection reset by peer: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 322

###!!! [Parent][MessageChannel] Error: (msgtype=0x46000E,name=PContent::Msg_NotifyLayerAllocated) Channel error: cannot send/recv

...

[Parent 20819] WARNING: FileDescriptorSet destroyed with unconsumed descriptors: file /builddir/build/BUILD/firefox-52.2.0/firefox-52.2.0esr/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc, line 22

###!!! [Parent][MessageChannel] Error: (msgtype=0x2C0085,name=PBrowser::Msg_Destroy) Channel error: cannot send/recv

firefox_crashed

2 个答案:

答案 0 :(得分:1)

在CentOS 7上启动带有X11转发的Firefox版本52.3.0时,我遇到了类似的问题:

警告:管道错误(35):Connexionré-initialiséeparle Corresponant:file /builddir/build/BUILD/firefox-52.3.0/firefox-52.3.0esr/ipc/chromium/src/chrome/ common / ipc_channel_posix.cc,第322行

同样的错误(法语)在firefox上“Gah,你的标签只是崩溃”

为了纠正这个问题,我首先尝试更新所有包但没有成功。 所以我结合了网上找到的两个解决方案:

1-我打开了“about:config”页面(只需在url字段中键入about:config然后输入)并将两个选项browser.tabs.config.autostart和browser.tabs.config更改为“false”。 autostart2

2-我打开了“about:support”页面,然后点击“修复Firefox ...”

然后它的作品!但我仍然有以下问题:我每次重新启动Firefox时都需要这样做;所以我不应该关闭所有标签。

答案 1 :(得分:-1)

检查SELinux配置。在特殊检查中启用了mozilla_plugin_can_network_connect。您可以执行:getsebool mozilla_plugin_can_network_connect如果答案为off,则执行setsebool -P mozilla_plugin_can_network_connect=1。然后再试一次firefox&