Created
May 4, 2012 12:15
-
-
Save piranna/2594470 to your computer and use it in GitHub Desktop.
Script to open a remote X11 graphic session via ssh
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
#!/bin/sh | |
# Script to open a remote X11 graphic session via ssh | |
# | |
# (c) 2012 Jesús Leganés Combarro "piranna" <[email protected]> | |
# for Vaelsys (http://www.vaelsys.com) | |
# | |
# To use it, just set the parameters to you own needs. It requires that you have | |
# a SSH Public-Key Authentication to the remote machine properly configured. | |
# Binaries | |
XINIT=/usr/bin/xinit | |
SSH=/usr/bin/ssh | |
GNOME_SESSION=/usr/bin/gnome-session | |
# Parameters | |
USER=jesus | |
IP=192.168.0.14 | |
DISPLAY=:1 | |
VT=vt8 | |
# Commands | |
CMD="$GNOME_SESSION" | |
SSH_CMD="$SSH -l $USER -C -X $IP $CMD" | |
$XINIT $SSH_CMD -- $DISPLAY $VT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment