podmanrun
This commit is contained in:
@ -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.
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user