Giter Club home page Giter Club logo

qed's Introduction

What is QED?

QED is a multi-screen projector system written in Javascript. Source is available as free software/open source underApache license 2.0.

Description

QED was inspired by a latin phrase quod erat demonstrandum meaning which is what had to be proven. Traditionally used in mathematics, since this software was primarily written for MSRI it seemed appropriate.

QED is a simple and cost-effective way for beamer or powerpoint presentations to use 3 screens to show three consecutive slide, with automatic updating, and without requiring anything special of the presenter. The system currently requires a "server" to which one uploads an ordinary beamer file and 3 projectors each connected to a commodity PC on the same network.

Basic Architecture

QED Overview

How to install QED ?

QED has some server side dependencies which needs to be installed first.

Installing NodeJS using NVM on (Ubuntu 15.10)

An alternative to installing Node.js through apt is to use a specially designed tool called nvm, which stands for "Node.js version manager".

Using nvm, you can install multiple, self-contained versions of Node.js which will allow you to control your environment easier. It will give you on-demand access to the newest versions of Node.js, but will also allow you to target previous releases that your app may depend on.

To start off, we'll need to get the software packages from our Ubuntu repositories that will allow us to build source packages. The nvm script will leverage these tools to build the necessary components:

$ sudo apt-get update
$ sudo apt-get install build-essential libssl-dev

Once the prerequisite packages are installed, you can pull down the nvm installation script from the project's GitHub page. The version number may be different, but in general, you can download and install it with the following syntax:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
$ nvm ls-remote
...
v6.8.0
v6.8.1
v6.9.0   (LTS: Boron)
v6.9.1   (LTS: Boron)
v6.9.2   (LTS: Boron)
v6.9.3   (LTS: Boron)
v6.9.4   (LTS: Boron)
v6.9.5   (LTS: Boron)
v6.10.0   (Latest LTS: Boron)

The newest version at the time of this writing is 6.10.0. You can install that by typing:

$ nvm install 6.10.0

Usually, nvm will switch to use the most recently installed version. You can explicitly tell nvm to use the version we just downloaded by typing

$ nvm use v6.10.0

When you install Node.js using nvm, the executable is called node. You can see the version currently being used by the shell by typing:

$ node -v
v6.10.0

Installing QED

Prerequisite please install 'git' version control system.

$ sudo apt-get install git
$ git clone https://github.com/harshavardhana/qed.git
$ cd qed

After you have cloned the repository, please use npm to install all the QED dependencies (all dependencies will be automatically installed)

$ npm install

Configuring QED

Now that we have successfully installed QED, we are ready to make configuration changes i.e config.json

$ cat config.json
{
    "server": {
        "port": 80,
        "root": "web",
        "host": "0.0.0.0"
    },
    "socket": {
        "port": 4002,
        "root": "web",
        "host": "0.0.0.0"
    },
    "projectors": {
        "projector1": "10.0.0.25",
        "projector2": "10.0.0.5",
        "projector3": "10.0.0.53"
    }
}

Configuration 'server' and 'socket' by default listen on all the IPs at ports 4001 and 4002 respectively. You can configure them to use a different port of your choice depending on your local infrastructure. projectors are the commodify PC's which are connected to your projectors they need to have a static IP.

NOTE: Make sure that the projector association is in accordance with the project installation at your site, to allow for proper slides to be displayed on relevant screens.

Starting QED

Now simply start ./start-services.js

$ ./start-services.js
### Starting local server

Web server running at:
http://127.0.0.1:4001
http://10.237.205.192:4001

Socker server running at:
ws://127.0.0.1:4002
ws://10.237.205.192:4002

Uploaded files will be saved to web/uploaded
Remember to clean this directory from time to time, if you end up uploading lots of files.

QED is now running at port 4001 , now open the link in your browser http://localhost:4001 to start using QED.

How to Enable QED to start automatically after system restart?

QED provides a convenient shell script to enable QED upon system restart.

$ ./enable-rc-local qeduser

This script will automatically add following line into your /etc/rc.local

$ cat /etc/rc.local
(sudo -u qeduser bash -c \"cd /home/qeduser/qed && ./start-services.js\")&

NOTE: Following automation will only work on Linux operating systems.

How to update QED ?

Currently the update mechanism is based on pulling sources directly into your local repository.

Fetch new changes

$ cd qed
$ git pull --rebase

Killall any running services and restart QED.

$ sudo killall node
$ sudo /etc/rc.local

User Feedback

If you have any problems with or questions, please contact us through a GitHub issue.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

qed's People

Contributors

dependabot[bot] avatar harshavardhana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pombredanne msri

qed's Issues

Displays change page order on PDFs

@harshavardhana we've had some issues with certain PDF's not displaying in order (IE. It shows page 1, 2, 3.. followed by 1,3,4 then 1,2,4 ). Here is one for example: https://arxiv.org/pdf/1603.04876.pdf

I am going to check out the latest version and ensure that's deployed on our QED server.

Do you know if anyone else has experienced this issue? I'll post more debug info when I get it.

Performing clean install Ubuntu 14.04

After doing a clean install we get this error:

msri@qed:~/qed$ npm install

[email protected] install /home/msri/qed/node_modules/bufferutil
node-gyp rebuild

make: Entering directory /home/msri/qed/node_modules/bufferutil/build' CXX(target) Release/obj.target/bufferutil/src/bufferutil.o In file included from ../src/bufferutil.cc:16:0: ../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’ NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) { ^ ../../nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) { ^ ../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’: ../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h:665:60: error: ‘hint’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: ../../nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ ../../nan/nan.h:672:67: note: candidates are: In file included from ../src/bufferutil.cc:10:0: /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match> NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, ^ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, ^ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’ In file included from ../src/bufferutil.cc:16:0: ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: ../../nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: ../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ make: *** [Release/obj.target/bufferutil/src/bufferutil.o] Error 1 make: Leaving directory /home/msri/qed/node_modules/bufferutil/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/msri/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "/home/msri/.nvm/versions/node/v5.0.0/bin/node" "/home/msri/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/msri/qed/node_modules/bufferutil
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:bufferutil [email protected] install: node-gyp rebuild
npm WARN install:bufferutil Exit status 1

[email protected] install /home/msri/qed/node_modules/utf-8-validate
node-gyp rebuild

make: Entering directory /home/msri/qed/node_modules/utf-8-validate/build' CXX(target) Release/obj.target/validation/src/validation.o In file included from ../src/validation.cc:15:0: ../../nan/nan.h:261:25: error: redefinition of ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Local<T>)’ NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Local<T> val) { ^ ../../nan/nan.h:256:25: error: ‘template<class T> v8::Local<T> _NanEnsureLocal(v8::Handle<T>)’ previously declared here NAN_INLINE v8::Local<T> _NanEnsureLocal(v8::Handle<T> val) { ^ ../../nan/nan.h:661:13: error: ‘node::smalloc’ has not been declared , node::smalloc::FreeCallback callback ^ ../../nan/nan.h:661:35: error: expected ‘,’ or ‘...’ before ‘callback’ , node::smalloc::FreeCallback callback ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(char*, size_t, int)’: ../../nan/nan.h:665:50: error: ‘callback’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h:665:60: error: ‘hint’ was not declared in this scope v8::Isolate::GetCurrent(), data, length, callback, hint); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(const char*, uint32_t)’: ../../nan/nan.h:672:67: error: call of overloaded ‘New(v8::Isolate*, const char*&, uint32_t&)’ is ambiguous return node::Buffer::New(v8::Isolate::GetCurrent(), data, size); ^ ../../nan/nan.h:672:67: note: candidates are: In file included from ../src/validation.cc:10:0: /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, v8::Local<v8::String>, node::encoding) <near match> NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, ^ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:31:40: note: no known conversion for argument 3 from ‘uint32_t {aka unsigned int}’ to ‘node::encoding’ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: v8::MaybeLocal<v8::Object> node::Buffer::New(v8::Isolate*, char*, size_t) <near match> NODE_EXTERN v8::MaybeLocal<v8::Object> New(v8::Isolate* isolate, ^ /home/msri/.node-gyp/5.0.0/include/node/node_buffer.h:43:40: note: no known conversion for argument 2 from ‘const char*’ to ‘char*’ In file included from ../src/validation.cc:15:0: ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanNewBufferHandle(uint32_t)’: ../../nan/nan.h:676:61: error: could not convert ‘node::Buffer::New(v8::Isolate::GetCurrent(), ((size_t)size))’ from ‘v8::MaybeLocal<v8::Object>’ to ‘v8::Local<v8::Object>’ return node::Buffer::New(v8::Isolate::GetCurrent(), size); ^ ../../nan/nan.h: In function ‘v8::Local<v8::Object> NanBufferUse(char*, uint32_t)’: ../../nan/nan.h:683:12: error: ‘Use’ is not a member of ‘node::Buffer’ return node::Buffer::Use(v8::Isolate::GetCurrent(), data, size); ^ make: *** [Release/obj.target/validation/src/validation.o] Error 1 make: Leaving directory /home/msri/qed/node_modules/utf-8-validate/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/msri/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 3.13.0-32-generic
gyp ERR! command "/home/msri/.nvm/versions/node/v5.0.0/bin/node" "/home/msri/.nvm/versions/node/v5.0.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/msri/qed/node_modules/utf-8-validate
gyp ERR! node -v v5.0.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm WARN install:utf-8-validate [email protected] install: node-gyp rebuild
npm WARN install:utf-8-validate Exit status 1

QED Testing Issues

There were two presentations that were problematic. Both of these “froze” at some point during each presentation on the two side screens but the middle screen was able to keep showing the slides in succession. When we tested the slides before the presentations, they seemed to work. I am not sure if this could have made a difference, but just before the actual presentations began, both presenters scrolled through the slides rapidly and then backed them up to the first page. This may have cause caching problems, but that is just my guess. I should also note that both presentations have text or figures that appear in overlays and the presenters were using the wireless “clicker” to advance. Each time they did this (while everything was working), each overlay became an old page (with the exception of the page appearing on the middle screen which captured the effect of the layers). I wanted you to know this in case you think that using overlays is somehow related to the screens freezing.

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.