我尝试通过 SSH 启动 Firefox,使用
ssh -X user@hostname
Run Code Online (Sandbox Code Playgroud)
进而
firefox -no-remote
Run Code Online (Sandbox Code Playgroud)
但它非常非常慢。
我怎样才能解决这个问题?是连接问题吗?
Ari*_*iel 38
远程启动某些 X 客户端时最大的问题之一是 X 协议,而不是 ssh 开销!X 协议需要在客户端和服务器之间进行大量的乒乓操作,这在远程应用程序的情况下绝对会降低性能。
尝试类似“x2go”(它也使用默认设置通过 ssh)之类的东西,您会注意到相比之下,firefox“飞行”了!
一些发行版提供了开箱即用的 x2go 软件包,例如 Debian 测试或 Stable-Backports。但如果没有,请参阅http://wiki.x2go.org/doku.php/download:start,它们为许多发行版提供预构建的二进制包/存储库。您应该安装 x2goclient(在您想要“使用”firefox 的计算机上)和 x2goserver(在应该运行 firefox 的计算机上),然后您可以为单个 X 应用程序配置会话以获取完整的桌面视图等。连接本身通过 ssh 发生。这是一个非常棒的工具:)
要使用它,请运行“x2goclient”,它会启动一个 GUI,您可以在其中创建新会话:您提供服务器的 dns 名称、端口、ssh 数据等,然后选择“会话类型”,即,如果例如,您想要一个完整的远程 KDE 或 GNOME 桌面,或者只是一个“单个应用程序”,然后在那里输入“firefox”。
ter*_*don 27
默认的 ssh 设置会导致连接速度很慢。请尝试以下操作:
ssh -YC4c arcfour,blowfish-cbc user@hostname firefox -no-remote
Run Code Online (Sandbox Code Playgroud)
使用的选项是:
-Y Enables trusted X11 forwarding. Trusted X11 forwardings are not
subjected to the X11 SECURITY extension controls.
-C Requests compression of all data (including stdin, stdout,
stderr, and data for forwarded X11 and TCP connections). The
compression algorithm is the same used by gzip(1), and the
“level” can be controlled by the CompressionLevel option for pro?
tocol version 1. Compression is desirable on modem lines and
other slow connections, but will only slow down things on fast
networks. The default value can be set on a host-by-host basis
in the configuration files; see the Compression option.
-4 Forces ssh to use IPv4 addresses only.
-c cipher_spec
Selects the cipher specification for encrypting the session.
For protocol version 2, cipher_spec is a comma-separated list of
ciphers listed in order of preference. See the Ciphers keyword
in ssh_config(5) for more information.
Run Code Online (Sandbox Code Playgroud)
这里的要点是使用不同的加密密码,在这种情况下是比默认值更快的 arcfour,并压缩正在传输的数据。
注意:我非常非常远不是这方面的专家。上面的命令是我在某处的博客文章中找到后使用的命令,我注意到速度有了巨大的提高。我相信下面的各种评论者都知道他们在谈论什么,并且这些加密密码可能不是最好的。这个答案中唯一真正相关的部分很可能是使用-C
开关来压缩正在传输的数据。
Seb*_*ian 20
我在使用ssh
隧道通过另一台机器路由流量方面有更好的经验。设置非常容易,因为您无论如何都可以访问 ssh。在计算机的终端中,键入
ssh -vv -ND 8080 user@yourserver
Run Code Online (Sandbox Code Playgroud)
保持这个窗口打开并观察它传递一些关于流经隧道的数据的详细消息。
在 中firefox
,转到首选项 -> 高级 -> 网络 -> 连接:设置。
选择手动代理配置并添加SOCKS v5
代理:
SOCKS Host: localhost Port 8080
Run Code Online (Sandbox Code Playgroud)
通过导航到例如http://whatismyipaddress.com/来检查您的新 IP 。
您可以使用像Foxy 代理这样的 Firefox 插件来动态切换代理。
小智 12
我知道这篇文章已经很老了,但这帮助我通过设置以下内容来克服 Firefox over SSH 缓慢的问题 about:config
gfx.xrender.enabled = true
Run Code Online (Sandbox Code Playgroud)
注意:从 Firefox 47 开始,默认值变为 False。
归档时间: |
|
查看次数: |
44257 次 |
最近记录: |