This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit 3e09aa96afc106a7a7a35057dfd006384d017aa8
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Fri Nov 19 22:28:09 2010 +0000
* wrong copyright header
* removed Replaces:-line in control file
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@71 cdb5e8f1-f799-4276-8919-bce57fd91830
---
debian/control | 1 -
pyhoca/__init__.py | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/debian/control b/debian/control
index eb220a8d..559181ae 100644
--- a/debian/control
+++ b/debian/control
@@ -8,7 +8,6 @@ Homepage: http://das-netzwerkteam.de/site/?q=node/71
XS-Python-Version: all
Package: pyhoca-cli
-Replaces: pyhoca-cli
Architecture: all
Depends: ${misc:Depends}, python, python-x2go (>=0.0.14-0~nwt1), python-argparse
Description: An command line X2go client written in Python
diff --git a/pyhoca/__init__.py b/pyhoca/__init__.py
index 6d579482..6204815a 100644
--- a/pyhoca/__init__.py
+++ b/pyhoca/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-# Copyright (C) 2010 by Dick Kniep <m.gabriel(a)das-netzwerkteam.de>
+# Copyright (C) 2010 by Mike Gabriel <m.gabriel(a)das-netzwerkteam.de>
#
# PyHoca CLI is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit e636fd356c9a1d3da2df9d6d9f4df487b10b28f4
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Tue Nov 9 09:11:03 2010 +0000
* adapted pyhoca-cli to changes in X2goClient API (strict separation of session
profile based methods and session oriented methods)
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@39 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 7401ec8b..5e4459c5 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -191,13 +191,14 @@ class PyHocaCLI(x2go.X2goClient):
x2go.X2goClient.__init__(self, logger=liblogger)
- if self.args.session_profile and self.has_session_profile(self.args.session_profile):
+ _session_profiles = self._X2goClient__get_session_profiles()
+ if self.args.session_profile and _session_profiles.has_profile(self.args.session_profile):
- self.x2go_session_hash = self.register_session(profile_name=self.args.session_profile)
+ self.x2go_session_hash = self._X2goClient__register_session(profile_name=self.args.session_profile)
else:
- self.x2go_session_hash = self.register_session(args.server, port=int(self.args.remote_ssh_port),
+ self.x2go_session_hash = self._X2goClient__register_session(args.server, port=int(self.args.remote_ssh_port),
username=self.args.username,
password=self.args.password,
key_filename=self.args.ssh_privkey,
@@ -287,31 +288,31 @@ class PyHocaCLI(x2go.X2goClient):
profile_name = self.get_profile_name(self.x2go_session_hash)
session_name = self.get_session_name(self.x2go_session_hash)
- self.logger("X2go session is now running, the X2go client's profile name is: %s." % profile_name, x2go.loglevel_INFO, )
- self.logger("X2go session name is: %s." % session_name, x2go.loglevel_INFO, )
- self.logger("Press CTRL+C to suspend the running session.", x2go.loglevel_NOTICE, )
+ self.logger("X2go session is now running, the X2go client's profile name is: %s" % profile_name, x2go.loglevel_INFO, )
+ self.logger("X2go session name is: %s" % session_name, x2go.loglevel_INFO, )
+ self.logger("Press CTRL+C to suspend the running session...", x2go.loglevel_NOTICE, )
try:
session_duration = 0
mounted = False
- while self.session_ok(self.x2go_session_hash):
+ while self._X2goClient__session_ok(self.x2go_session_hash):
time.sleep(2)
session_duration +=2
# wait a little longer before telling the user what had happened
time.sleep(2)
- if self.has_terminated(self.x2go_session_hash):
- self.logger("X2go session %s has terminated." % session_name, x2go.loglevel_NOTICE, )
- elif self.is_suspended(self.x2go_session_hash):
- self.logger("X2go session %s has been suspended." % session_name, x2go.loglevel_NOTICE, )
- elif self.is_running(self.x2go_session_hash):
- self.logger("X2go session %s has been moved to a different screen." % session_name, x2go.loglevel_NOTICE, )
+ if self._X2goClient__has_terminated(self.x2go_session_hash):
+ self.logger("X2go session %s has terminated" % session_name, x2go.loglevel_NOTICE, )
+ elif self._X2goClient__is_suspended(self.x2go_session_hash):
+ self.logger("X2go session %s has been suspended" % session_name, x2go.loglevel_NOTICE, )
+ elif self._X2goClient__is_running(self.x2go_session_hash):
+ self.logger("X2go session %s has been moved to a different screen" % session_name, x2go.loglevel_NOTICE, )
except KeyboardInterrupt:
- self.logger("Suspending X2go session %s." % session_name, x2go.loglevel_INFO, )
+ self.logger("Suspending X2go session %s" % session_name, x2go.loglevel_INFO, )
self._X2goClient__suspend_session(self.x2go_session_hash)
# giving nxproxy's SSH tunnel some time to settle
time.sleep(2)
- self.logger("X2go session %s has been suspended." % session_name, x2go.loglevel_NOTICE, )
+ self.logger("X2go session %s has been suspended" % session_name, x2go.loglevel_NOTICE, )
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit a077a980c6b5e7e2bd4b09c62c4c29fe590a9b1b
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sun Nov 7 00:34:00 2010 +0000
* added --session-profile option (run a session profile as configured in ~/.x2goclient/sessions)
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@31 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca-cli | 4 ++++
pyhoca/cli/frontend.py | 20 ++++++++++----------
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 974f7856..aedcdaa4 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -203,6 +203,10 @@ Possible values for the --pack NX option are:
if not x2go.utils.is_in_nx3packmethods(a.pack):
runtime_error("unknown pack method '%s'" % args.pack, parser=p, exitcode=10)
+ else:
+ if not (a.resume or a.suspend or a.terminate or a.list_sessions):
+ a.new = True
+
# X2go printing
if ((a.pdfview_cmd and a.printer) or
(a.pdfview_cmd and a.save_to_folder) or
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 11ff709a..5546e41a 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -118,7 +118,10 @@ class PyHocaCLI(x2go.X2goClient):
"""
# start a new session and run a command
self.logger('starting a new X2go session', x2go.loglevel_INFO, )
- self.logger('Command for new session is: %s' % self.args.command, x2go.loglevel_DEBUG, )
+ if self.args.session_profile is None:
+ self.logger('command for new session is: %s' % self.args.command, loglevel=x2go.loglevel_DEBUG, )
+ else:
+ self.logger('command from session profile to run is: %s' % self.session_registry(self.x2go_session_hash).session_params['cmd'], loglevel=x2go.loglevel_DEBUG, )
self._X2goClient__start_session(s_hash)
@@ -176,12 +179,12 @@ class PyHocaCLI(x2go.X2goClient):
self.logger('preparing requested X2go session', x2go.loglevel_NOTICE, )
x2go.X2goClient.__init__(self, logger=liblogger)
- _profile_id = None
- if self.args.session_profile:
- self.load_session_profiles()
- _profile_id = self.get_profile_id(self.args.session_profile)
- if not _profile_id:
+ if self.args.session_profile and self.has_session_profile(self.args.session_profile):
+
+ self.x2go_session_hash = self.register_session(profile_name=self.args.session_profile)
+
+ else:
self.x2go_session_hash = self.register_session(args.server, port=int(self.args.remote_ssh_port),
username=self.args.username,
@@ -202,9 +205,6 @@ class PyHocaCLI(x2go.X2goClient):
print_action_args=self.args.print_action_args,
share_local_folders=self.args.share_local_folders,
cmd=self.args.command)
- else:
-
- self.x2go_session_hash = self.register_session(profile_id = _profile_id)
self.with_session(self.x2go_session_hash).load_host_keys(ssh_known_hosts_filename)
@@ -256,7 +256,7 @@ class PyHocaCLI(x2go.X2goClient):
self.new_session(self.x2go_session_hash)
# finally call the MainLoop of PyHocaCLI
- if not (self.args.new or self.args.resume):
+ if not (self.args.new or self.args.resume or self.args.session_profile):
sys.exit(0)
# give the session some time to come up...
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit 5cf374abea625fe956a7db380b3e1f7a00f6b4e5
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Mon Nov 1 09:50:29 2010 +0000
* fixed pyhoca-cli
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@20 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca-cli | 5 ++--
pyhoca/cli/frontend.py | 62 ++++++++++++++++++++++++++++++++++++++------------
2 files changed, 50 insertions(+), 17 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 632c0fa9..97bb404e 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -45,7 +45,7 @@ from x2go.defaults import DEFAULT_PDFVIEW_CMD
from x2go.defaults import DEFAULT_PDFSAVE_LOCATION
from x2go.defaults import DEFAULT_PRINTCMD_CMD
-from pyhoca.cli import current_home, PyHocaCLI
+from pyhoca.cli import current_home, PyHocaCLI, runtime_error
# version information
PROG_NAME = os.path.basename(sys.argv[0])
@@ -136,8 +136,8 @@ def version():
def parseargs():
- global DEBUG
global logger
+ global liblogger
p = argparse.ArgumentParser(description='X2go command line client implemented in Python.',\
epilog="""
@@ -296,6 +296,7 @@ if __name__ == '__main__':
thisPyHocaCLI = PyHocaCLI(args, logger=logger, liblogger=liblogger)
thisPyHocaCLI.authenticate()
thisPyHocaCLI.MainLoop()
+
sys.exit(0)
except (KeyboardInterrupt, SystemExit), e:
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 15a85d74..6706c32e 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -44,12 +44,22 @@ ssh_config_filename = os.path.join(current_home, '.ssh', 'config')
if not os.path.isfile(ssh_config_filename):
self._touch_file(ssh_config_filename)
-def _touch_file(self, filename):
+def _touch_file(filename):
if not os.path.isfile(filename):
f = open(filename, 'w')
f.close()
+# sometimes we have to fail...
+def runtime_error(m, parser=None, exitcode=-1):
+ """\
+ STILL UNDOCUMENTED
+ """
+ if parser is not None:
+ parser.print_usage()
+ sys.stderr.write ("%s: error: %s\n" % (os.path.basename(sys.argv[0]), m))
+ sys.exit(exitcode)
+
class PyHocaCLI(x2go.X2goClient):
"""\
@@ -57,13 +67,9 @@ class PyHocaCLI(x2go.X2goClient):
"""
x2go_session_hash = None
- # sometimes we have to fail...
- def runtime_error(self, m, exitcode=-1):
- """\
- STILL UNDOCUMENTED
- """
- sys.stderr.write ("%s: error: %s\n" % (sys.argv[0], m))
- sys.exit(exitcode)
+
+ def _runtime_error(self, m, exitcode=-1):
+ runtime_error(m, exitcode=exitcode)
def list_sessions(self, s_hash):
@@ -103,7 +109,7 @@ class PyHocaCLI(x2go.X2goClient):
"""
# clean all sessions from X2go server
self.logger('cleaning up all running sessions from X2go server: %s' % self.args.server, x2go.loglevel_NOTICE, )
- X2goClient.clean_sessions(self, s_hash)
+ x2go.X2goClient.clean_sessions(self, s_hash)
def new_session(self, s_hash):
@@ -113,7 +119,7 @@ class PyHocaCLI(x2go.X2goClient):
# start a new session and run a command
self.logger('starting a new X2go session', x2go.loglevel_INFO, )
self.logger('Command for new session is: %s' % self.args.command, x2go.loglevel_DEBUG, )
- self.start_session(s_hash)
+ x2go.X2goClient.start_session(self, s_hash)
def resume_session(self, s_hash):
@@ -126,7 +132,7 @@ class PyHocaCLI(x2go.X2goClient):
if self.args.resume in available_sessions.keys():
x2go.X2goClient.resume_session(self, s_hash, self.args.resume)
else:
- self.runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=20)
+ self._runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=20)
def suspend_session(self, s_hash):
@@ -139,7 +145,7 @@ class PyHocaCLI(x2go.X2goClient):
if self.args.suspend in available_sessions.keys():
x2go.X2goClient.suspend_session(self, s_hash, self.args.suspend)
else:
- self.runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=21)
+ self._runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=21)
def terminate_session(self, s_hash):
@@ -152,7 +158,7 @@ class PyHocaCLI(x2go.X2goClient):
if self.args.terminate in available_sessions.keys():
x2go.X2goClient.terminate_session(self, s_hash, self.args.terminate)
else:
- self.runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=22)
+ self._runtime_error('requested session not available on X2go server [%s]:%s.' % (self.args.server, self.args.remote_ssh_port), exitcode=22)
def __init__(self, args, logger=None, liblogger=None):
@@ -164,6 +170,7 @@ class PyHocaCLI(x2go.X2goClient):
logger = x2go.X2goLogger(tag='PyHocaCLI')
else:
self.logger = logger
+ self.logger.tag = 'PyHocaCLI'
# initialize the X2goClient context and start the connection to the X2go server
self.logger('preparing requested X2go session', x2go.loglevel_NOTICE, )
@@ -206,15 +213,40 @@ class PyHocaCLI(x2go.X2goClient):
except x2go.PasswordRequiredException:
self.args.password = getpass.getpass()
except x2go.BadHostKeyException:
- self.runtime_error('SSH host key verification for remote host [%s]:%s failed' % (self.args.server, self.args.remote_ssh_port), exitcode=-254)
+ self._runtime_error('SSH host key verification for remote host [%s]:%s failed' % (self.args.server, self.args.remote_ssh_port), exitcode=-254)
except x2go.SSHException, e:
- self.runtime_error(str(e), exitcode=253)
+ self._runtime_error(str(e), exitcode=253)
def MainLoop(self):
"""\
STILL UNDOCUMENTED
"""
+ if self.args.clean_sessions:
+ self.clean_sessions(self.x2go_session_hash)
+
+ # go through the possible X2go client modes
+ if self.args.list_sessions:
+ # print a beautified session list for the user
+ self.list_sessions(self.x2go_session_hash)
+ sys.exit(0)
+
+ if self.args.resume:
+ self.resume_session(self.x2go_session_hash)
+
+ elif self.args.suspend:
+ self.suspend_session(self.x2go_session_hash)
+
+ elif self.args.terminate:
+ self.terminate_session(self.x2go_session_hash)
+
+ elif self.args.new:
+ self.new_session(self.x2go_session_hash)
+
+ # finally call the MainLoop of PyHocaCLI
+ if not (self.args.new or self.args.resume):
+ sys.exit(0)
+
# give the session some time to come up...
# no CTRL-C is allowed during this phase...
i=0
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit 4e17df006c8eb36d7247ad56abcfc60dda233501
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Fri Nov 5 23:50:49 2010 +0000
* intermediate check-in on the way of proper session profile handling
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@28 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca-cli | 67 ++++++++++++++++++++++++++++----------------------
pyhoca/cli/frontend.py | 55 ++++++++++++++++++++++-------------------
2 files changed, 67 insertions(+), 55 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 97bb404e..974f7856 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -76,7 +76,7 @@ action_options = [
{'args':['-S','--suspend'], 'default': None, 'metavar': 'SESSION_NAME', 'help': 'suspend running X2go session SESSION_NAME', },
{'args':['-T','--terminate'], 'default': None, 'metavar': 'SESSION_NAME', 'help': 'terminate running X2go session SESSION_NAME', },
{'args':['-L','--list-sessions'], 'default': False, 'action': 'store_true', 'help': 'list user\'s X2go sessions on server', },
- # NOT IMPLEMENTED {'args':['-I','--import-session'], 'default': False, 'action': 'store_true', 'help': 'import a session from an x2goclient config file and run it', },
+ {'args':['-P','--session-profile'], 'default': None, 'help': 'load x2goclient session profiles and use the session profile SESSION_PROFILE', },
]
# debug options...
debug_options = [
@@ -177,20 +177,6 @@ Possible values for the --pack NX option are:
if a.version:
version()
- # the --server options is required for most operations
- if not a.server:
- runtime_error ("argument --server 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
- if bool(a.new) + bool(a.resume) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) > 1:
- runtime_error ("modes --new, --resume, --suspend, --terminate and --list-sessions are mutually exclusive", parser=p, exitcode=2)
- if bool(a.new) + bool(a.resume) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) == 0:
- a.new = True
-
- # check if pack method is available
- if not x2go.utils.is_in_nx3packmethods(a.pack):
- runtime_error("unknown pack method '%s'" % args.pack, parser=p, exitcode=10)
-
# if no username is given we use the uid under which this programme is run
if a.username is None:
a.username = current_user
@@ -201,6 +187,22 @@ Possible values for the --pack NX option are:
except ValueError:
runtime_error("--time_to_wait value needs to be an integer value", parser=p, exitcode=80)
+ if not a.session_profile:
+
+ # the --server options is required for most operations
+ if not a.server:
+ runtime_error ("argument --server 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
+ if bool(a.new) + bool(a.resume) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) > 1:
+ runtime_error ("modes --new, --resume, --suspend, --terminate and --list-sessions are mutually exclusive", parser=p, exitcode=2)
+ if bool(a.new) + bool(a.resume) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) == 0:
+ a.new = True
+
+ # check if pack method is available
+ if not x2go.utils.is_in_nx3packmethods(a.pack):
+ runtime_error("unknown pack method '%s'" % args.pack, parser=p, exitcode=10)
+
# X2go printing
if ((a.pdfview_cmd and a.printer) or
(a.pdfview_cmd and a.save_to_folder) or
@@ -257,21 +259,26 @@ Possible values for the --pack NX option are:
if a.share_local_folders is not None:
a.share_local_folders = a.share_local_folders.split(',')
- ###
- ### initialize SSH context
- ###
- # check if SERVER is in .ssh/config file, extract information from there...
- ssh_config = paramiko.SSHConfig()
- from pyhoca.cli import ssh_config_filename
- ssh_config_fileobj = open(ssh_config_filename)
- ssh_config.parse(ssh_config_fileobj)
- ssh_host = ssh_config.lookup(a.server)
- if ssh_host:
- if 'hostname' in ssh_host.keys():
- a.server = ssh_host['hostname']
- if 'port' in ssh_host.keys():
- a.remote_ssh_port = ssh_host['port']
- ssh_config_fileobj.close()
+
+ if a.server:
+
+ ##### TODO: ssh_config to be moved into Python X2go!!!!
+ ###
+ ### initialize SSH context
+ ###
+ # check if SERVER is in .ssh/config file, extract information from there...
+ ssh_config = paramiko.SSHConfig()
+ from pyhoca.cli import ssh_config_filename
+ ssh_config_fileobj = open(ssh_config_filename)
+ ssh_config.parse(ssh_config_fileobj)
+ ssh_host = ssh_config.lookup(a.server)
+ if ssh_host:
+ if 'hostname' in ssh_host.keys():
+ a.server = ssh_host['hostname']
+ if 'port' in ssh_host.keys():
+ a.remote_ssh_port = ssh_host['port']
+ ssh_config_fileobj.close()
+
# check if ssh priv key exists
if a.ssh_privkey and not os.path.isfile(a.ssh_privkey):
runtime_error("SSH private key %s file does not exist." % a.ssh_privkey, parser=p, exitcode=30)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 6df99468..11ff709a 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -176,24 +176,36 @@ class PyHocaCLI(x2go.X2goClient):
self.logger('preparing requested X2go session', x2go.loglevel_NOTICE, )
x2go.X2goClient.__init__(self, logger=liblogger)
- self.x2go_session_hash = self.register_session(args.server, port=int(self.args.remote_ssh_port),
- 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',
- session_type=self.args.session_type,
- link=self.args.link,
- geometry=self.args.geometry,
- pack=self.args.pack,
- cache_type='unix-kde',
- kblayout=self.args.kbd_layout,
- kbtype=self.args.kbd_type,
- snd_system=self.args.sound,
- printing=self.args.printing,
- print_action=self.args.print_action,
- print_action_args=self.args.print_action_args,
- cmd=self.args.command)
+ _profile_id = None
+ if self.args.session_profile:
+ self.load_session_profiles()
+ _profile_id = self.get_profile_id(self.args.session_profile)
+
+ if not _profile_id:
+
+ self.x2go_session_hash = self.register_session(args.server, port=int(self.args.remote_ssh_port),
+ username=self.args.username,
+ password=self.args.password,
+ key_filename=self.args.ssh_privkey,
+ add_to_known_hosts=self.args.add_to_known_hosts,
+ custom_profile_name = 'Pyhoca-Client_Session',
+ session_type=self.args.session_type,
+ link=self.args.link,
+ geometry=self.args.geometry,
+ pack=self.args.pack,
+ cache_type='unix-kde',
+ kblayout=self.args.kbd_layout,
+ kbtype=self.args.kbd_type,
+ snd_system=self.args.sound,
+ printing=self.args.printing,
+ print_action=self.args.print_action,
+ print_action_args=self.args.print_action_args,
+ share_local_folders=self.args.share_local_folders,
+ cmd=self.args.command)
+ else:
+
+ self.x2go_session_hash = self.register_session(profile_id = _profile_id)
+
self.with_session(self.x2go_session_hash).load_host_keys(ssh_known_hosts_filename)
@@ -245,7 +257,6 @@ class PyHocaCLI(x2go.X2goClient):
# finally call the MainLoop of PyHocaCLI
if not (self.args.new or self.args.resume):
- print 'exiting'
sys.exit(0)
# give the session some time to come up...
@@ -271,12 +282,6 @@ class PyHocaCLI(x2go.X2goClient):
time.sleep(2)
session_duration +=2
- if session_duration > 2 and not mounted and self.args.share_local_folders is not None:
- if self.with_session(self.x2go_session_hash).get_transport().reverse_tunnels['sshfs'][1] is not None:
- for _folder in self.args.share_local_folders:
- self.share_local_folder(self.x2go_session_hash, _folder)
- mounted = True
-
# wait a little longer before telling the user what had happened
time.sleep(2)
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to annotated tag 0.1.4.0
in repository x2goclient.
commit 64696c5d103939e4ca68537f322da1aa171d07c3
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Mon Nov 1 09:51:07 2010 +0000
* re-added pyhoca-cli symlinks to Python X2go working copy
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@21 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/x2go | 1 +
x2go | 1 +
2 files changed, 2 insertions(+)
diff --git a/pyhoca/cli/x2go b/pyhoca/cli/x2go
new file mode 120000
index 00000000..b7003701
--- /dev/null
+++ b/pyhoca/cli/x2go
@@ -0,0 +1 @@
+../../../../python/python-x2go/trunk/x2go
\ No newline at end of file
diff --git a/x2go b/x2go
new file mode 120000
index 00000000..3e762901
--- /dev/null
+++ b/x2go
@@ -0,0 +1 @@
+../../python/python-x2go/trunk/x2go
\ No newline at end of file
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git