bitrate16 / httprd

Single-script remote desktop via web browser
GNU General Public License v3.0
73 stars 7 forks source link

Is there a way to launch httprd via ssh ? #2

Open ludetie opened 7 months ago

ludetie commented 7 months ago

Hello, Is there a way to launch httprd via ssh ? When I launch httprd via ssh : python3 httprd.py --help the answer is : Traceback (most recent call last): File "httprd.py", line 29, in import pyautogui File "/home/ludeti/.local/lib/python3.8/site-packages/pyautogui/init.py", line 246, in import mouseinfo File "/home/ludeti/.local/lib/python3.8/site-packages/mouseinfo/init.py", line 223, in _display = Display(os.environ['DISPLAY']) File "/usr/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None

ludetie commented 7 months ago

Hello, I found ; once connected to ssh : export DISPLAY=:0.0 && python3 httprd.py --help

httprd is great, thank you !

bitrate16 commented 7 months ago

export DISPLAY=:0.0

Yes, you have to tell ssh tty which X11/Wayland session display to use because in common DISPLAY is exported only in TTY's created under GUI environment (like terninal, etc)