File size: 708 Bytes
bfa6ae5
 
 
d8cbd07
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
set -e

echo "[*] Starting ttyd browser terminal on port 7860..."

# ttyd flags:
#   -p 7860        → listen on HF's required port
#   -W             → allow clients to write (not read-only)
#   -t fontSize=16 → slightly larger font for comfort
#   -t theme=...   → dark theme
#   --writable     → enable keyboard input
#   su - user      → drop into the non-root user shell
exec ttyd \
    --port 7860 \
    --writable \
    -t fontSize=16 \
    -t 'theme={"background":"#1e1e2e","foreground":"#cdd6f4","cursor":"#f5c2e7","black":"#45475a","red":"#f38ba8","green":"#a6e3a1","yellow":"#f9e2af","blue":"#89b4fa","magenta":"#cba6f7","cyan":"#89dceb","white":"#bac2de"}' \
    su - user