readmes and license stuff

This commit is contained in:
2025-08-02 15:22:19 -04:00
parent bd99ec1c63
commit e253bb485b
2 changed files with 73 additions and 0 deletions

8
LICENSE.MD Normal file
View File

@@ -0,0 +1,8 @@
Copyright (c) 2025, EzTerry
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

65
README.md Normal file
View File

@@ -0,0 +1,65 @@
# X11Proxy
X11Proxy is a lightweight X11 proxy designed for containerized environments. It provides an AF_UNIX socket for Docker containers to connect to the host's X11 display, enabling GUI applications to run inside containers with minimal setup.
## Features
- Proxies X11 connections from a UNIX socket (default: `:5`) to the host's current `$DISPLAY`.
- Simple, minimal codebase.
- Ideal for Docker and other container runtimes.
- No complex configuration required.
## Use Case
Run GUI applications inside Docker containers by exposing a UNIX socket for X11 forwarding.
## Quick Start
### 1. Start X11Proxy
```bash
x11proxy
```
By default, this will listen on `/tmp/.X11-unix/X5` and forward to your current `$DISPLAY`.
### 2. Run a Docker Container
Mount the proxy socket into your container and set `DISPLAY` accordingly:
```bash
docker run -it \
-e DISPLAY=:5 \
-v /tmp/.X11-unix/X5:/tmp/.X11-unix/X5 \
x11-app-image
```
Replace `x11-app-image` with your GUI application's image.
### 3. Example: Running xeyes
```bash
docker run -it \
-e DISPLAY=:5 \
-v /tmp/.X11-unix/X5:/tmp/.X11-unix/X5 \
x11docker/xeyes
```
Alternatively, you can use a custom script such as `hello_xclock.sh` to run `xclock` inside a Docker container:
```bash
./hello_xclock.sh
```
This script should mount the proxy socket and set the `DISPLAY` variable appropriately, demonstrating how to launch GUI applications with minimal setup.
## Security
- The proxy socket is protected by file permissions (0700), ensuring only your user can access it.
- For remote X sessions, valid `xauth` credentials are required. X11Proxy injects these credentials into the connection automatically, so your Docker container does not need to have your `xauth` file.
## License
BSD 2-Clause License. See [https://opensource.org/license/bsd-2-clause](https://opensource.org/license/bsd-2-clause) for details.
## Credits
Inspired by [X11Docker](https://github.com/mviereck/x11docker), but with a minimal approach.