summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2009-02-25 01:24:00 +0000
committerBrian Cameron <bcameron@src.gnome.org>2009-02-25 01:24:00 +0000
commit1cad284aa993b849eb0d517ce752860331e1e8ac (patch)
tree93aa37a60143d62d83cf55739f72401a7793d0e4
parent1daa92bd73917d2b79be9bb4afc6903b1e9b994c (diff)
downloadgdm-1cad284aa993b849eb0d517ce752860331e1e8ac.tar.gz
Patch code so that the port value can be entered when doing a remote ssh
2009-02-24 Brian Cameron <brian.cameron@sun.com> * utils/gdm-ssh-session: Patch code so that the port value can be entered when doing a remote ssh connection. Fixes bug #572052. Patch by Thomas Bechtold <thomas@jpberlin.de>. svn path=/branches/gnome-2-20/; revision=6732
-rw-r--r--ChangeLog6
-rw-r--r--utils/gdm-ssh-session11
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c8eaa87..cb78c784 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2009-02-24 Brian Cameron <brian.cameron@sun.com>
+ * utils/gdm-ssh-session: Patch code so that the port value can be
+ entered when doing a remote ssh connection. Fixes bug #572052.
+ Patch by Thomas Bechtold <thomas@jpberlin.de>.
+
+2009-02-24 Brian Cameron <brian.cameron@sun.com>
+
* gui/modules/keymouselistener.c: Using Xorg 1.5, the parse_line
function can fail to set the keycode if XKB is not initialized
when gdmlogin starts. This fix causes GDM to check if the keycode
diff --git a/utils/gdm-ssh-session b/utils/gdm-ssh-session
index b70af907..3a2214a6 100644
--- a/utils/gdm-ssh-session
+++ b/utils/gdm-ssh-session
@@ -1,8 +1,15 @@
#!/bin/bash
ZENITY=`which zenity`
-TARGETHOST=`$ZENITY --title "Host to connect to" --entry --text "Enter the name of the host you want to log in to"`
+TARGETHOSTPORT=`$ZENITY --title "Host and Port to connect to" --entry --text "Enter the name of the host and Port (host:port) you want to log in to."`
+TARGETHOST=${TARGETHOSTPORT%:*}
+TARGETPORT=${TARGETHOSTPORT#*:}
+
+if [[ ! $TARGETHOSTPORT =~ ":" ]]; then
+ TARGETPORT="22"
+fi
+
# @@@ should probably get a user name too;
# for now can bet set using the $USERNAME@ convention
# @@@ should it do an ssh-add so the user doesn't have to enter its passphrase again?
-ssh -A -X -T -n "$TARGETHOST" /etc/X11/Xsession
+ssh -A -X -T -n "$TARGETHOST" -p "$TARGETPORT" /etc/X11/Xsession