Skip to content

Commit f286ecf

Browse files
committed
Open Firefox window instead of browser in browser
1 parent b790939 commit f286ecf

File tree

2 files changed

+23
-12
lines changed

2 files changed

+23
-12
lines changed

docker-compose.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ services:
1919
- type: bind
2020
source: ./config/resolv.conf
2121
target: /etc/resolv.conf
22-
ports:
23-
- "5800:5800"
2422

2523
alfis:
2624
image: ghcr.io/dkushche/alfis_service:master
@@ -33,15 +31,23 @@ services:
3331
network_mode: service:yggdrasil
3432

3533
firefox:
36-
image: jlesage/firefox:v1.18.0
34+
image: lscr.io/linuxserver/firefox:latest
3735
container_name: firefox_interface
38-
restart: always
36+
entrypoint: firefox
3937
shm_size: '2gb'
4038
environment:
41-
- DISPLAY_WIDTH=${DISPLAY_WIDTH}
42-
- DISPLAY_HEIGHT=${DISPLAY_HEIGHT}
39+
- PUID=${PUID}
40+
- PGID=${PGID}
41+
- TZ=${TZ}
42+
- DISPLAY=${DISPLAY}
4343
volumes:
4444
- type: bind
4545
source: ./storage/firefox
4646
target: /config
47+
- type: bind
48+
source: /tmp/.X11-unix
49+
target: /tmp/.X11-unix
4750
network_mode: service:yggdrasil
51+
depends_on:
52+
- alfis
53+
- yggdrasil

yggway

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
"""
33
Utility for managing containers system
44
that gives access to yggdrasil network and alfis dns
5-
via firefox browser in your host browser
5+
via firefox browser
66
"""
77

88
import os
9-
import re
109
import sys
1110
import shutil
1211
import argparse
@@ -18,9 +17,14 @@ def start():
1817
Initializes yggway subsystems and starts system
1918
"""
2019

21-
xdpy_info = subprocess.run(["xdpyinfo"], stdout=subprocess.PIPE, check=True, text=True)
22-
resolution = re.search(r"dimensions: ([0-9]+)x([0-9]+) pixels", xdpy_info.stdout)
23-
(os.environ["DISPLAY_WIDTH"], os.environ["DISPLAY_HEIGHT"]) = resolution.groups()
20+
os.environ["PUID"] = subprocess.run(
21+
["id", "-u"], stdout=subprocess.PIPE, check=True, text=True).stdout
22+
23+
os.environ["PGID"] = subprocess.run(
24+
["id", "-g"], stdout=subprocess.PIPE, check=True, text=True).stdout
25+
26+
os.environ["TZ"] = subprocess.run(
27+
["cat", "/etc/timezone"], stdout=subprocess.PIPE, check=True, text=True).stdout
2428

2529
subprocess.run(["docker-compose", "config"], stdout=subprocess.DEVNULL, check=True)
2630

@@ -32,6 +36,7 @@ def start():
3236
shutil.copy("config/blockchain.db", "storage/alfis")
3337
shutil.copy("config/peers.json", "storage/yggdrasil")
3438

39+
subprocess.run(["xhost", "+"], check=True)
3540
subprocess.run(["docker-compose", "up", "--detach"], check=True)
3641

3742

@@ -81,7 +86,7 @@ def parse_args():
8186

8287
parser.add_argument(
8388
'-u', '--start', action='store_true',
84-
help='starts yggdrasil gateway; (you could access to browser through localhost:5800)'
89+
help='starts yggdrasil gateway(Mozilla window will open instantly)'
8590
)
8691

8792
parser.add_argument(

0 commit comments

Comments
 (0)