added support to open links
This commit is contained in:
		| @@ -4,8 +4,11 @@ WORKDIR /root | ||||
|  | ||||
| COPY 64gram-desktop-bin-1_1.0.85-1-x86_64.pkg.tar.zst . | ||||
|  | ||||
| RUN pacman -Sy alsa-utils --noconfirm \ | ||||
| RUN pacman -Sy alsa-utils xdg-utils socat --noconfirm \ | ||||
|  && pacman -U 64gram-desktop-bin-1_1.0.85-1-x86_64.pkg.tar.zst --noconfirm \ | ||||
|  && rm -rfv 64gram-desktop-bin-1_1.0.85-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/* | ||||
|  | ||||
| COPY xdg-open-listener.sh /usr/sbin/xdg-open | ||||
| RUN chmod +x /usr/sbin/xdg-open | ||||
|  | ||||
| CMD telegram-desktop | ||||
|   | ||||
| @@ -17,6 +17,8 @@ services: | ||||
|     image: git.shihaam.dev/dockerfiles/64gram | ||||
|     environment: | ||||
|       - DISPLAY  # For GUI access | ||||
|       - XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server | ||||
|       - XDG_OPEN_LISTENER_HOST=192.168.x.x # set this to your host machine IP | ||||
|     devices: | ||||
|       - /dev/snd:/dev/snd  # Mic and Speaker support | ||||
|       - /dev/video0:/dev/video0  # Webcam support | ||||
| @@ -30,4 +32,7 @@ services: | ||||
| ``` | ||||
| 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 command | ||||
| `socat TCP-LISTEN:$XDG_OPEN_LISTENER_PORT,fork EXEC:"xargs -n 1 xdg-open"` | ||||
|  | ||||
| k, thanks, bye | ||||
|   | ||||
| @@ -7,6 +7,8 @@ services: | ||||
|     image: git.shihaam.dev/dockerfiles/64gram | ||||
|     environment: | ||||
|       - DISPLAY  # For GUI access | ||||
|       - XDG_OPEN_LISTENER_PORT=6969 # Set this to port number of socat server | ||||
|       - XDG_OPEN_LISTENER_HOST=192.168.x.x # set this to your host machine IP | ||||
|     devices: | ||||
|       - /dev/snd:/dev/snd  # Mic and Speaker support | ||||
|       - /dev/video0:/dev/video0  # Webcam support | ||||
|   | ||||
							
								
								
									
										3
									
								
								xdg-open-listener.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								xdg-open-listener.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/bin/bash | ||||
|  | ||||
| echo $1 | socat - TCP:$XDG_OPEN_LISTENER_HOST:$XDG_OPEN_LISTENER_PORT | ||||
		Reference in New Issue
	
	Block a user