gdm r6732 - in branches/gnome-2-20: . utils



Author: bcameron
Date: Wed Feb 25 01:24:00 2009
New Revision: 6732
URL: http://svn.gnome.org/viewvc/gdm?rev=6732&view=rev

Log:
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>.


Modified:
   branches/gnome-2-20/ChangeLog
   branches/gnome-2-20/utils/gdm-ssh-session

Modified: branches/gnome-2-20/utils/gdm-ssh-session
==============================================================================
--- branches/gnome-2-20/utils/gdm-ssh-session	(original)
+++ branches/gnome-2-20/utils/gdm-ssh-session	Wed Feb 25 01:24:00 2009
@@ -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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]