Skip to content

Support unix-based X11 server connections as well as TCP-based ones #456

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,12 +281,12 @@
"number",
"string"
],
"description": "Port to redirect X11 data to (by default port = display + 6000)",
"description": "TCP port to redirect X11 data to (by default port = display + 6000); raw display number for unix domain connection",
"default": 6000
},
"x11host": {
"type": "string",
"description": "Hostname/ip to redirect X11 data to",
"description": "Hostname/ip to redirect X11 data to; empty string for a unix domain connection",
"default": "localhost"
},
"remotex11screen": {
Expand Down Expand Up @@ -455,12 +455,12 @@
"number",
"string"
],
"description": "Port to redirect X11 data to (by default port = display + 6000)",
"description": "TCP port to redirect X11 data to (by default port = display + 6000); raw display number for unix domain connection",
"default": 6000
},
"x11host": {
"type": "string",
"description": "Hostname/ip to redirect X11 data to",
"description": "Hostname/ip to redirect X11 data to; empty string for a unix domain connection",
"default": "localhost"
},
"remotex11screen": {
Expand Down Expand Up @@ -755,15 +755,15 @@
},
"x11host": {
"type": "string",
"description": "Hostname/ip to redirect X11 data to",
"description": "Hostname/ip to redirect X11 data to; empty string for a unix domain connection",
"default": "localhost"
},
"x11port": {
"type": [
"number",
"string"
],
"description": "Port to redirect X11 data to (by default port = display + 6000)",
"description": "TCP port to redirect X11 data to (by default port = display + 6000); raw display number for unix domain connection",
"default": 6000
},
"remotex11screen": {
Expand Down
5 changes: 4 additions & 1 deletion src/backend/mi2/mi2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ export class MI2 extends EventEmitter implements IBackend {
const xclientsock = accept();
xclientsock.pipe(xserversock).pipe(xclientsock);
});
xserversock.connect(args.x11port, args.x11host);
if (args.x11host !== "")
xserversock.connect(args.x11port, args.x11host);
else
xserversock.connect(`/tmp/.X11-unix/X${args.x11port}`);
});
}

Expand Down