Compare commits

..

3 Commits

Author SHA1 Message Date
55a2bb1499 Remove old feature
I forgot to update this but now I'm on bed and using phone so no verified

Signed-off-by: Shihaam Abdul Rahman <shihaam@shihaam.dev>
2023-10-04 02:29:01 +05:00
b83bbe0b68 podmanrun 2023-10-04 02:18:09 +05:00
86c9a4f694 i hate the future 2023-10-04 01:54:44 +05:00

View File

@@ -43,7 +43,38 @@ services:
- /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI - /tmp/.X11-unix:/tmp/.X11-unix # X11 socket for GUI
- /tmp/xdg-open.socket:/tmp/xdg-open.socket # Add support for xdg-open - /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` and run `podman-compose up -d` or if you wanna live dangerously then you may..: `docker compose up -d`
here is a script that uses podman run command that does exactly the thing above lol
```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 \
--name 64gram \
--hostname 64gram \
-e DISPLAY \
--device /dev/snd:/dev/snd \
--device /dev/video0:/dev/video0 \
-v $HOME/.local/share/64Gram:/root/.local/share/64Gram \
-v $HOME/Downloads:/root/Downloads \
-v $HOME/Pictures:/root/Pictures \
-v $HOME/Documents:/root/Documents \
-v /usr/share/icons:/usr/share/icons \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-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.
k, thanks, bye. k, thanks, bye.