Pushes/mirrors selected XWindow to remote via SSH port forwarding
By default remote(s) should have vncviewer
installed to display forwarded XWindow sessions from x11vnc, eg...
ssh raspberrypi <<'EOF'
sudo apt-get update && {
sudo apt-get install vncviewer
}
EOF
This repository makes use of Git Submodules for tracking dependencies, please use the --recurse-submodules
option to ensure a complete download when cloning, eg...
git clone --recurse-submodules [email protected]:rpi-curious/x11vnc-push-xwindow.git
To update tracked Git Submodules issue the following commands...
git pull
git submodule update --init --merge --recursive
To force upgrade of Git Submodules...
git submodule update --init --merge --recursive --remote
Note, forcing and update of Git Submodule tracked dependencies may cause instabilities and/or merge conflicts; if however everything operates as expected after such an update, then please consider submitting a Pull Request.
Make a directory path for organizing Git repositories...
mkdir -vp ~/git/hub/rpi-curious
Change current working directory...
cd ~/git/hub/rpi-curious
Clone this repository...
git clone --recurse-submodules [email protected]:rpi-curious/x11vnc-push-xwindow.git
Change current working directory to the root of this repository...
cd ~/git/hub/rpi-curious/x11vnc-push-xwindow
Install the x11vnc-push-xwindow
script via a symbolic link to a PATH
accessible directory, eg...
mkdir ~/bin
ln -s "${PWD}/x11vnc-push-xwindow" "${HOME}/bin/"
Print help documentation with the --help
option...
x11vnc-push-xwindow --help
Forward a local XWindow session to remote SSH host...
x11vnc-push-xwindow raspberrypi
... click on the XWindow to forward.
Note, above command assumes configurations within your local SSH config file similar to the following...
~/.ssh/config
(snip)
Host raspberrypi
IdentitiesOnly yes
IdentityFile ~/.ssh/id_rsa
HostName 192.168.0.5
User pi
To forward entire XWindows session instead of a target window run the x11vnc-push-xwindow
script with --id=none
, eg...
x11vnc-push-xwindow --id='none' raspberrypi
The failure
trap will be triggered when forwarding/mirroring is exited, currently this is normal/expected behavior.
This repository may not be feature complete and/or fully functional, Pull Requests that add features or fix bugs are certainly welcomed.
-
Fork this repository to an account that you have write permissions for.
-
Add remote for fork URL. The URL syntax is
[email protected]:<NAME>/<REPO>.git
...
cd ~/git/hub/rpi-curious/x11vnc-push-xwindow
git remote add fork [email protected]:<NAME>/x11vnc-push-xwindow.git
- Commit your changes and push to your fork, eg. to fix an issue...
cd ~/git/hub/rpi-curious/x11vnc-push-xwindow
git commit -F- <<'EOF'
:bug: Fixes #42 Issue
**Edits**
- `<SCRIPT-NAME>` script, fixes some bug reported in issue
EOF
git push fork main
Note, the
-u
option may be used to setfork
as the default remote, eg.git push fork main
however, this will also default thefork
remote for pulling from too! Meaning that pulling updates fromorigin
must be done explicitly, eg.git pull origin main
- Then on GitHub submit a Pull Request through the Web-UI, the URL syntax is
https://github.com/<NAME>/<REPO>/pull/new/<BRANCH>
Note; to decrease the chances of your Pull Request needing modifications before being accepted, please check the dot-github repository for detailed contributing guidelines.
Pushes/mirrors selected XWindow to remote via SSH port forwarding
Copyright (C) 2020 S0AndS0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, version 3 of the License.
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 Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For further details review full length version of AGPL-3.0 License.