Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: X2Go dev team <git-admin-P0WSJaAXTow <at> public.gmane.org>
Subject: pyhoca-cli.git - build-main (branch) updated: 0.2.0.4-22-g5130c68
Newsgroups: gmane.linux.terminal-server.x2go.scm
Date: Monday 10th December 2012 13:53:48 UTC (over 3 years ago)
The branch, build-main has been updated
       via  5130c68a32059081564bea14d8c497dd83a32918 (commit)
       via  28400324571e4e4dd66974a548a08004ab4a4352 (commit)
       via  ee08a8ebff88830fbe319be357b0ed15707c0865 (commit)
       via  0030b69eeb79b9d7b6aa34e8e0e1f2552a1bfeb6 (commit)
       via  63934b80f7207db2def899451b9f36f71ee02997 (commit)
       via  dd6a9ef228a597ce6e5cb14af2746489675e83f1 (commit)
       via  410289b22b14fbb1ddb97be965406c01e384a86f (commit)
       via  825b50999110441eebcb81782cd79234344ae0c3 (commit)
       via  d8f65485337578f6a0075495b13d9710cb007a1d (commit)
       via  e047a7607e02a2ab9bbcd9c98692e429f20e6910 (commit)
       via  7deba5343c345baf7d347c6c6363e870e45c766d (commit)
       via  fd23c68a8afe2c105fc87a0e0de15431af552dc9 (commit)
       via  be31a062f20be2f8070892ca12695193976d17c5 (commit)
       via  506e2e7cf69dc9bc29e10092e3d29739484b41d0 (commit)
       via  7feaee0c3c7773c1a18189f111e447175cb569a2 (commit)
       via  ec4d9d6b5754539766b92594c4bb21ab8ebcc184 (commit)
       via  03eb8165d43acb4e1bbf56594d8179e7b563b4de (commit)
       via  49aa9fef7e76a274a62bdbc801244ba875565532 (commit)
       via  84999ab5f157d234b1854aa8b7f3ca13bdbcd9cb (commit)
       via  83a392d159e4f817b3977ae274a80489e8d5b50b (commit)
       via  f1fa7df429bbd37e146b36f688ad32dc0a16889d (commit)
       via  6aae7a97b952b6211d8993cea97ec05564cff287 (commit)
      from  0bea1484b609f45b77cae90dafd096525e2dbcbe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5130c68a32059081564bea14d8c497dd83a32918
Author: Mike Gabriel

Date:   Mon Dec 10 14:52:10 2012 +0100

    release 0.2.1.0

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog       |   22 ++++++++++++++++++++++
 debian/control         |    8 ++++----
 debian/rules           |    4 ++--
 man/man1/pyhoca-cli.1  |   24 ++++++++++++++++--------
 pyhoca-cli             |   28 +++++++++++++++++++---------
 pyhoca/cli/__init__.py |    2 +-
 pyhoca/cli/frontend.py |   24 ++++++++++++++----------
 7 files changed, 78 insertions(+), 34 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index a076235..7521d2c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
+pyhoca-cli (0.2.1.0-0~x2go1) unstable; urgency=low
+
+  * New upstream version (0.2.1.0):
+    - Add cmdline option --from-stdin that facilitates lightdm remote
login
+      session startup.
+    - The option ,,password'' is not allowed for session registration.
+    - When finishing the application, update session status before
reporting
+      back to the user what happened to the session.
+    - Remove cmdline option --time-to-wait, Python X2Go now offers a
progress
+      status for session startup/resumption. So we query this status
instead.
+  * /debian/control:
+    + Maintainer change in package: X2Go Developers
.
+    + Reduce python version in Build-Depends to allow build on Ubuntu
10.04.
+    + Depend on python-x2go (>= 0.2.1.0).
+  * /debian/rules:
+    + Allow package build on systems with missing dh_python2.
+  * /man/man1/pyhoca-cli.1:
+    + Mention keyboard auto detection switch.
+    + Mention possible geometry value: maximize.
+
+ -- Mike Gabriel
  Mon, 10
Dec 2012 14:51:11 +0100
+
 pyhoca-cli (0.2.0.4-0~x2go1) unstable; urgency=low
 
   * New upstream version (0.2.0.4):
diff --git a/debian/control b/debian/control
index ce61f60..dfcb0f1 100644
--- a/debian/control
+++ b/debian/control
@@ -1,13 +1,13 @@
 Source: pyhoca-cli
 Section: python
 Priority: optional
-Maintainer: X2Go Packaging Team

+Maintainer: X2Go Developers

 Uploaders:
  Mike Gabriel

 Build-Depends: 
  debhelper (>= 7.0.50~),
  man2html-base | man2html,
- python (>=2.6.6-3~),
+ python (>=2.6.5-0~),
  python-setuptools,
  python-x2go
 Standards-Version: 3.9.3
@@ -21,14 +21,14 @@ Architecture: all
 Depends: 
  ${misc:Depends},
  python,
- python-x2go (>=0.2.0.2-0~),
+ python-x2go (>=0.2.1.0-0~),
  python-argparse,
  python-setproctitle,
  python-support (>=0.90)
 Description: Command line X2Go client written in Python
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - client side printing support
diff --git a/debian/rules b/debian/rules
index 8f217cb..c8ce66b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,10 @@
 # Based on sample debian/rules file - for GNU Hello (1.3).
 # Copyright 2010-2012 by Mike Gabriel

 
-PYVERS=$(shell pyversions -vr)
+WITH_PYTHON2 = $(shell test -f /usr/bin/dh_python2 && echo "--with
python2")
 
 %:
-	dh ${@} --with python2
+	dh ${@} ${WITH_PYTHON2}
 
 override_dh_auto_clean:
 	rm -Rf PyHoca_CLI.egg-info/
diff --git a/man/man1/pyhoca-cli.1 b/man/man1/pyhoca-cli.1
index 0407536..d88b486 100644
--- a/man/man1/pyhoca-cli.1
+++ b/man/man1/pyhoca-cli.1
@@ -5,7 +5,7 @@
 \\$2 \(la\\$1\(ra\\$3
 ..
 .if \n(.g .mso www.tmac
-.TH pyhoca-cli 1 "Apr 2012" "Version 0.1.4.x" "X2Go Application"
+.TH pyhoca-cli 1 "Nov 2012" "Version 0.2.1.x" "X2Go Application"
 .SH NAME
 pyhoca-cli \- X2Go command line client written in Python
 .SH SYNOPSIS
@@ -85,8 +85,19 @@ Suspend running X2Go session . A special
value for 
 \*(T<\fB\-T, \-\-terminate\fR \fI\fR\*(T> 
 Terminate running X2Go session . A special value for
 is ,,ALL'' (will terminate all sessions of the connected
user).
 .TP 
-\*(T<\fB\-L, \-\-list-sessions\fR\*(T> 
+\*(T<\fB\-L, \-\-list-sessions\fR\*(T>
 List user's X2Go sessions on server.
+.TP
+\*(T<\fB\-\-from-stdin\fR\*(T>
+For LightDM remote login integration: read  
  from STDIN' and start a new session, transfer
+a running session or resume a suspended session.
+
+If there are several sessions running/suspended of the same desktop shell,
then the first
+session found will be transferred/resumed. If there are several sessions
running with a different desktop shell as session type (or even
+rootless sessions) none of these session will be touched unless any of the
discovered sessions match in the requested desktop shell (i.e.
+X2Go session type).
+
+This option is only available for the Linux version of \fBpyhoca-cli\fR.
 .SH ACTION OPTIONS
 \fBpyhoca-cli\fR actions can be tweaked by these options:
 .TP
@@ -129,9 +140,6 @@ Use X2Go printing (default: disabled).
 \*(T<\fB\-\-share-mode\fR \fI{0|1}\fR\*(T> 
 Share mode for X2Go desktop sharing (0: view-only, 1: full access).
 .TP
-\*(T<\fB\-\-time-to-wait\fR\*(T> 
-Time to wait for session startup/resume (default: 8s). There should be no
need to touch this, unless on very slow network connections.
-.TP
 \*(T<\fB\-\-auth-attempts\fR \fI{0,1,2,3,...}\fR\*(T> 
 Number of interactive authentication attempts in case authentication with
the server fails (wrong password?). A value that equals 0
 disables interactive authentication completely and requires that a private
SSH key has been given on the command line or in the
@@ -141,7 +149,7 @@ LDAP support is planned to be added into
\fBpyhoca-cli\fR in the near future. So
 .PP
 .SH NX OPTIONS (Version 3) 
 .TP
-\*(T<\fB\-g, \-\-geometry\fR \fI{x|fullscreen}\fR\*(T> 
+\*(T<\fB\-g, \-\-geometry\fR
\fI{x|fullscreen|maximize}\fR\*(T> 
 Screen geometry (default: '800x600').
 .TP 
 \*(T<\fB\-q, \-\-link\fR \fI{modem|isdn|adsl|wan|lan}\fR\*(T> 
@@ -158,8 +166,8 @@ Compression method (see below for possible values).
 \*(T<\fB\-\-kbd\-layout\fR \fI{us|de|fr|...}\fR\*(T>
 Use keyboard layout (default: 'us').
 .TP 
-\*(T<\fB\-\-kbd\-type\fR \fI{pc105/us|pc105/de|...}\fR\*(T>
-Set Keyboard type (default 'pc105/us').
+\*(T<\fB\-\-kbd\-type\fR \fI{auto|pc105/us|pc105/de|...}\fR\*(T>
+Set Keyboard type (default 'pc105/us'). Use \fIauto\fR as value here to
enable X2Go's keyboard auto-detection code.
 .SH COMPATIBILITY OPTIONS
 \fBpyhoca-cli\fR aims at being fully compatible with all command line
options and session config files of the X2Go project's X2Go command
 line client \fBx2goclient-cli\fR as well as the \fBx2goclient\fR GUI. This
is still work in progress. 
diff --git a/pyhoca-cli b/pyhoca-cli
index fcd02fb..4e48dee 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -71,7 +71,7 @@ if hasattr(sys, 'frozen') and sys.frozen in
("windows_exe", "console_exe"):
 
 app = sys.argv[0]
 if app.startswith('./'):
-    sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
+    sys.path.insert(0, os.getcwd())
     os.environ['PYTHONX2GO_LOCAL'] = '1'
 
 PROG_OPTIONS = sys.argv[1:]
@@ -137,6 +137,11 @@ action_options =   [
                    {'args':['-l','--list-profiles'], 'default': False,
'action': 'store_true', 'help': 'list user\'s X2Go pre-configured session
profiles', },
                    {'args':['-P','--session-profile'], 'default': None,
'help': 'load x2goclient session profiles and use the session profile
SESSION_PROFILE', },
                  ]
+if _X2GOCLIENT_OS == "Linux":
+    action_options.append(
+                   {'args':['--from-stdin'], 'default': False, 'action':
'store_true', 'help': 'for LightDM remote login: read  
  from STDIN', },
+    )
+
 # debug options...
 debug_options =  [ 
                    {'args':['-d','--debug'], 'default': False, 'action':
'store_true', 'help': 'enable application debugging code', },
@@ -160,7 +165,6 @@ x2go_options =   [
                    {'args':['-F', '--share-local-folders'], 'metavar':
'[,http://wiki.x2go.org
 
 """
-__VERSION__ = "0.2.0.4"
+__VERSION__ = "0.2.1.0"
 
 from frontend import *
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 7636399..d1fc341 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -71,11 +71,9 @@ class PyHocaCLI(x2go.X2goClient):
     """
     x2go_session_hash = None
 
-
     def _runtime_error(self, m, exitcode=-1):
         runtime_error(m, exitcode=exitcode)
 
-
     def list_sessions(self, s_hash):
         """\
         List up server-side available sessions for the logged in user.
@@ -377,7 +375,6 @@ class PyHocaCLI(x2go.X2goClient):
             self.x2go_session_hash =
self._X2goClient__register_session(args.server,
port=int(self.args.remote_ssh_port), 
                                                           
known_hosts=ssh_known_hosts_filename,
                                                           
username=self.args.username,
-                                                          
password=self.args.password,
                                                           
key_filename=self.args.ssh_privkey,
                                                           
add_to_known_hosts=self.args.add_to_known_hosts,
                                                            profile_name =
'Pyhoca-Client_Session',
@@ -492,7 +489,7 @@ class PyHocaCLI(x2go.X2goClient):
                 self._pyhoca_logger("give the X2Go session some time to
come up...", loglevel=x2go.loglevel_NOTICE, )
 
             i=0
-            while i < self.args.time_to_wait:
+            while 0 <
self.get_session(self.x2go_session_hash).get_progress_status() < 100:
                 time.sleep(1)
                 i+=1
 
@@ -502,12 +499,15 @@ class PyHocaCLI(x2go.X2goClient):
                 session_name =
self._X2goClient__get_session_name(self.x2go_session_hash)
                 self._pyhoca_logger("X2Go session is now running, the X2Go
client's profile name is: %s" % profile_name, loglevel=x2go.loglevel_INFO,
)
                 self._pyhoca_logger("X2Go session name is: %s" %
session_name, loglevel=x2go.loglevel_INFO, )
-                if self.args.share_desktop:
-                    self._pyhoca_logger("Press CTRL+C to end desktop
sharing for this session...", loglevel=x2go.loglevel_NOTICE, )
-                elif self.args.terminate_on_ctrl_c:
-                    self._pyhoca_logger("Press CTRL+C to terminate the
running session...", loglevel=x2go.loglevel_NOTICE, )
-                else:
-                    self._pyhoca_logger("Press CTRL+C to suspend the
running session...", loglevel=x2go.loglevel_NOTICE, )
+
+                if not self.args.from_stdin:
+
+                    if self.args.share_desktop:
+                        self._pyhoca_logger("Press CTRL+C to end desktop
sharing for this session...", loglevel=x2go.loglevel_NOTICE, )
+                    elif self.args.terminate_on_ctrl_c:
+                        self._pyhoca_logger("Press CTRL+C to terminate the
running session...", loglevel=x2go.loglevel_NOTICE, )
+                    else:
+                        self._pyhoca_logger("Press CTRL+C to suspend the
running session...", loglevel=x2go.loglevel_NOTICE, )
 
                 try:
 
@@ -521,6 +521,10 @@ class PyHocaCLI(x2go.X2goClient):
                     # wait a little while before telling the user what has
happened
                     time.sleep(2)
 
+                    # refresh session status so we can be most accurate on
what we report below
+                   
self._X2goClient__list_sessions(self.x2go_session_hash)
+
+                    # report about the session status once we get here...
                     if
self._X2goClient__has_session_terminated(self.x2go_session_hash):
                         self._pyhoca_logger("X2Go session %s has
terminated" % session_name, loglevel=x2go.loglevel_NOTICE, )
                     elif
self._X2goClient__is_session_suspended(self.x2go_session_hash):


hooks/post-receive
 
CD: 14ms