From 4319fdcdc05ec604dd19632194b563390c47f910 Mon Sep 17 00:00:00 2001 From: Shihaam Abdul Rahman Date: Wed, 4 Oct 2023 01:46:53 +0500 Subject: [PATCH] updated read me to use unix --- README.md | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 68668bb..ebdd3f4 100644 --- a/README.md +++ b/README.md @@ -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.