All Projects → brunodles → Linux Second Screen

brunodles / Linux Second Screen

Licence: mit
Scripts to repurpose old android device as second monitor on linux

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Linux Second Screen

Browsh
A fully-modern text-based browser, rendering to TTY and browsers
Stars: ✭ 14,058 (+8686.25%)
Mutual labels:  ssh, vnc
Chameleon
Customizable honeypots for monitoring network traffic, bots activities and username\password credentials (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, RDP, VNC, SMB, SOCKS5, Redis, TELNET, Postgres and MySQL)
Stars: ✭ 230 (+43.75%)
Mutual labels:  ssh, vnc
Premotem
Personal Remote Manager
Stars: ✭ 161 (+0.63%)
Mutual labels:  ssh, vnc
X11docker
Run GUI applications and desktops in docker and podman containers. Focus on security.
Stars: ✭ 3,797 (+2273.13%)
Mutual labels:  ssh, vnc
iCtrl
UofT Engineering Lab Remote
Stars: ✭ 91 (-43.12%)
Mutual labels:  ssh, vnc
Guacamole
Guacamole是无客户端的远程桌面网关。它支持VNC,RDP和SSH等标准协议。 我们称之为无客户端,因为不需要插件或客户端软件。 感谢HTML5,一旦Guacamole安装在服务器上,您访问桌面所需的全部功能就是一个Web浏览器。
Stars: ✭ 99 (-38.12%)
Mutual labels:  ssh, vnc
Brutedum
BruteDum - Brute Force attacks SSH, FTP, Telnet, PostgreSQL, RDP, VNC with Hydra, Medusa and Ncrack
Stars: ✭ 212 (+32.5%)
Mutual labels:  ssh, vnc
seahorse
ELKFH - Elastic, Logstash, Kibana, Filebeat and Honeypot (HTTP, HTTPS, SSH, RDP, VNC, Redis, MySQL, MONGO, SMB, LDAP)
Stars: ✭ 31 (-80.62%)
Mutual labels:  ssh, vnc
guacamole-auth-jwt
Guacamole authentication extension based on JWT.
Stars: ✭ 28 (-82.5%)
Mutual labels:  ssh, vnc
Openiothub
💖A free IoT (Internet of Things) platform and private cloud. [一个免费的物联网和私有云平台,支持内网穿透]
Stars: ✭ 371 (+131.88%)
Mutual labels:  ssh, vnc
Next Terminal
Next Terminal是一个轻量级堡垒机系统,易安装,易使用,支持RDP、SSH、VNC、Telnet、Kubernetes协议。
Stars: ✭ 2,354 (+1371.25%)
Mutual labels:  ssh, vnc
Wsl2 Ssh Pageant
bridge between windows pageant and wsl2
Stars: ✭ 155 (-3.12%)
Mutual labels:  ssh
Sshtron
$ ssh sshtron.zachlatta.com
Stars: ✭ 1,910 (+1093.75%)
Mutual labels:  ssh
Chopsticks
Chopsticks is an orchestration library: it lets you execute Python code on remote hosts over SSH.
Stars: ✭ 151 (-5.62%)
Mutual labels:  ssh
Flightplan
Run sequences of shell commands against local and remote hosts.
Stars: ✭ 1,804 (+1027.5%)
Mutual labels:  ssh
Mirror.vim
Efficient way to edit remote files on multiple environments with Vim.
Stars: ✭ 158 (-1.25%)
Mutual labels:  ssh
Drone Ssh
Drone plugin for executing remote ssh commands
Stars: ✭ 155 (-3.12%)
Mutual labels:  ssh
Adbsploit
A python based tool for exploiting and managing Android devices via ADB
Stars: ✭ 147 (-8.12%)
Mutual labels:  adb
Corkscrew
Corkscrew is a tool for tunneling SSH through HTTP proxies.
Stars: ✭ 149 (-6.87%)
Mutual labels:  ssh
Swiftsh
A Swift SSH framework that wraps libssh2.
Stars: ✭ 148 (-7.5%)
Mutual labels:  ssh

linux-second-screen

Scripts to repurpose old android device as second monitor on linux

Usage

This repo have many bash scripts to interact with android using adb. Each script have it's own function.

Device

A simple wrapper to select target device by name.

Add device

device add droid2 015F13B817021010

Usage

device droid2 adb shell
device droid2 <any other command>

Display

Change host (linux) display settings. With this script we can create, change settings or remove of virtual displays. It does not care about positioning the virtual displays, this should be done using your favorite monitor app. E.g.: xrandr, arandr or some other you like.

droid

General commands for android. This script is a wrapper for adb, with it we can:

  • start an app to resolve one url
  • open pre-defined activites
  • set date and time
  • get device ip
  • connect to wifi
  • get sdk
  • get model
  • get and change orientation
  • change some developer settings
  • get screen resolution
  • shutdown device
  • record and playback inputs

input

An reimplementation of input script on android. Some devices doesn't have tap and swipe command, so this script tries to reprotuce theses commands.

keyboard

Send multiple KEY_EVENTS in a single string. The idea here is to simplify the way to send keyboard inputs. This script replaces (space character) by %s the one is used by key event. Also send key events by name, just using UPPERCASED text.

# We can input text, then key, the text again, the order doesn't matter
keyboard "My name is Bruno;ENTER;This one is probably on the next field"

# we can also send multiple key events
keyboard "UP;UP;DOWN;DOWN;LEFT;RIGHT;LEFT;RIGHT"

terminal

This script is a wrapper to interact with screen, a screen manager for terminal. Using screen we can share a terminal session like. The idea is use it like a vnc, and connect other devices to keep a terminal session running on then like server logs or status.

vnc

A wrapper for vnc commands. We have only two commands here:

  • Start - wich starts vnc for a virtual display
  • window - wich starts vnc for a given window

Setup

First we need to run setup to install all tools we need to run this. There are tools that we doesn't provide, like adb (Android Debug Bridge), it comes with android sdk. You will have to setup adb into your path.

Then run setup. You will be prompt to put your password to install necessary tools. We may split setup into multiple phases later, for optional instalation.

# install tools
./main setup

# create virtual displays, only works with intel's graphic card
# you may change 2 by any number of virtual displays you want
./display create 2

Restart you computer, if you created virtual display. When you login again you will see VIRTUAL as possible video output.

How to create a extended display? - Intel's graphic card only

With these scripts it gets simple. But we still need to make some touches to make then integrated. may I make this on main.

I high recomend you to write a script to start your own devices, this will make your life a lot easier. So I will write the step-by-step in a script-like.

Step 1 - get information from your device

We need to know the resolution from our device, it's orientation and screen size inches. Based on these two informations we can create one virtual display.

# resolution - this one may fail, so you may have to get this information from internet
# ./droid resolution
resolution=$(./droid resolution)

# replace resolution ´x´ by ´ ´ (space)
resolution=${resolution/x/ }

# orientation
# ./droid orientation
orientation=$(./droid orientation)

# inches - this one may fail too, cause we need resolution and density to calculate an aproximate screen inches
# ./droid inches
inches=$(./droid inches)

Step 2 - calculate virtual display resolution

Now we have the resolution let's calculate an virtual display size

# ./display calcRes $resolution $inches
virtual=$(./display calcRes $resolution $inches | grep virtual | grep -Po "(\d+x\d+)")

Step 3 - set virtual display resolution

Let's set the resolution for display 1. Depending on orientation we change order of width and height.

virtual=(${virtual/x/ })
width=${virtual[0]}
height=${virtual[1]}
if [ "$orientation" == 0 ] || [ "$orientation" == 2]; then
  # portrait
  ./display setRes 1 $width $height
else
  # landscape
  ./display setRes 1 $height $width
fi

Step 4 - share display on vnc

./vnc start 1

Step 5 - share vnc connection directly to device

./droid start vnc://{your local ip address}:5900

Here we can also use adb reverse tcp:5900 tcp:5900 to make a tunnel using usb cable, but it only works on android 5.0+.

Step 6 - clean

Shutdown display and remove configurations from it.

./display remove 1

if you still want to do it by hand

Follow this tutorial.

Similar apps

This app will be made by the rage because we have a lot of apps for all other platforms Only linux isn't supported by those apps.

Splashtop appear to have a beta, for linux.
\o/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].