[X2go-Commits] pyhoca-cli.git - master (branch) updated: 0.2.0.4-6-g03eb816
X2Go dev team
git-admin at x2go.org
Fri Nov 9 17:52:32 CET 2012
The branch, master has been updated
via 03eb8165d43acb4e1bbf56594d8179e7b563b4de (commit)
from 49aa9fef7e76a274a62bdbc801244ba875565532 (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 03eb8165d43acb4e1bbf56594d8179e7b563b4de
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Fri Nov 9 17:51:56 2012 +0100
Add cmdline option --from-stdin that facilitates lightdm remote login session startup.
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 3 +++
man/man1/pyhoca-cli.1 | 13 ++++++++++++-
pyhoca-cli | 25 +++++++++++++++++++++++--
3 files changed, 38 insertions(+), 3 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index eea9c9e..23a24ac 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
pyhoca-cli (0.2.0.5-0~x2go1) UNRELEASED; urgency=low
+ * New upstream version (0.2.0.5):
+ - Add cmdline option --from-stdin that facilitates lightdm remote login
+ session startup.
* /debian/control:
+ Maintainer change in package: X2Go Developers <x2go-dev at lists.berlios.de>.
+ Reduce python version in Build-Depends to allow build on Ubuntu 10.04.
diff --git a/man/man1/pyhoca-cli.1 b/man/man1/pyhoca-cli.1
index 0407536..002cdd1 100644
--- a/man/man1/pyhoca-cli.1
+++ b/man/man1/pyhoca-cli.1
@@ -85,8 +85,19 @@ Suspend running X2Go session <SESSION_NAME>. A special value for <SESSION_NAME>
\*(T<\fB\-T, \-\-terminate\fR \fI<SESSION_NAME>\fR\*(T>
Terminate running X2Go session <SESSION_NAME>. A special value for <SESSION_NAME> 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 <username> <password> <host[:port]> <desktopshell> 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
diff --git a/pyhoca-cli b/pyhoca-cli
index fcd02fb..37bb878 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 <username> <password> <host[:port]> <desktopshell> from STDIN', },
+ )
+
# debug options...
debug_options = [
{'args':['-d','--debug'], 'default': False, 'action': 'store_true', 'help': 'enable application debugging code', },
@@ -260,7 +265,7 @@ Possible values for the --pack NX option are:
if not (a.session_profile or a.list_profiles):
# the --server (or --session-profile) option is required for most operations
- if not a.server:
+ if not a.server and not a.from_stdin:
runtime_error ("argument --server (or --session-profile) is required", parser=p, exitcode=1)
# check for mutual exclusiveness of -N, -R, -S, -T and -L, -N is default if none of them is set
@@ -365,6 +370,22 @@ Possible values for the --pack NX option are:
if not a.ssh_privkey and os.path.isfile('%s/.ssh/id_dsa' % current_home):
a.ssh_privkey = '%s/.ssh/id_dsa' % current_home
+ # lightdm remote login magic takes place here
+ if a.from_stdin:
+
+ lightdm_remote_login_hash = sys.stdin.readline()
+ (a.username, a.password, a.server, a.command) = lightdm_remote_login_hash.split()
+ print a.username
+ print a.password
+ print a.server
+ print a.command
+ # FIXME: this is not IPv6 capable. As we are preparing a draft, we currently ignore that...
+ if ":" in a.server:
+ a.remote_ssh_port = a.server.split(':')[1]
+ a.server = a.server.split(':')[0]
+ a.command = a.command.upper()
+ a.geometry = 'fullscreen'
+
return p, a
hooks/post-receive
--
pyhoca-cli.git (Python X2Go Client (command line client))
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "pyhoca-cli.git" (Python X2Go Client (command line client)).
More information about the x2go-commits
mailing list