feat: Create script to automate virtual second screen#9
Open
rlrosa wants to merge 1 commit into
Open
Conversation
This commit introduces a comprehensive bash script, `tablet-vnc.sh`, that
automates the entire process of creating, managing, and tearing down a virtual
second screen as detailed in README.md.
The script is designed to be user-friendly, replacing the manual multi-step
process with a single command. It includes features such as:
* Named arguments for all options (resolution, display, position).
* Automatic detection of the primary display.
* Optional password protection for the VNC session.
* Robust cleanup of all display modes and temporary files on exit, including
* when interrupted with Ctrl+C.
====
Usage Examples
====
1. Start the virtual screen with default settings (1920x1200 on DisplayPort-0):
./tablet-vnc.sh start
2. To start a custom 1280x800 screen on HDMI-1 to the right of the primary
display, protected with a password:
./tablet-vnc.sh start --width 1280 --height 800 \
--display HDMI-1 --position right-of --password "your_secret_password"
If you really want a "secret" password you'll want to modify the script to read
it from CLI. As is right now it'll be saved in the bash history, so don't use an
important password.
3. To stop and clean up the virtual screen use `ctrl+c` or:
./tablet-vnc.sh stop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a comprehensive bash script,
tablet-vnc.sh, that automates the entire process of creating, managing, and tearing down a virtual second screen as detailed in README.md.The script is designed to be user-friendly, replacing the manual multi-step process with a single command. It includes features such as:
Named arguments for all options (resolution, display, position).
Automatic detection of the primary display.
Optional password protection for the VNC session.
Robust cleanup of all display modes and temporary files on exit, including
when interrupted with Ctrl+C.
====
Usage Examples
./tablet-vnc.sh start
./tablet-vnc.sh start --width 1280 --height 800
--display HDMI-1 --position right-of --password "your_secret_password"
If you really want a "secret" password you'll want to modify the script to read it from CLI. As is right now it'll be saved in the bash history, so don't use an important password.
ctrl+cor:./tablet-vnc.sh stop