Repository navigation
Fix hardcoded /tmp path for Unix socket in unix_connect - #288
luckyabsoluter wants to merge 1 commit into
Conversation
Problem: - The unix_connect function previously hardcoded /tmp as the directory for the Unix socket path. - This causes compatibility issues on platforms or specific environments that use a different temporary directory, or even lack access to /tmp entirely. Actions: - Imported the tempfile module in unix_connect. - Updated the X11 Unix socket path generation to dynamically use tempfile.gettempdir(). Result: - The Unix socket path now correctly adapts to the system's runtime configuration (e.g., OS defaults or TMPDIR environment variables), improving cross-platform compatibility.
|
Pretty sure the convention IS to use
The one real exception is macOS XQuartz, whose socket lives under |
|
That is a very valid point. While the goal here is to support Termux on Android (where X servers must place their sockets under To solve this without causing regressions on standard Linux, a few alternative approaches were considered:
This narrows the practical solutions down to two main options: 1. Keep the project strictly platform-agnostic: Introduce a dedicated environment variable
2. Allow a Termux-specific branch: Detect
|
Problem:
Actions:
Result: