Code Monkey home page Code Monkey logo

screencat's Introduction

ScreenCat

Icon@2x.png

ScreenCat is an open source screen sharing + remote collaboration application. You can share your desktop with someone else while letting them share your mouse and keyboard remotely. Right now it is not as good as commercial alternatives, mostly because this is a hobby project and not a for-profit project. The big difference is that you can send PRs to make ScreenCat better!

demo

ScreenCat is named after cats, but also for the idea of 'catting' a screen (as in unix cat). It has two C/C++ dependencies, Electron (which includes node.js) and robotjs for creating mouse + keyboard events.

ScreenCat is currently ALPHA STATUS and is intended for developers/early adopters. Check out the Issues to get involved. ScreenCat is a volunteer run project, your contributions and improvements are welcome!

To download the latest build visit the releases page. Builds for your OS may not be available and you may have to build it yourself, sorry.

js-standard-style

Build Status

screenshot.png

How it works

The app itself is written in JS, HTML and CSS. The CSS is from tachyons. The app is wrapped up in an electron application using the menubar module.

One really cool feature of ScreenCat is the ability to screenshare with a normal browser. Using our remote control page you can send your invite code to a web user and they can remote control your computer. Currently Google Chrome is recommended. You can also screenshare between 2 ScreenCat.app users.

remote-control.gif

The screensharing takes advantage of an experimental feature built in to Chromium's WebRTC implementation called chromeMediaSource: 'screen'. This lets you share the host computers entire desktop over a WebRTC video channel. On the remote end, you can render the data in a <video> element.

To initiate the WebRTC connection both peers must swap sdp connection information payloads. After compression, you can get the payloads down to about 1K. This is technically small enough to copy/paste through e.g. SMS, but it's on the larger side. Also you have to do a full round trip, where user A sends their code to user B, and vice versa before a connection can be established.

To simplify the connection process the app uses cat-lobby, a minimal lobby server using HTTP and Server-Sent Events. This simply lets users swap SDP payloads without having to copy/paste large text blocks back and forth.

To hook up the mouse and keyboard, the remote end uses standard mousedown and keydown events and sends them over a WebRTC data channel to the host. On the host side the app must synthesize mouse and keyboard events on the host OS. This is the tricky part, and the only part where a custom native node addon (C++) is required. Luckily I found the robotjs project which while still being relatively new and rough around the edges still got the job done after some modifications.

Currently the app works best between Macs, mostly because that is what the original author used. However, you can build it for Linux or Windows too.

The motivation for making ScreenCat came from a lack of open source + easily hackable screen sharing tools. I collaborate with many remote open source developers and being able to customize the software we use to work together is important to me. ScreenCat will remain free and BSD licensed, and your contributions are welcome! Check out the issues, especially those marked as help wanted.

Building the app

For mac/linux:

npm install # installs electron and all the deps
npm start # runs the app in the electron wrapper
npm run build # builds the mac app

For windows:

You will need Visual studio C++ installed so you can build the native modules. Here are instructions for cmd.exe:

git clone https://github.com/maxogden/screencat.git
cd screencat
npm install
npm install electron-rebuild
.\node_modules\.bin\electron-rebuild.cmd
npm start

source code guide

  • the electron app executable is electron.js
  • the electron app UI and main code are app.html, app.js and screen.js
  • the remote web viewer UI and core are remote.js and remote.html
  • peer.js and connect.js are used by both the electron app and the web viewer

screencat's People

Contributors

bcomnes avatar brandly avatar geelen avatar mafintosh avatar max-mapper avatar maxjacobson avatar noonat avatar octalmage avatar okdistribute avatar paulserraino avatar shama avatar zz85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

screencat's Issues

Please provide AppImages for Linux

AppImage is a format for distributing portable software on Linux without needing superuser permissions to install the application.

It would be nice if the screencat project could provide official AppImages for Linux. electron-builder can build them for "free".

$ npm run build - in Windows

Hi i'm new.
How can I build this for windows?? is it support windows or not? :)

Error message is bellow.

Kanny@DESKTOP-O2HSVSO ~/screencat (master)
$ npm run build

[email protected] build c:\Users\Kanny\screencat
electron-packager . ScreenCat --platform=darwin --arch=x64 --version=0.36.0 --protocol-name="ScreenCat URL" --protocol="screencat" --ignore=node_modules/electron-prebuilt --ignore=node_modules/electron-packager --ignore=node_modules/browserify --ignore=node_modules/wzrd --ignore=node_modules/standard && cp img/Icon.icns ScreenCat.app/Contents/Resources/atom.icns

cp: cannot create regular file `ScreenCat.app/Contents/Resources/atom.icns': No such file or directory
npm ERR! weird error 1
npm ERR! not ok code 0

New repository Active (2020)

I am working on a project similar to this, I would like to know how many people are currently interested in the project so I can share it with all of you. The project is not a fork, and I currently have it advanced enough to help me improve it.
thank you all guys

Error! getaddrinfo ENOTFOUND catlobby.maxogden.com catlobby.maxogden.com:80

yout code include:
first:
var server = 'http://catlobby.maxogden.com';
var remoteConfigUrl = 'https://instant.io/rtcConfig';
if (process.browser) remoteConfigUrl = 'http://cors.maxogden.com/' + remoteConfigUrl;
function verifyRoom (room, cb) {

second:
// ensure room is still open
nets({method: 'POST', uri: server + '/v1/' + room + '/pong', json: {ready: true}}, function response (err, resp, data) {
if (err){
console.log('connect server error: ', err);
return cb(err)
}

  if (resp.statusCode !== 200) return cb(new Error('Invalid or expired invite code'))
  cb()
})

}
thrid:
// get remote webrtc config (ice/stun/turn)
function getRemoteConfig (cb) {
nets({url: remoteConfigUrl, json: true}, function gotConfig (err, resp, config) {
if (err || resp.statusCode > 299) config = undefined // ignore errors
cb(null, config)
})
}
fourth:
// get remote webrtc config (ice/stun/turn)
function getRemoteConfig (cb) {
nets({url: remoteConfigUrl, json: true}, function gotConfig (err, resp, config) {
if (err || resp.statusCode > 299) config = undefined // ignore errors
cb(null, config)
})
}

I think that this two url is to deal code, but I think your server is down , I want to ask you what logic about your two request( uri: server + '/v1/' + room + '/pong' and url: remoteConfigUrl,), and the getRemoteConfig function return the data is or not json format? please give me an example of the config object

I want to create server about like your 'http://catlobby.maxogden.com' to deal code logic , but I do not how to create and the server Background logic and field of your data

WebRTC signalling improvements

right now we use trickle-less SDP swapping through a custom lobby signalling server.

it would be better to use ICE/STUN, but in general I was displeased with the state of many of the signalling servers on npm, which is the main reason I made https://github.com/maxogden/cat-lobby. if someone can recommend a simple signal lobby that can do ICE/STUN then I would be happy to swap out the backend

it would be cool to use TURN, though I need to figure out a way to measure failure metrics first before investing in higher bandwidth infra like that

menu bar item selected while window open

it would be nice if the menu bar icon stayed selected while the window is open (right now it selects and unselects). it's non-obvious to users where the screen popped up from.

in particular, at least make it so on the landing page image, so that users know what instantly icon they should expect to appear after installing.

volume/gain knob in UI

now that I added audio chat, we should have a way to control audio gain. Not sure the cleanest way to add it to the UI now though, suggestions welcome. This can be implemented using the WebAudio API Gain Control Nodes. There are probably other interesting controls/effects we can surface as well

Cannot connect to screencat

Hello friends,

I have installed screencat on my local Ubuntu 16.10 system. I have also installed robotjs and electron from the links given in guide. However, when I start it, it shows it has started, but no UI and no idea how to connect to it or show the html page.

This is what I see when I issue npm start

npm start

> [email protected] start /usr/local/lib/node_modules/screencat
> electron electron.js

(electron) ipc module is deprecated. Use require("electron").ipcMain instead.
ready

How can I connect to screencat? Thank you.

Instant.io/rtcConfig

Instant.io, catlobby and cors pages are 404 so can we replace them? Max can you please help us and make the app work again ?

Where is remote-bundle.js & server

Hi,

Two questions(may be novice level):

  • Where is remote-bundle.js As here ? How do you run on github.io? I think xhr are not allowed on github?

  • How are the services built, like catlobby?
    var server = 'http://catlobby.maxogden.com' // var server = 'http://localhost:5005' var remoteConfigUrl = 'https://instant.io/rtcConfig'

fullscreen button

we should make it easy to go fullscreen when looking at someone elses screen

optional password

I wanna add a password feature to invites. Currently anyone with your invite code can control your computer.

when you create an invite it should ask if you wanna password protect it

if you choose yes, you have to enter a password.

we then use the password to AES encrypt the SDP before it gets uploaded to the lobby

If you don't specify a password you should a clear warning like 'Anyone with this room name will be able to join and see your screen'

Robotjs failed to load in MacOSX

Hi,

This gives error to load robotjs in mac. Has anyone faced this issue?

[Error: ./robot.js failed to load]
[Error: Module version mismatch. Expected 47, got 48.]

Still maintained?

I started a similar project lately and then realized that there must be another screen sharing electron app. I found this one via awesome electron but it looks like it isn't maintained anymore. Latest commit Dec 2015. Am I right?

System Sound

Is it possible to capture and stream system sound? Example, playing a video on VLC?

screencat splash on launch

when screencat launches the first time it goes to the menu bar. it would be nice if it started open right away.

process name

I have not done a lot of work with atom-shell, but would be nice to name the process differently. Related to #5 I had to hunt for which process to kill, top shows it as Atom.

cant share screen

getting this error where the shareable link is supposed to be.
Error! getaddrinfo ENOTFOUND catlobby.maxogden.com catlobby.maxogden.com:80

What's is remoteConfigUrl?

hello,friend
I get function getRemoteConfig() ,is this get remote webrtc config(ice/stun/turn) ,how I modify var remoteConfigUrl to my iceserver
I use coturn in my server , and how to use my coturn server
Thank u and God bless u

I don't get the screen code to share

I clone the repo and run npm run app and never get the screen code to share.

I don't know if has anything to do with it, but in the console I get this error:

[40713:0328/162940:INFO:CONSOLE(118)] "Uncaught Error: Module did not self-register.", source: ATOM_SHELL_ASAR.js (118)

I'm on Yosemite(v10.10.2).

Slight wordsmithing

I would suggest renaming the button 'Join Screen with Code' to just 'Join Screen'. Not sure who the intended audience is for the app, but I think it's more terse.

mdns advertising

Would be cool if you could advertise/see/connect to others on the same network via mdns like in mafintosh/airpaste

cannot build on windows 10 64-bit

when I run "npm start", It's stuck-- it just says 'ready' in console. What should I do to make it start?please give some advice, thanks.

webrtc audio

you can't do a screensharing session + and audio session over the same stream, but you can do two separate streams. we should add this :D hard part would be bootstrapping the second session (sdps) over the first stream

Quit button does not work

Feedback like an end user is going to give. I clicked on join screen with code, and then I could not quit the app. Or maybe you are making ransomware ;)

Group sharing (one to many)

it would be awesome to be able to share your screen with multiple controllers. I'd imagine the major limitation is upload bandwidth on the host end

ENOTFOUND catlobby.maxodgen.com

Just wanted to test screencat and got the error show in the attached screenshot. Seems like the cat-lobby server is down?! Any advice? Thanks in advance!

screenshot 2016-12-01 11 12 01

mozInnerScreenX

I was looking at the mdn's documentation and realized that mozInnerScreenX was what we were looking for the other night.

unfortunately, doesn't look implemented by other vendors right now.

So i guess mouse events' hack probably still work well. cc. @timoxley

Cannot build on Windows 7 64-bit

Current Behavior

It returns the following error when executing npm install after cloning the project or running npm install inside another project which has robotjs as a dependency.

npm install

> [email protected] install E:\robotjs
> prebuild --install

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(44,5): error MSB8020: The builds tools for v140 (Platform Toolset = 'v140' ) cannot be found. To build using the v140 build tools, either click the Project menu or right-click the solution, and then select "Update VC++ Projects...". In stall v140 to build using the v140 build tools. [E:\robotjs\build\robotjs.vcxproj]
prebuild ERR! build error
prebuild ERR! stack Error: `msbuild` failed with exit code: 1
prebuild ERR! stack     at ChildProcess.onExit (E:\robotjs\node_modules\node-gyp\lib\build.js:276:23)
prebuild ERR! stack     at emitTwo (events.js:106:13)
prebuild ERR! stack     at ChildProcess.emit (events.js:191:7)
prebuild ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
prebuild ERR! not ok
prebuild ERR! build Error: `msbuild` failed with exit code: 1
prebuild ERR! build     at ChildProcess.onExit (E:\robotjs\node_modules\node-gyp\lib\build.js:276:23)
prebuild ERR! build     at emitTwo (events.js:106:13)
prebuild ERR! build     at ChildProcess.emit (events.js:191:7)
prebuild ERR! build     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Users\\mattjs\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.9.2
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `prebuild --install`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] install script 'prebuild --install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     prebuild --install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs robotjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls robotjs
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\robotjs\npm-debug.log

Steps to Reproduce (for bugs)

  1. Clone this project
  2. cd to the location
  3. npm install

Context

I'm trying to build this from the source on a windows machine but can't get it to work either by installing via npm install or node-gyp rebuild --python "path-to-python" --msvs_version=2015

Your Environment

  • Screencat version: 4.2.0
  • RobotJS version: 0.4.5
  • Node.js version: 6.9.2 32-bit
  • npm version: 4.0.5
  • node-gyp version: 3.4.0
  • Python version: 2.7
  • Visual Studio: 2015 Professional Update 3
  • Operating System: Windows 7 SP1 64-bit

Flatpak

It would be great, if you could provide a flatpak of this.

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.