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 6c88a4ca7be0ccf9983a0e31baab8bff014865f5
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Thu Dec 2 14:19:13 2010 +0000
* added known_host kwarg to X2goClient__register_session
* added code that recognizes if we are running from development dir or from /usr/bin
* some minor changes
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@112 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca-cli | 17 ++++++++++++-----
pyhoca/cli/frontend.py | 13 +++++++------
pyhoca/cli/x2go | 1 -
3 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 50129691..9a8dab28 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -26,17 +26,21 @@
### module section
###
-import sys, os
+import x2go
+
+import sys
+import os
+app = sys.argv[0]
+if app.startswith('./'):
+ sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
+ os.environ['PYTHONX2GO_LOCAL'] = '1'
+
import time
import argparse
import getpass
-import x2go
import paramiko
from types import *
-# for debugging
-import pprint
-
# Python X2go provides the current local username (OS independent)
from x2go.defaults import CURRENT_LOCAL_USER as current_user
@@ -181,6 +185,9 @@ Possible values for the --pack NX option are:
if a.username is None:
a.username = current_user
+ # statically no password from the command line
+ a.password = None
+
# time-to-wait needs to be an integer
try:
a.time_to_wait = int(a.time_to_wait)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index a4c5aefd..80a5d47b 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -22,13 +22,12 @@
# 2010 Dick Kniep <dick.kniep(a)lindix.nl>
# 2010 Jörg Sawatzki <joerg.sawatzki(a)web.de>
+import x2go
import sys
import os
import copy
import time
import getpass
-import x2go
-import paramiko
from types import *
from gevent import socket
@@ -142,7 +141,7 @@ class PyHocaCLI(x2go.X2goClient):
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.logger('command from session profile to run is: %s' % self.session_registry(self.x2go_session_hash).get_session_cmd(), loglevel=x2go.loglevel_DEBUG, )
self._X2goClient__start_session(s_hash)
@@ -212,12 +211,16 @@ class PyHocaCLI(x2go.X2goClient):
kwargs[a] = v
# setup up the session profile based X2go session
- self.x2go_session_hash = self._X2goClient__register_session(profile_name=self.args.session_profile, **kwargs)
+ self.x2go_session_hash = self._X2goClient__register_session(profile_name=self.args.session_profile,
+ known_hosts=ssh_known_hosts_filename,
+ **kwargs
+ )
else:
# setup up the manually configured X2go session
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,
@@ -237,8 +240,6 @@ class PyHocaCLI(x2go.X2goClient):
share_local_folders=self.args.share_local_folders,
cmd=self.args.command)
- self.with_session(self.x2go_session_hash).load_host_keys(ssh_known_hosts_filename)
-
def authenticate(self):
"""\
diff --git a/pyhoca/cli/x2go b/pyhoca/cli/x2go
deleted file mode 120000
index b7003701..00000000
--- a/pyhoca/cli/x2go
+++ /dev/null
@@ -1 +0,0 @@
-../../../../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
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 4db6a8527c249ac031ae31be3489394087f0191c
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Thu Dec 2 19:25:58 2010 +0000
* indentation fix
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@115 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 80a5d47b..ddc986dc 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -328,8 +328,8 @@ class PyHocaCLI(x2go.X2goClient):
time.sleep(2)
session_duration +=2
- # wait a little longer before telling the user what had happened
- time.sleep(2)
+ # wait a little while before telling the user what has happened
+ time.sleep(2)
if self._X2goClient__has_session_terminated(self.x2go_session_hash):
self._pyhoca_logger("X2go session %s has terminated" % 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 4cc2161303c61194dbd483a304454c4234cee1c7
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Mon Nov 22 19:52:07 2010 +0000
* disabled password on the command line (as it can be a security issue, the command line
can be seen in the process view)
* tasbar icon is not a sub-object of chooser any more
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@110 cdb5e8f1-f799-4276-8919-bce57fd91830
---
man/pyhoca-cli.1 | 3 ---
pyhoca-cli | 1 -
2 files changed, 4 deletions(-)
diff --git a/man/pyhoca-cli.1 b/man/pyhoca-cli.1
index 3b36454c..d0627675 100644
--- a/man/pyhoca-cli.1
+++ b/man/pyhoca-cli.1
@@ -86,9 +86,6 @@ Command to run with \fB\-\-new\fR mode on server (default: xterm).
\*(T<\fB\-u, \-\-username\fR \fI<USERNAME>\fR\*(T>
Username for the session (default: currently logged in user).
.TP
-\*(T<\fB\-p, \-\-password\fR \fI<secret>\fR\*(T>
-User password, usage not recommended directly from the command line, useful for scripting, though (default: not set).
-.TP
\*(T<\fB\-r, \-\-remote-ssh-port\fR \fI<R_PORT>\fR\*(T>
Remote X2go server's SSH port (default: 22).
.TP
diff --git a/pyhoca-cli b/pyhoca-cli
index 2d21c008..50129691 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -91,7 +91,6 @@ x2go_options = [
# NOT IMPLEMENTED {'args':['--config'], 'default': '~/.x2goclient/sessions', 'help': 'x2goclient config file containing x2go session settings (default: ~/.x2goclient/sessions)', },
{'args':['-c','--command'], 'default': 'TERMINAL', 'help': 'command to run with -R mode on server (default: xterm)', },
{'args':['-u','--username'], 'default': None, 'help': 'username for the session (default: current user)', },
- {'args':['-p','--password'], 'default': None, 'help': 'user password (not recommended from the command line, default: not set)', },
{'args':['-r','--remote-ssh-port'], 'default': '22', 'help': 'remote SSH port (default: 22)', },
{'args':['-k','--ssh-privkey'], 'default': None, 'help': 'use file \'SSH_PRIVKEY\' as private key for the SSH connection (e.g. ~/.ssh/id_rsa)', },
{'args':['--add-to-known-hosts'], 'default': False, 'action': 'store_true', 'help': 'add RSA host key fingerprint to ~/.ssh/known_hosts if authenticity of server can\'t be established (default: not set)', },
--
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 6a252cc5d911d1341dbf1c09d370454a0300b09f
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sun Nov 21 13:43:28 2010 +0000
* creating .ssh directory if not present
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@84 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 7da0299b..e69432d5 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -40,9 +40,10 @@ current_home = os.path.expanduser("~")
def _touch_file(filename):
- if not os.path.isfile(filename):
- f = open(filename, 'w')
- f.close()
+ if not os.path.isdir(os.path.dirname(filename)):
+ os.makedirs(os.path.dirname(filename), mode='0755')
+ f = open(filename, 'w')
+ f.close()
# define and create known_hosts file (if not there)
ssh_known_hosts_filename = os.path.join(current_home, '.ssh', 'known_hosts')
--
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 d63d6c97a98b6ed6bf551074cd5452fb101a0592
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sun Nov 21 13:36:17 2010 +0000
* move _touch_file further up in the code
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@83 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index e5c38326..7da0299b 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -38,6 +38,12 @@ from x2go.defaults import X2GO_PRINT_ACTIONS
# use current_home as user home dir
current_home = os.path.expanduser("~")
+def _touch_file(filename):
+
+ if not os.path.isfile(filename):
+ f = open(filename, 'w')
+ f.close()
+
# define and create known_hosts file (if not there)
ssh_known_hosts_filename = os.path.join(current_home, '.ssh', 'known_hosts')
if not os.path.isfile(ssh_known_hosts_filename):
@@ -47,12 +53,6 @@ ssh_config_filename = os.path.join(current_home, '.ssh', 'config')
if not os.path.isfile(ssh_config_filename):
_touch_file(ssh_config_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):
"""\
--
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 a711bdc4dfe3a2862d54e88ee5f5e52c228a9ed9
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sun Nov 21 13:33:13 2010 +0000
* added support for retrieving current local user from x2go module
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@82 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 4a2ca6d7..e5c38326 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -41,11 +41,11 @@ current_home = os.path.expanduser("~")
# define and create known_hosts file (if not there)
ssh_known_hosts_filename = os.path.join(current_home, '.ssh', 'known_hosts')
if not os.path.isfile(ssh_known_hosts_filename):
- self._touch_file(ssh_known_hosts_filename)
+ _touch_file(ssh_known_hosts_filename)
# define and create ssh_config file (if not there)
ssh_config_filename = os.path.join(current_home, '.ssh', 'config')
if not os.path.isfile(ssh_config_filename):
- self._touch_file(ssh_config_filename)
+ _touch_file(ssh_config_filename)
def _touch_file(filename):
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git