Giter VIP home page Giter VIP logo

guacamole-dotool's Introduction

Guacamole dotool

CI Workflow npm Version

A command-line Guacamole client and TypeScript/JavaScript library for headless scripting. It’s exactly like vncdotool or xdotool, but over the Guacamole protocol.

Installation

On Alpine Linux

The guacamole-dotool package is currently available in the testing repository or in my backports for v3.18.

Using npm

npm install --global guacamole-dotool

Warning: The canvas package downloads pre-built native libraries (cairo, pango, libjpeg…) from npmjs.com by default. If you want to build it from source instead (highly recommended), use option --build-from-source. See node-canvas installation for details.

Usage

Command line

guacamole-dotool --url wss://example.org/guacamole -- \
  key Cmd+t pause 2 type 'echo "Hello, world!"' key Enter pause 0.5 capture screenshot.png

Run guacamole-dotool --help to learn more.

TypeScript / JavaScript

import { Client, setDomGlobals } from 'guacamole-dotool'

// Set canvas, jsdom and ws to the global context.
setDomGlobals()

// Connect to Guacamole via WebSocket.
const c = await Client.connect('wss://example.org/guacamole')

// Run commands...
await c.keysPress('Cmd', 't')
await c.pause(2)
await c.type('echo "Hello, world!"')
await c.keysPress('Enter')
await c.pause(0.5)
await c.captureScreenToFile('screenshot.png')

c.disconnect()

See src/client.ts to learn more.

License

This project is licensed under MIT License. For the full text of the license, see the LICENSE file.

guacamole-dotool's People

Contributors

jirutka avatar

Stargazers

 avatar

Watchers

 avatar  avatar

guacamole-dotool's Issues

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.