Simple remote for chrome / chromium browser. It opens/changes the url chromium is displaying at the moment. Useful for kiosk systems.
I tried to find a program which allows me to change the url of a running chrome instance, or simply to refresh the current web site. After a lot of research I found some code snippets mainly done from-for developers. But nothing useable in a simple ssh command or usable in a webhook.
So I wrote my own programm.
Start a chrome or a chromium browser with the option remote-debugging-port
chromium --remote-debugging-port=12345
Afterwards take call the python script:
./chrome-remote https://www.heise.de
Start chromium on the remote system with the option remote-debugging-port. Afterwards clone this repo to a directory of your choise on the remote system (I prefer /opt).
chromium --remote-debugging-port=12345
cd /opt
git clone <this-repo>
Ensure you have ssh access to the remote system. Call the script from you local system by using the following ssh command:
ssh <remote-user>@<remote-system> '/opt/chrome-remote/chrome-remote.py http://www.heise.de'
if your kiosk needs to refresh
ssh <remote-user>@<remote-system> '/opt/chrome-remote/chrome-remote.py refresh'
- Arch Linux
community/python-websocket-client
- Debian/Ubuntu
python3-websocket
cd /opt
git clone <this-repo>
chown -R <your-username>:<your-username> chrome-remote
chmod 755 chrome-remote/chrome-remote.py
Tested on the following distributions:
- Arch Linux
- Debian Buster
- Raspbian
./chrome-remote.py
Usage: ./chrome-remote.py [ -h ] | [ -p <chrome-remote-port>] <url_to_open> | refresh
This programm requires chrome/chromium browser. Start this with the following argument:
chromium -remote-debugging-port=12345
-p remote debugging port (default is 12345)
<url_to_open> e.g. https://www.heise.de
OR
refresh
Websocket command for refresh
Remote open url
Websocat
Misc
- https://github.com/lvancrayelynghe/chrome-remote-reload
- https://stackoverflow.com/questions/31340063/how-to-change-url-on-chromium-kiosk-mode-via-ssh
- long complicated xdotool command for X11 based systems - but if you are on wayland you are doomed