got rid of tcp, instead using unix sockets

This commit is contained in:
2023-10-04 01:36:53 +05:00
parent f3fef33fb6
commit e0ffbee649
4 changed files with 5 additions and 13 deletions

View File

@ -16,9 +16,6 @@ services:
image: git.shihaam.dev/dockerfiles/64gram
environment:
- DISPLAY # For GUI access
- XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server
extra_hosts:
- docker.host:192.168.x.x # set this to your host machine IP
devices:
- /dev/snd:/dev/snd # Mic and Speaker support
- /dev/video0:/dev/video0 # Webcam support
@ -29,6 +26,7 @@ services:
- $HOME/Documents:/root/Documents # Documents folder
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
- /tmp/xdg-open.socket:/tmp/xdg-open.socket # Add support for xdg-open
```
obviously change the docker.host to your host machines IP. \
and run `podman-compose up -d` or if you wanna live dangerously then you may..: `docker compose up -d`
@ -37,8 +35,6 @@ Telegram cannot open links from the container to host machine, and to work aroun
```bash
#!/bin/bash
XDG_OPEN_LISTENER_PORT=6969
socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"
```
k, thanks, bye

View File

@ -7,9 +7,6 @@ services:
image: git.shihaam.dev/dockerfiles/64gram
environment:
- DISPLAY # For GUI access
- XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server
extra_hosts:
- docker.host:192.168.x.xx # set this to your host machine IP
devices:
- /dev/snd:/dev/snd # Mic and Speaker support
- /dev/video0:/dev/video0 # Webcam support
@ -20,3 +17,4 @@ services:
- $HOME/Documents:/root/Documents # Documents folder
- /usr/share/icons:/usr/share/icons # Icons for UI, like Mouse cursor
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
- /tmp/xdg-open.socket:/tmp/xdg-open.socket # Add support for xdg-open

View File

@ -1,4 +1,2 @@
#!/bin/bash
XDG_OPEN_LISTENER_PORT=6969
socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"

View File

@ -1,3 +1,3 @@
#!/bin/bash
echo $1 | socat - TCP:docker.host:$XDG_OPEN_LISTENER_PORT
echo $1 | socat - UNIX-CONNECT:/tmp/xdg-open.socket