- Docker containers cannot launch host applications (e.g., macOS Finder) because they are isolated from the host OS.
- The Gradio frontend runs in a container and cannot run
open,xdg-open, orstarton the host. - This small FastAPI service runs on the host and receives a path from the frontend, then asks the host OS to open that path.
- Python 3.10+ on the host (outside Docker).
eval "$(python setup_env.py)"
cd open_dir_server
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtEnvironment variables (PLANEXE_ prefixed):
PLANEXE_OPEN_DIR_SERVER_HOST(default127.0.0.1)PLANEXE_OPEN_DIR_SERVER_PORT(default5100)PLANEXE_HOST_RUN_DIR: required; only allow opening paths under this directory.
Frontend configuration:
- Set
PLANEXE_OPEN_DIR_SERVER_URLso the container can reach the host service (e.g.,http://host.docker.internal:5100).
From open_dir_server:
eval "$(python setup_env.py)"
source venv/bin/activate
python app.pyThe service will listen on PLANEXE_OPEN_DIR_SERVER_HOST:PLANEXE_OPEN_DIR_SERVER_PORT.
- Press
Ctrl+Cin the terminal where it is running.