1

我在指定显示中运行 Google Chrome 时遇到问题:

vncserver :11 -geometry 1024x2000
google-chrome --display :11

vncerver启动正常,bot 浏览器在当前显示中运行,而不是:11. 下面是一些日志:

New 'localhost:11 (hsz)' desktop is localhost:11

Starting applications specified in /home/hsz/.vnc/xstartup
Log file is /home/hsz/.vnc/freedomes:11.log

/home/hsz/.vnc/freedomes:11.log

Xvnc TigerVNC 1.3.1 - built Mar 20 2014 13:14:03
Copyright (C) 1999-2011 TigerVNC Team and many others (see README.txt)
See http://www.tigervnc.org for information on TigerVNC.
Underlying X server release 11500000, The X.Org Foundation

Initializing built-in extension VNC-EXTENSION
Initializing built-in extension Generic Event Extension
Initializing built-in extension SHAPE
Initializing built-in extension MIT-SHM
Initializing built-in extension XInputExtension
Initializing built-in extension XTEST
Initializing built-in extension BIG-REQUESTS
Initializing built-in extension SYNC
Initializing built-in extension XKEYBOARD
Initializing built-in extension XC-MISC
Initializing built-in extension XFIXES
Initializing built-in extension RENDER
Initializing built-in extension RANDR
Initializing built-in extension COMPOSITE
Initializing built-in extension DAMAGE
Initializing built-in extension MIT-SCREEN-SAVER
Initializing built-in extension DOUBLE-BUFFER
Initializing built-in extension RECORD
Initializing built-in extension DPMS
Initializing built-in extension X-Resource
Initializing built-in extension XVideo
Initializing built-in extension XVideo-MotionCompensation
Initializing built-in extension GLX

Fri Jun 13 12:24:32 2014
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5911
 vncext:      created VNC server for screen 0

Fri Jun 13 12:24:44 2014
 Connections: accepted: 127.0.0.1::50815
 SConnection: Client needs protocol version 3.8
 SConnection: Client requests security type VeNCrypt(19)
 VNCSConnST:  Server default pixel format depth 24 (32bpp) little-endian rgb888

google-chrome --display :11

[6658:6658:0613/122602:ERROR:nss_util.cc(853)] After loading Root Certs, loaded==false: NSS error code: -8018
Created new window in existing browser session.

调用后:

DISPLAY=localhost:11.0 google-chrome

我得到:

[7212:7212:0613/123350:ERROR:nss_util.cc(853)] After loading Root Certs, loaded==false: NSS error code: -8018
Xlib:  extension "GLX" missing on display "localhost:11.0".
[7242:7242:0613/123351:ERROR:gl_surface_glx.cc(407)] glxQueryVersion failed
[7242:7242:0613/123351:ERROR:gl_surface_x11.cc(56)] GLSurfaceGLX::InitializeOneOff failed.
[7242:7242:0613/123351:ERROR:gpu_child_thread.cc(132)] Exiting GPU process due to errors during initialization
Created new window in existing browser session.
4

2 回答 2

1

您可以使用 DISPLAY 环境变量指定要使用的显示器。

使用以下代码段:

# export DISPLAY=localhost:11.0
# google-chrome --disable-webgl

VNC 服务器不支持 OpenGL 扩展。这--disable-webgl是为了确保 Chrome 不会尝试使用 OpenGL/WebGL。

于 2014-06-13T10:32:30.810 回答
0

这适用于 Chromium 59.0.3071.86

检查现有的 VNC 会话

vncserver -list                                                                                                                                           
TigerVNC server sessions:                                                                                                                                                                                                                                                                     
X DISPLAY #     PROCESS ID                                                                                                                     
:1              20013

执行铬作为

DISPLAY=:1.0 chromium
于 2017-06-15T17:17:32.457 回答