From b83bbe0b68368edd9b033379d329d007b5d24bcd Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Wed, 4 Oct 2023 02:18:09 +0500 Subject: [PATCH] podmanrun --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36c1b3a..a61576d 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,10 @@ here is a script that uses podman run command that does exactly the thing above ```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,fork EXEC:"xargs -n 1 xdg-open" & +socat UNIX-LISTEN:/tmp/xdg-open$SOCKET_ID.socket,fork EXEC:"xargs -n 1 xdg-open" & # Run the Podman container podman run --rm \ @@ -66,12 +68,13 @@ podman run --rm \ -v $HOME/Documents:/root/Documents \ -v /usr/share/icons:/usr/share/icons \ -v /tmp/.X11-unix:/tmp/.X11-unix \ - -v /tmp/xdg-open.socket:/tmp/xdg-open.socket \ + -v /tmp/xdg-open$SOCKET_ID.socket:/tmp/xdg-open.socket \ git.shihaam.dev/dockerfiles/64gram # Wait for all background processes to finish wait ``` +LOOK it even sets a random socket value so it wont mess up when you attempt to run it more than once, dont do it though \ im just gonna have this symlinked to `/sbin/telegram-desktop` when the future is today.