mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-01 08:49:56 +00:00
parent
bbb02f4e64
commit
b2b91f0cfd
@ -371,7 +371,7 @@ export class SSHSession extends BaseSession {
|
||||
|
||||
this.ssh.on('x11', async (details, accept, reject) => {
|
||||
this.logger.info(`Incoming X11 connection from ${details.srcIP}:${details.srcPort}`)
|
||||
const displaySpec = process.env.DISPLAY ?? 'localhost:0'
|
||||
const displaySpec = (this.config.store.ssh.x11Display || process.env.DISPLAY) ?? 'localhost:0'
|
||||
this.logger.debug(`Trying display ${displaySpec}`)
|
||||
|
||||
const socket = new X11Socket()
|
||||
|
@ -7,7 +7,7 @@ export class X11Socket {
|
||||
|
||||
static resolveDisplaySpec (spec?: string|null): SocketConnectOpts {
|
||||
// eslint-disable-next-line prefer-const
|
||||
let [xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
|
||||
let [_, xHost, xDisplay] = /^(.+):(\d+)(?:.(\d+))$/.exec(spec ?? process.env.DISPLAY ?? 'localhost:0') ?? []
|
||||
if (process.platform === 'win32') {
|
||||
xHost ??= 'localhost'
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user