Code Monkey home page Code Monkey logo

chrome-remote's Introduction

chrome-remote

Summery

Simple remote for chrome / chromium browser. It opens/changes the url chromium is displaying at the moment. Useful for kiosk systems.

Synopse

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.

Basic Usage

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 

Advanced Usage

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'

Installation

Dependencies

  • Arch Linux community/python-websocket-client
  • Debian/Ubuntu python3-websocket

Install to /opt

cd /opt
git clone <this-repo>
chown -R <your-username>:<your-username> chrome-remote
chmod 755 chrome-remote/chrome-remote.py

Testing

Tested on the following distributions:

  • Arch Linux
  • Debian Buster
  • Raspbian

Help

./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

Sources

Websocket command for refresh

Remote open url

Websocat

Misc

Alternatives

  • long complicated xdotool command for X11 based systems - but if you are on wayland you are doomed

chrome-remote's People

Contributors

dev-foo-bar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.