GithubHelp home page GithubHelp logo

cbodden / exttab Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 0.0 3.08 MB

This script is for using your tablet(s) as external monitors

License: GNU General Public License v3.0

Shell 100.00%
external monitor display displays

exttab's Introduction

shot of my setuo


                  .,::::::    .,::      .::::::::::::::::::::::::::::.     :::::::.
                  ;;;;''''    `;;;,  .,;; ;;;;;;;;'''';;;;;;;;'''';;`;;     ;;;'';;'
                   [[cccc       '[[,,[['       [[          [[    ,[[ '[[,   [[[__[[\.
                   $$""""        Y$$$P         $$          $$   c$$$cc$$$c  $$""""Y$$
                   888oo,__    oP"``"Yo,       88,         88,   888   888,_88o,,od8P
                   """"YUMMM,m"       "Mm,     MMM         MMM   YMM   ""` ""YUMMMP"

exttab

Script for using devices as external monitors over vnc

Usage

Base usage:

git clone [email protected]:cbodden/exttab.git
cd exttab
./exttab.sh

If using one tablet, now you connect via vnc port 5900, if two tablets then the second one connects via port 5901

Usage explained:

NAME
    exttab.sh - enables tablets as external monitors

SYNOPSIS
    exttab.sh [-1, -2, -h, -H, --help]
            [-p passwd ,-P passwd ,--password=<passwd>]
            [-l or -L <####x####>, --left=<####x####>]
            [-r or -R <####x####>, --right=<####x####>]
            [-m or -M <####x####>, --resolution=<####x####>]
            [-x,-X,-q,-Q,--exit,--quit,--stop]
            [-s <side>, -S <side>, --side=<side>]

DESCRIPTION
    This script will convert either one or two devices into external
    monitors using xrandr, x11vnc, and a vnc client.

    This was tested with linux on a couple of different tablets (android)
    and cell phones (android also).

    This script can be called with no options for interactive or run with
    options on the command line.

OPTIONS
    -1
        This option specifies one tablet. Has to be used in conjunction
        with:
            [-m <####x####>, -M <####x####>, --resolution=<####x####>]
        and:
            [-s <side>, -S <side>, --side=<side>]

    -2
        This option specifies two tablets. Has to be used in conjunction
        with:
            [-l <####x####>, -L <####x####>, --left=<####x####>]
        and:
            [-r <####x####>, -R <####x####>, --right=<####x####>]

    -p <passwd>, -P <passwd>, --password=<passwd>
        This option sets a password to be used in the VNC client. Does
        not need to be used but should be so you don't get stray
        connections.

    -l <####x####>, -L <####x####>, --left=<####x####>
        This option sets the resolution for the left tablet in the format
        of "####x####". Needed when the [-2] option specified.

    -r <####x####>, -R <####x####>, --right=<####x####>
        This option sets the resolution for the right tablet in the format
        of "####x####". Needed when the [-2] option specified.

    -m <####x####>, -M <####x####>, --resolution=<####x####>
        This option sets the resolution for the tablet in the format
        of "####x####". Needed when the [-1] option specified.

    -s <side>, -S <side>, --side=<side>
        This option specifies which side the individual tablet will
        display on.
        This option is only used with [-1]

    -x, -X, -q, -Q, --exit --quit, --stop
        This option stops the running processes.
        They are all the same option.

    -h, -H, --help
        This help file.

NOTES
    This script can be run with no options which will put it into an
    interactive mode so you do not have to specify any options.

    When using this script in two tablet mode, left tablet will use
    port 5900 for vnc and the right will use port 5901. This will change
    at some point in the future to allow user input.

    Most of the options have multiple formats (example: -h, -H, --help) for
    preferential reasons and i also just was really bored while writing the
    input section which made writing the usage just so much more difficult.

EXAMPLES
    One tablet (1920x1200 rex) to the right of main display:
        exttab.sh -1 -s right -m 1920x1200
        exttab.sh -1 --side=right --resolution=1920x1200

    Two tablets: left is 2560x1600 and right is 1920x1200:
        exttab.sh -2 -l 2560x1600 -r 1920x1200
        exttab.sh -2 --left=2560x1600 --right=1920x1200

    One tablet: right with 1920x1200 rez with password Tablet:
        exttab.sh -1 -s right -m 1920x1200 -p Tablet
        exttab.sh -1 --side=right --resolution=1920x1200 --password=Tablet

    Stop running tablet(s) and clean up xrandr:
        exttab.sh -x
        exttab.sh --exit
        exttab.sh --stop


Requirements

License and Author

Author:: Cesar Bodden ([email protected])

Copyright:: 2017, Pissedoffadmins.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

exttab's People

Contributors

cbodden avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

exttab's Issues

Is this still in use? / improvement request

Hi Is this still active?

with non intel drivers we there a lot of issues with AMD
e.g.
https://github.com/kbumsik/VirtScreen/issues

There is evdi-vnc that theoretically coud be used with any other graphics
https://github.com/DisplayLink/evdi

using this with Android some steps could be improved with adb commands.

with adb you can get the screen size
adb shell wm size

with
adb reverse tcp:5900 tcp:5900
you get a fast connection via USB

to start the VNC on the android tablet like bVNC
adb shell monkey -p com.iiordanov.freebVNC -c android.intent.category.LAUNCHER 1;

For non Intel devices this works at the moment, using the non active display, so an if clause, if virtual then, else would be great

adb reverse tcp:5900 tcp:5900
adb shell monkey -p com.iiordanov.freebVNC -c android.intent.category.LAUNCHER 1;
xrandr --newmode "1920x1080_60.00" 193.16 1920 2048 2256 2592 1200 1201 1204 1242 -HSync +Vsync
xrandr --addmode HDMI-A-0 1920x1080_60.00
xrandr --output [XRANDR_UNUSED_OUTPUT_CHANGE_THIS] --mode 1920x1080_60.00 --right-of [XRANDR_USED_OUTPUT_CHANGE_THIS]
x11vnc -rfbauth ~/.vnc/passwd -clip 1920x1080+1920+0

There is another project that uses displaylink drivers, evdi to connect.

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.