socketttts
This commit is contained in:
parent
b0a4bb2270
commit
e7c2673576
3
scripts/open-url.sh
Executable file
3
scripts/open-url.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
xdg-open "$1"
|
||||||
|
|
@ -1,5 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SOCKET_ID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 8)
|
||||||
|
|
||||||
|
# Start socat in the background
|
||||||
|
socat UNIX-LISTEN:/tmp/xdg-open$SOCKET_ID.socket,fork EXEC:"xargs -n 1 xdg-open" &
|
||||||
|
|
||||||
|
# Run the Podman container
|
||||||
podman run --rm \
|
podman run --rm \
|
||||||
--name 64gram \
|
--name 64gram \
|
||||||
--hostname 64gram \
|
--hostname 64gram \
|
||||||
@ -12,5 +18,8 @@ podman run --rm \
|
|||||||
-v $HOME/Documents:/root/Documents \
|
-v $HOME/Documents:/root/Documents \
|
||||||
-v /usr/share/icons:/usr/share/icons \
|
-v /usr/share/icons:/usr/share/icons \
|
||||||
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
-v /tmp/.X11-unix:/tmp/.X11-unix \
|
||||||
|
-v /tmp/xdg-open$SOCKET_ID.socket:/tmp/xdg-open.socket \
|
||||||
git.shihaam.dev/dockerfiles/64gram
|
git.shihaam.dev/dockerfiles/64gram
|
||||||
|
|
||||||
|
# Wait for all background processes to finish
|
||||||
|
wait
|
||||||
|
Loading…
x
Reference in New Issue
Block a user