updated read me to use unix

This commit is contained in:
Shihaam Abdul Rahman 2023-10-04 01:46:53 +05:00
parent e0ffbee649
commit 4319fdcdc0
Signed by: shihaam
GPG Key ID: 6DA2E87EBC227636

View File

@ -1,12 +1,27 @@
## I hate the future
Stories in every app, rounded corners, I hate them, this is a container of 64gram-desktop from aur before those annoying things were added. :)
### Please dont use docker, use podman instead
reason is that if you saved a file from telegram to your host, it will be saved as root user and your user cannot delete it
and podman runs as your user, so thats not an issue.
Now, Look this isnt best solution or even a good solution.
but you need to run this command first, before starting the container!
save this as `docker-compose.yml`
```bash
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"
```
There is a script called `socat-server.sh` with this command as well.
OK but what is this, why do i need this??
Because, my dear, Telegram cannot open links when you click on them because telegram dont have access to browser to execute the command.
AND that command starts a unix socket which then telegram can send `xdg-open` commands to, the container has a modified `xdg-open` command to accept from the socket.
the modified xdg-open is also in this repo, its called `xdg-open-listener.sh`, i just renam it to `xdg-open` when building the container, see `Dockerfile`
hehe, simple :) ok anyway
save this as `podman-compose.yml` or if you like pain save as `docker-compose.yml`
```yml
version: '3.5'
@ -31,10 +46,4 @@ services:
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`
Telegram cannot open links from the container to host machine, and to work around that is this script, be sure to run it along with the container
```bash
#!/bin/bash
socat UNIX-LISTEN:/tmp/xdg-open.socket,fork EXEC:"xargs -n 1 xdg-open"
```
k, thanks, bye
k, thanks, bye.