https://github.com/ChipCE/Smartphone-tablet-as-second-monitor-for-linux
Use android as second monitor for linux
https://github.com/ChipCE/Smartphone-tablet-as-second-monitor-for-linux
Last synced: 5 months ago
JSON representation
Use android as second monitor for linux
- Host: GitHub
- URL: https://github.com/ChipCE/Smartphone-tablet-as-second-monitor-for-linux
- Owner: ChipCE
- Archived: true
- Created: 2018-11-04T14:03:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-27T08:03:54.000Z (11 months ago)
- Last Synced: 2024-08-08T18:22:51.151Z (9 months ago)
- Language: Shell
- Size: 1.26 MB
- Stars: 123
- Watchers: 7
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - ChipCE/Smartphone-tablet-as-second-monitor-for-linux - Use android as second monitor for linux (others)
README
# Smartphone/tablet as second monitor for linux
Simple cli tool to create virtual monitor for Linux. You can use any remote desktop software(vnc,teamviewer ..) to connect to that monitor.- This tool uses xrandr so it will not work with wayland or if your GPU does not support xrandr commands.

## Setup
### The hard way (not that hard :3)
This script is example of Nexus 7 2013 as second monitor.You may need to change 1920 and 1200 to the resolution of your tablet screen. You may also need to change LVDS1 if the default monitor's name is different.
gtf 1920 1200 60 | grep -oP "\\".+"
The output will be something similar to
"1920x1200_60.00" 108.88 1920 1360 1496 1712 1200 1025 1028 1060 -HSync +Vsync
. Copy everything into the next command.
xrandr --newmode "1920x1200_60.00" 108.88 1920 1360 1496 1712 1200 1025 1028 1060 -HSync +Vsync
xrandr --addmode VIRTUAL1 1920x1200_60.00
xrandr --output VIRTUAL1 --mode 1920x1200_60.00 --primary --right-of LVDS1
### The easier way
- Clone this gitgit clone https://github.com/ChipCE/Smartphone-tablet-as-second-monitor-for-linux
- Change directorycd Smartphone-tablet-as-second-monitor-for-linux
- Run install script as root and follow the instruction.sudo ./install.sh
- runvmon setup
to setup virtual monitor profile.
This command need to be executed each time X server start.
- runvmon enable
to enable virtual monitor. If success, you will able to se an additional monitor in "display" setting.
- Connect to host system using Teamviewr, VNC or any screen sharing program.
- To disable vmon, runvmon disable
## Configuration
### vmon configuration
- vmon config file are saved in /home/$USER/.vmon
- You can add more custom resolution into resoluton.conf file.
- Default resolution and default display(the main output display) can be set in vmon.conf.For more information about ouput displays and supported resolution profiles, runxrandr
in terminal.
### Other configuration (teamviewer)
- To show cursor in tablet screen, enable "show remote cursor" in teamviewer(tablet).
- To connect with wlan, enable "incomming lan connection" in Extras > Options(linux).
- To connect via USB cable, you need adb installed and forward Teamviewer port withadb forward
or enable USB Tethering in android setting.
- To turn-off VIRTUAL1 output, runxrandr --output VIRTUAL1 --off
## Troubleshooting
### 1.VIRTUAL1 not found error
If you get the output VIRTUAL1 not found error, create 20-intel.conf file:sudo nano /usr/share/X11/xorg.conf.d/20-intel.conf
Add the following configuration information into the file:
Section "Device"
Identifier "intelgpu0"
Driver "intel"
Option "VirtualHeads" "2"
EndSection
and reboot.### 2.Teamviewer error : Not ready. Please check your connection error
- Check if teamviewerd has been started, if not start itsystemctl start teamviewerd
- installlibicu
and restart teamviewer.