Open IanTrudel opened 10 months ago
Maybe add -nolisten udp too? It is listening to unix sockets too (local/unix:@/tmp/.ICE-unix/466144,unix/unix:/tmp/.ICE-unix/466144)... Seems like by default it wants to listen to everything and doesn't fail very gracefully?
GLASS_DEBUGGER="" BUILD="build" XSERVERPATH="/usr/bin/Xephyr" XSERVEROPTS=":100 -ac -screen 1280x768x24 -host-cursor -extension MIT-SHM -nolisten tcp -nolisten udp" scripts/xstartup.sh
_XSERVTransTransNoListen: unable to find transport: udp
This is confusing. The hardest thing about InfiniteGlass is reproducibility. For example, I managed to make it run on Arch Linux in a VM but not on an actual machine. Currently testing on Rocky Linux (on another machine) and still has troubles. The fixes in the esoteric branch improved things, including make run-in-docker
but something ain't right. Also tried xhost +
and used xauth
to remove the IPv6 address.
By the way, GNOME is ending its support for X11 in favour of Wayland. I'm willing to commit to InfiniteGlass and be an active contributor.
A simple ICE client-server revealed that those are only warnings. They do not prevent a connection from being established. I had to read the document that you referred in REFERENCES.MD
and try a few things out. Still left with a blank Xephyr window and no explanation for it, though.
Here is a bit more info on the topic. You may close this issue if you think we can move on.
Sample output from ice_server:
IceTransSocketOpenCOTSServer: Unable to open socket for inet6
_IceTransOpen: transport open failed for inet6/home:
_IceTransMakeAllCOTSServerListeners: failed to open listener for inet6
Number of transports: 3
Listening on: inet/home:44015
Listening on: local/unix:@/tmp/.ICE-unix/1233756
Listening on: unix/unix:/tmp/.ICE-unix/1233756
Accepted a connection
Building instructions
gcc ice_client.c -o ice_client -lICE
gcc ice_server.c -o ice_server -lICE
ice_server.c
#include <stdio.h>
#include <stdlib.h>
//#include <ICE/ICElib.h>
#include "/usr/include/X11/ICE/ICElib.h"
void protocolSetupProc(IceConn iceConn, int opcode, IcePointer clientData, int *authCountRet, char ***authNamesRet, IcePointer **authDataRet) {
*authCountRet = 0;
*authNamesRet = NULL;
*authDataRet = NULL;
}
void ioErrorProc(IceConn iceConn) {
printf("IO error occurred.\n");
}
int main() {
IceListenObj *listenObjs;
int numTransports;
IceConn iceConn;
IceAcceptStatus status;
char errorString[128];
int errorLength = sizeof(errorString);
IceIOErrorHandler(ioErrorProc);
if (!IceListenForConnections(&numTransports, &listenObjs, errorLength, errorString)) {
printf("Failed to listen for ICE connections. Error: %s\n", errorString);
return 1;
}
printf("Number of transports: %d\n", numTransports);
for (int i = 0; i < numTransports; ++i) {
char *addr = IceGetListenConnectionString(listenObjs[i]);
printf("Listening on: %s\n", addr);
free(addr);
}
while (1) {
iceConn = IceAcceptConnection(listenObjs[0], &status);
if (iceConn) {
printf("Accepted a connection\n");
IceSetShutdownNegotiation(iceConn, False);
} else {
printf("Failed to accept connection.\n");
break;
}
}
IceFreeListenObjs(numTransports, listenObjs);
return 0;
}
ice_client.c
#include <stdio.h>
#include <stdlib.h>
//#include <ICE/ICElib.h>
#include "/usr/include/X11/ICE/ICElib.h"
void ioErrorProc(IceConn iceConn) {
printf("IO error occurred.\n");
}
int main(int argc, char *argv[]) {
if (argc != 2) {
printf("Usage: %s <port_number>\n", argv[0]);
return 1;
}
int port_number = atoi(argv[1]);
char networkId[50];
snprintf(networkId, sizeof(networkId), "localhost:%d", port_number);
IceConn iceConn;
char errorString[128];
int errorLength = sizeof(errorString);
int majorOpcodeCheck = 0; // Opcode to check; 0 typically means "don't care"
IceIOErrorHandler(ioErrorProc);
iceConn = IceOpenConnection(networkId, NULL, False, majorOpcodeCheck, errorLength, errorString);
if (iceConn) {
printf("Connected to ICE server.\n");
} else {
printf("Failed to connect to ICE server. Error: %s\n", errorString);
return 1;
}
IceCloseConnection(iceConn);
return 0;
}
"By the way, GNOME is ending its support for X11 in favour of Wayland. I'm willing to commit to InfiniteGlass and be an active contributor."
As you've noticed, I've had very little time for InfiniteGlass (or any other hobby dev for that sake) lately, and I will have even less soon, as me and my girlfriend are expecting a child in January.
That said, it is awesome if you want to do development, and I will try to answer any questions I can!
This is a fantastic news! May you all be a happy family!
Your guidance will be more than enough. One thing that would really be helpful is to see your development workflow when you work (and debug) on InfiniteGlass. You could perhaps make a small narrated video whenever you have time. I'm still not finding my footing when working on it, spending my time rereading my notes, your documentation, the issue tracker, etc.
Last time I couldn't run the unit test anymore (see #95) with the error ModuleNotFoundError: No module named 'InfiniteGlass'
despite InfiniteGlass being able to run. It's strange, the least to say. I wanted to run the test suite again with the few changes made on #92 (malformed SVG).
I should be able to make progress on #88. I have been using pdm for a while now (on various projects) and it handles venv, dependencies and cython extremely well.
When you got that error, had you enabled the python virtualenv?
When you got that error, had you enabled the python virtualenv?
Yes, I did enable it.
ICE seems to have troubles with IPv6 addresses. I hadn't noticed until now. Running the
make
command is indeed opening Xephyr, which is configured with-nolisten tcp
. Shouldn't it use UNIX sockets?After blocking IPv6 in grub: