souhaiel1 / AI-powered-surveillance-using-raspberry-pi

this projet aims to automate surveillance using the Raspberry Pi computer and its camera module . This project was inspired by other older works and it's a push towards the AI-powered surveillance as computer vision and IoT are strongly emerging. The main focuses of this project are efficiency and accuracy .
MIT License
20 stars 4 forks source link

Detect if X-Server is running bevor open Browser #4

Open corgan2222 opened 4 years ago

corgan2222 commented 4 years ago

If running remotely via shh, the are nasty errore, because you are calling chromium wich cant open via ssh. maybe its a good idea, the check if a x-server is running first

https://stackoverflow.com/questions/12122671/how-to-determine-from-a-python-application-if-x-server-x-forwarding-is-running

`MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused [6341:6341:0623/143145.261098:ERROR:browser_main_loop.cc(584)] Failed to put Xlib into threaded mode. 192.168.2.20 - - [23/Jun/2020 14:31:45] "GET /favicon.ico HTTP/1.1" 404 - MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused

(chromium-browser-v7:6341): Gtk-WARNING **: 14:31:49.297: cannot open display: localhost:10.0 --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version= MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused [6515:6515:0623/143154.211128:ERROR:browser_main_loop.cc(584)] Failed to put Xlib into threaded mode. MoTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused

(chromium-browser-v7:6515): Gtk-WARNING **: 14:31:58.216: cannot open display: localhost:10.0 /usr/bin/xdg-open: 870: /usr/bin/xdg-open: firefox: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: iceweasel: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: seamonkey: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: mozilla: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: epiphany: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: konqueror: not found /usr/bin/xdg-open: 870: /usr/bin/xdg-open: chromium: not found --disable-quic --enable-tcp-fast-open --ppapi-flash-path=/usr/lib/chromium-browser/libpepflashplayer.so --ppapi-flash-args=enable_stagevideo_auto=0 --ppapi-flash-version= `

souhaiel1 commented 4 years ago

You are right , thanks for the feedback 🙏