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
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 95b44ad28a0d76a50785507d403f281145f99238
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sat Nov 13 21:25:23 2010 +0000
* PyHocaCLI class and its X2goClient parent class now have separate loggers
* X2goSessionExceptions are now caught more globally
* allowing session profile option override from the command line
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@53 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca-cli | 3 +-
pyhoca/cli/frontend.py | 129 ++++++++++++++++++++++++++-----------------------
2 files changed, 71 insertions(+), 61 deletions(-)
diff --git a/pyhoca-cli b/pyhoca-cli
index 0aac277d..2d21c008 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -62,7 +62,7 @@ VERSION: %s
PRINT_ACTIONS = X2GO_PRINT_ACTIONS.keys()
-logger = x2go.X2goLogger(tag='MAIN')
+logger = x2go.X2goLogger()
liblogger = x2go.X2goLogger()
###
@@ -299,6 +299,7 @@ if __name__ == '__main__':
# parse command line
parser, args = parseargs()
+ args.parser = parser
try:
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 9dbaa938..4a2ca6d7 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -190,29 +190,38 @@ class PyHocaCLI(x2go.X2goClient):
"""
self.args = args
if logger is None:
- logger = x2go.X2goLogger(tag='PyHocaCLI')
+ self._pyhoca_logger = x2go.X2goLogger(tag='PyHocaCLI')
else:
- self.logger = copy.deepcopy(logger)
- self.logger.tag = 'PyHocaCLI'
+ self._pyhoca_logger = copy.deepcopy(logger)
+ self._pyhoca_logger.tag = 'PyHocaCLI'
# initialize the X2goClient context and start the connection to the X2go server
- self.logger('preparing requested X2go session', x2go.loglevel_NOTICE, )
+ self._pyhoca_logger('preparing requested X2go session', x2go.loglevel_NOTICE, )
x2go.X2goClient.__init__(self, logger=liblogger)
_profiles = self._X2goClient__get_profiles()
if self.args.session_profile and _profiles.has_profile(self.args.session_profile):
- self.x2go_session_hash = self._X2goClient__register_session(profile_name=self.args.session_profile)
+ # override session profile options by option values from the arg parser
+ kwargs={}
+ if hasattr(self.args, 'parser'):
+ for a, v in self.args._get_kwargs():
+ if v != self.args.parser.get_default(a):
+ 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)
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),
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',
+ profile_name = 'Pyhoca-Client_Session',
session_type=self.args.session_type,
link=self.args.link,
geometry=self.args.geometry,
@@ -261,57 +270,58 @@ class PyHocaCLI(x2go.X2goClient):
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)
+ try:
- if self.args.list_profiles:
- # print a beautified profile list for the user
- self.list_profiles()
- sys.exit(0)
+ if self.args.clean_sessions:
+ self.clean_sessions(self.x2go_session_hash)
- if self.args.resume:
- self.resume_session(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)
- elif self.args.suspend:
- self.suspend_session(self.x2go_session_hash)
+ if self.args.list_profiles:
+ # print a beautified profile list for the user
+ self.list_profiles()
+ sys.exit(0)
- elif self.args.terminate:
- self.terminate_session(self.x2go_session_hash)
+ if self.args.resume:
+ self.resume_session(self.x2go_session_hash)
- elif self.args.new:
- self.new_session(self.x2go_session_hash)
+ elif self.args.suspend:
+ self.suspend_session(self.x2go_session_hash)
- # finally call the MainLoop of PyHocaCLI
- if not (self.args.new or self.args.resume or self.args.session_profile):
- sys.exit(0)
+ elif self.args.terminate:
+ self.terminate_session(self.x2go_session_hash)
- # give the session some time to come up...
- # no CTRL-C is allowed during this phase...
- i=0
- self.logger("give the X2go session some time to come up...", x2go.loglevel_NOTICE, )
- while i < self.args.time_to_wait:
- time.sleep(1)
- i+=1
+ elif self.args.new:
+ self.new_session(self.x2go_session_hash)
- if self._X2goClient__session_ok(self.x2go_session_hash):
+ # finally call the MainLoop of PyHocaCLI
+ if not (self.args.new or self.args.resume or self.args.session_profile):
+ sys.exit(0)
- profile_name = self._X2goClient__get_session_profile_name(self.x2go_session_hash)
- session_name = self._X2goClient__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, )
- try:
+ # give the session some time to come up...
+ # no CTRL-C is allowed during this phase...
+ i=0
+ self._pyhoca_logger("give the X2go session some time to come up...", x2go.loglevel_NOTICE, )
+ while i < self.args.time_to_wait:
+ time.sleep(1)
+ i+=1
- session_duration = 0
- mounted = False
+ if self._X2goClient__session_ok(self.x2go_session_hash):
+ profile_name = self._X2goClient__get_session_profile_name(self.x2go_session_hash)
+ 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, x2go.loglevel_INFO, )
+ self._pyhoca_logger("X2go session name is: %s" % session_name, x2go.loglevel_INFO, )
+ self._pyhoca_logger("Press CTRL+C to suspend the running session...", x2go.loglevel_NOTICE, )
try:
+
+ session_duration = 0
+ mounted = False
+
while self._X2goClient__session_ok(self.x2go_session_hash):
time.sleep(2)
session_duration +=2
@@ -320,20 +330,19 @@ class PyHocaCLI(x2go.X2goClient):
time.sleep(2)
if self._X2goClient__has_session_terminated(self.x2go_session_hash):
- self.logger("X2go session %s has terminated" % session_name, x2go.loglevel_NOTICE, )
+ self._pyhoca_logger("X2go session %s has terminated" % session_name, x2go.loglevel_NOTICE, )
elif self._X2goClient__is_session_suspended(self.x2go_session_hash):
- self.logger("X2go session %s has been suspended" % session_name, x2go.loglevel_NOTICE, )
+ self._pyhoca_logger("X2go session %s has been suspended" % session_name, x2go.loglevel_NOTICE, )
elif self._X2goClient__is_session_running(self.x2go_session_hash):
- self.logger("X2go session %s has been moved to a different screen" % session_name, x2go.loglevel_NOTICE, )
-
- except x2go.X2goSessionException, e:
- self.logger("X2goSessionException occured:", x2go.loglevel_ERROR, )
- self.logger("-> %s" % str(e), x2go.loglevel_ERROR, )
-
- except KeyboardInterrupt:
- 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._pyhoca_logger("X2go session %s has been moved to a different screen" % session_name, x2go.loglevel_NOTICE, )
+
+ except KeyboardInterrupt:
+ self._pyhoca_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._pyhoca_logger("X2go session %s has been suspended" % session_name, x2go.loglevel_NOTICE, )
+
+ except x2go.X2goSessionException, e:
+ self._pyhoca_logger("X2goSessionException occured:", x2go.loglevel_ERROR, )
+ self._pyhoca_logger("-> %s" % str(e), x2go.loglevel_ERROR, )
--
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 06253923cbd57032febb85e4f122a9df31832797
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Sat Nov 20 02:45:12 2010 +0000
* pyhoca-cli build script
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@73 cdb5e8f1-f799-4276-8919-bce57fd91830
---
build-for-reprepro.sh | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/build-for-reprepro.sh b/build-for-reprepro.sh
new file mode 100755
index 00000000..5bc4bf8b
--- /dev/null
+++ b/build-for-reprepro.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Copyright (C) 2010 by Mike Gabriel <m.gabriel(a)das-netzwerkteam.de>
+#
+# This programme is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This programme is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+PACKAGE=pyhoca-cli
+
+rm -f ../$PACKAGE_*.changes
+rm -f ../$PACKAGE_*.upload
+rm -f ../$PACKAGE_*.build
+rm -f ../$PACKAGE_*.dsc
+rm -f ../$PACKAGE_*.tar.gz
+rm -f ../$PACKAGE*.deb
+
+cp debian/changelog debian/changelog.new
+editor debian/changelog.new
+mv debian/changelog.new debian/changelog
+
+debuild
+
+cd ..
+rm -f $PACKAGE_*.upload
+dupload --to nwt-ubuntu $PACKAGE_*.changes
+rm -f $PACKAGE_*.upload
+dupload --to nwt-debian $PACKAGE_*.changes
--
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 a99ff622c1434a570e5334d416d3c390ae6be0f0
Author: mike <mike@cdb5e8f1-f799-4276-8919-bce57fd91830>
Date: Thu Nov 11 09:02:25 2010 +0000
* fixing name tag whe logging (to distinguish X2goClient instance logging
and PyHocaCLI class logging)
git-svn-id: https://svn.das-netzwerkteam.de/x2go/pyhoca-cli/trunk@50 cdb5e8f1-f799-4276-8919-bce57fd91830
---
pyhoca/cli/frontend.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index e19cda89..9dbaa938 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -22,7 +22,9 @@
# 2010 Dick Kniep <dick.kniep(a)lindix.nl>
# 2010 Jörg Sawatzki <joerg.sawatzki(a)web.de>
-import sys, os
+import sys
+import os
+import copy
import time
import getpass
import x2go
@@ -190,7 +192,7 @@ class PyHocaCLI(x2go.X2goClient):
if logger is None:
logger = x2go.X2goLogger(tag='PyHocaCLI')
else:
- self.logger = logger
+ self.logger = copy.deepcopy(logger)
self.logger.tag = 'PyHocaCLI'
# initialize the X2goClient context and start the connection to the X2go server
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git