pyhoca-cli-0.5.0.2/ChangeLog0000644000000000000000000003572112461162146012357 0ustar pyhoca-cli (0.5.0.2-0x2go2) unstable; urgency=medium * New upstream version (0.5.0.2): - Handle SSHException 'Incompatible ssh peer (no acceptable kex algorithm)' gracefully. - Handle SSHException 'No authentication methods available' for key-only authentication attempts gracefully. * debian/control: + Bump Standards: to 3.9.6. No changes needed. * debian/copyright: + Relicense packaging files under same license as the actual code files. -- Mike Gabriel Sun, 25 Jan 2015 13:33:52 +0100 pyhoca-cli (0.5.0.1-0x2go1) unstable; urgency=medium * New upstream version (0.5.0.1): - Update TODO file. - Update README file. - man page: Mark not-yet-implemented brokerage cmdline options as such. More cmdline option support for brokerage is a TODO for pyhoca-cli. * debian/control: + Add to S (pyhoca-cli): mteleplayer-clientside. + Raise versioned D (pyhoca-cli): python-x2go (>= 0.5.0.0). * pyhoca-cli.spec: + Versioned R (pyhoca-cli): python-x2go (>= 0.5.0.0). -- Mike Gabriel Mon, 20 Oct 2014 22:14:23 +0200 pyhoca-cli (0.5.0.0-0x2go1) unstable; urgency=low * New upstream version (0.5.0.0): - Add cmdline option --broker-url. This adds X2Go Session Broker support to PyHoca-CLI. - Add cmdline option --broker-password. Masquerade broker password in process list (Linux/Mac only). - If a user name can neither be detected from the session profile, nor from the command line option, try the username used for the broker authentication. - When --list-profiles is invoked: Don't crash if a session profile backend does not rely on config files. Show the session broker URL if a broker session profile backend is in use. - Update man page with (future) broker options. Some man page fixes (mentioning X2Go Client where it should name PyHoca-CLI). - Fix description of --from-stdin option on man page. (Fixes: #485). - Rename LICENSE.txt to COPYING. - Add cmdline options --backend-<*> to enforce usage of certain Python X2Go backends for session profile, settings, control session, terminal session, etc. * pyhoca-cli.spec: + Adapt to building on openSUSE/SLES. -- Mike Gabriel Mon, 20 Oct 2014 13:08:31 +0200 pyhoca-cli (0.4.0.2-0x2go1) unstable; urgency=low * New upstream version (0.4.0.2): - Add support for unlocking encrypted SSH private key files. * debian/control: + Replace "LDAP support" with "session brokerage support" in LONG_DESCRIPTION. + Versioned Depends: on python-x2go (>= 0.4.0.9-0~). * debian/source/format: + Switch to format 1.0. * pyhoca-cli.spec: + Ship pyhoca-cli.spec (RPM package definitions) in upstream project. (Thanks to the Fedora package maintainers). + Add to BR: python-argparse. -- Mike Gabriel Wed, 08 Jan 2014 21:12:20 +0100 pyhoca-cli (0.4.0.1-0~x2go1) unstable; urgency=low * Bump egg version to 0.4.0.1 -- Mike Gabriel Tue, 12 Feb 2013 20:43:45 +0100 pyhoca-cli (0.4.0.0-0~x2go1) unstable; urgency=low [ Orion Poplawski ] * New upstream version (0.4.0.0): - Importing all of pyhoca.cli in setup.py causes rpmbuild problems due to DISPLAY not being set. It is overkill as well, causing extra dependencies to be installed at build time. (Fixes: #91). [ Mike Gabriel ] * Bump version to 0.4.0.0. * WARNING: starting with version 0.4.0.0 of PyHoca-GUI, PyHoca-CLI and Python X2Go, all class identifiers are now X2Go..., not X2go... anymore. * New upstream version (0.4.0.0): - Adapt PyHoca-CLI to API change of Python X2Go. * /debian/control: + Thanks to Orion's patch in bug #91 we can drop build dependency on python-x2go. -- Mike Gabriel Tue, 12 Feb 2013 20:35:42 +0100 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): - Declare pyhoca namespace in setup.py. * Import packaging files from Debian package. -- Mike Gabriel Fri, 17 Aug 2012 16:36:43 +0200 pyhoca-cli (0.2.0.3-0~x2go1) unstable; urgency=low * New upstream version (0.2.0.3): - Fix license header of setup.py file. -- Mike Gabriel Tue, 24 Jul 2012 02:41:40 +0200 pyhoca-cli (0.2.0.2-0~x2go1) unstable; urgency=low * New upstream version (0.2.0.2): - Do not fail if HOME dir is read-only, needed for building with sbuild. -- Mike Gabriel Mon, 23 Jul 2012 21:42:33 +0200 pyhoca-cli (0.2.0.1-0~x2go1) unstable; urgency=low * New upstream version (0.2.0.1): - Fix minus sign / hyphen mismatch in man page. -- Mike Gabriel Fri, 08 Jun 2012 23:44:39 +0200 pyhoca-cli (0.2.0.0-0~x2go1) unstable; urgency=low * New upstream version (0.2.0.0): - Replace non-code strings ,,X2go'' by ,,X2Go''. - Add code to redirect stdout and stderr when frozen with py2exe. * Add python-suport (>= 0.90) as dependency. Fix project name in control file. * Add proper license to copyright file. * Add __doc__ strings to __init__.py and frontend.py. * Depend on Python X2Go (>= 0.2.0.2). -- Mike Gabriel Fri, 08 Jun 2012 23:14:20 +0200 pyhoca-cli (0.1.4.2-0~x2go1) unstable; urgency=low * New upstream version (0.1.4.2): - Translate cmd line options into python-x2go options - Allow ,,ALL'' as session name when suspending -> will suspend all sessions of the connecting user. - Allow ,,ALL'' as session name when terminating -> will terminate all sessions of the connecting user. - Allow ,,NEWEST'' and ,,OLDEST'' as session name when resuming. - Add cmd line option --terminate-on-ctrl-c. - Add cmd line option --auth-attempts. -- Mike Gabriel Wed, 07 Sep 2011 20:19:16 +0200 pyhoca-cli (0.1.4.1-0~x2go1) unstable; urgency=low * New upstream version (0.1.4.1): - Fix for Ctrl-C comment when sharing a desktop. - Add --quiet option to disable any kind of log output. -- Mike Gabriel Wed, 06 Jul 2011 22:11:28 +0200 pyhoca-cli (0.1.4.0-0~x2go2) unstable; urgency=low * Already prepare for new upstream version (0.1.4.1): - README/TODO update. * Depend on Python X2Go 0.1.1.2. -- Mike Gabriel Tue, 05 Jul 2011 21:22:28 +0200 pyhoca-cli (0.1.4.0-0~x2go4) unstable; urgency=low * New upstream version (0.1.4.0): - Add X2Go desktop sharing support. - Terminate shared desktop sessions of Ctrl-C (instead of suspending them. * React to Debian bug #627990, prefer man2html-base over man2html. -- Mike Gabriel Fri, 01 Jul 2011 14:52:29 +0200 pyhoca-cli (0.1.3.3-0~x2go2) unstable; urgency=low * fixes build-sequence -- Mike Gabriel Thu, 26 May 2011 12:05:21 +0200 pyhoca-cli (0.1.3.3-0~x2go1) unstable; urgency=low * new upstream version (0.1.3.3): - adds man page in html format * depending on new Python X2Go version (0.1.0.0) -- Mike Gabriel Thu, 26 May 2011 12:05:11 +0200 pyhoca-cli (0.1.3.2-0~x2go1) unstable; urgency=low * Upstream bugfix version 0.1.3.2: - calling pyhoca-cli without --password is now allowed again -- Mike Gabriel Tue, 17 May 2011 13:06:49 +0200 pyhoca-cli (0.1.3.1-0~x2go1) unstable; urgency=low * New upstream version 0.1.3.1: - using setproctitle for process list manipulation - adds --password option (with masquerading of cleartext password in ps ouput) - works around Ctrl-C in getpass.getpass - short option for --port now is -p - move to interactive auth if SSH privkey does not get accepted by server - checking of session profile (-P) exists - take username from session profile when using -P option -- Mike Gabriel Tue, 17 May 2011 12:03:40 +0200 pyhoca-cli (0.1.3.0-0~nwt1) unstable; urgency=low * change-over to four digit version pattern -- Mike Gabriel Thu, 12 May 2011 10:03:54 +0200 pyhoca-cli (0.1.3-0~nwt2) lucid maverick testing unstable; urgency=low * update Python X2Go dependency * added python-setproctitle as dependency -- Mike Gabriel Fri, 31 Dec 2010 01:13:00 +0100 pyhoca-cli (0.1.3-0~nwt1) lucid maverick testing unstable; urgency=low * minor fix for new Python X2Go version -- Mike Gabriel Fri, 31 Dec 2010 00:28:00 +0100 pyhoca-cli (0.1.2-0~nwt2) lucid maverick testing unstable; urgency=low * adapted code version -- Mike Gabriel Fri, 10 Dec 2010 13:46:00 +0100 pyhoca-cli (0.1.2-0~nwt1) lucid maverick testing unstable; urgency=low * disabled use_cache for X2goClient instance * depending on Python X2Go 0.0.22 -- Mike Gabriel Fri, 10 Dec 2010 13:45:00 +0100 pyhoca-cli (0.1.1-0~nwt1) lucid maverick testing unstable; urgency=low * adapted to run with Python X2Go v0.0.21 -- Mike Gabriel Thu, 09 Dec 2010 23:30:00 +0100 pyhoca-cli (0.1.0-0~nwt1) lucid maverick testing unstable; urgency=low * class'ified and egg'ified: PyHocaCLI is now a class -- Mike Gabriel Thu, 28 Oct 2010 23:30:00 +0100 pyhoca-cli (0.0.15-0~nwt1) lucid maverick testing unstable; urgency=low * updated man page * support for --libdebug-sftpxfer option -- Mike Gabriel Wed, 13 Oct 2010 23:30:00 +0200 pyhoca-cli (0.0.14-0~nwt2) lucid maverick testing unstable; urgency=low * depending on bugfix Python X2Go version 0.0.12 (or higher) -- Mike Gabriel Wed, 13 Oct 2010 14:12:00 +0200 pyhoca-cli (0.0.14-0~nwt1) lucid maverick testing unstable; urgency=low * added local folder sharing support -- Mike Gabriel Wed, 13 Oct 2010 14:00:00 +0200 pyhoca-cli (0.0.13-0~nwt1) lucid maverick testing unstable; urgency=low * adding cleanup functionality of remaining X2goSession (sub)threads -- Mike Gabriel Thu, 07 Oct 2010 01:22:00 +0200 pyhoca-cli (0.0.12-0~nwt1) lucid maverick testing unstable; urgency=low * if no SSH private key file is specified (default) pyhoca looks for standard private key files and if present tries to use them (imitates behaviour of openssh-client). If you do not want to use SSH pub/priv key authentication, remove your priv key files from the .ssh folder. -- Mike Gabriel Wed, 06 Oct 2010 18:36:00 +0200 pyhoca-cli (0.0.11-0~nwt1) lucid maverick testing unstable; urgency=low * more bugfixing for not-existent SSH private key file -- Mike Gabriel Wed, 06 Oct 2010 16:42:00 +0200 pyhoca-cli (0.0.10-0~nwt1) lucid maverick testing unstable; urgency=low * bugfix for the last bugfix -- Mike Gabriel Wed, 06 Oct 2010 16:32:00 +0200 pyhoca-cli (0.0.9-0~nwt1) lucid maverick testing unstable; urgency=low * bugfix release for case where there is not id_rsa file in the SSH home dir of a user -- Mike Gabriel Wed, 06 Oct 2010 16:30:00 +0200 pyhoca-cli (0.0.8-0~nwt1) lucid maverick testing unstable; urgency=low * moved the _touch_file function further up -- Mike Gabriel Wed, 06 Oct 2010 16:25:00 +0200 pyhoca-cli (0.0.7-0~nwt4) lucid maverick testing unstable; urgency=low * added build destination Ubuntu lucid/maverick, Debian squeeze/sid -- Mike Gabriel Wed, 06 Oct 2010 16:08:00 +0200 pyhoca-cli (0.0.7-0~nwt3) unstable; urgency=low * bugfix (typo) for pyhoca-cli version string -- Mike Gabriel Wed, 06 Oct 2010 13:30:00 +0200 pyhoca-cli (0.0.7-0~nwt2) unstable; urgency=low * version was derived from python-x2go, now pyhoca-cli displays its own version number -- Mike Gabriel Wed, 06 Oct 2010 10:00:00 +0200 pyhoca-cli (0.0.7-0~nwt1) unstable; urgency=low * added an internal session duration counter -- Mike Gabriel Tue, 05 Oct 2010 18:50:00 +0200 pyhoca-cli (0.0.6-0~nwt1) unstable; urgency=low * activated sound support option * activated local ssh port option * distro codename lucid -> unstable (to be more general) -- Mike Gabriel Tue, 05 Oct 2010 13:30:00 +0200 pyhoca-cli (0.0.5-0~nwt1) lucid; urgency=low * updated man page -- Mike Gabriel Fri, 01 Oct 2010 22:41:00 +0200 pyhoca-cli (0.0.4-0~nwt1) lucid; urgency=low * renamed --timeout option to --time-to-wait, because it is more descriptive for what it does -- Mike Gabriel Fri, 01 Oct 2010 21:22:00 +0200 pyhoca-cli (0.0.3-0~nwt1) lucid; urgency=low * at end of session: added a small pause before telling the user what happened to the running session -- Mike Gabriel Fri, 01 Oct 2010 20:58:00 +0200 pyhoca-cli (0.0.2-0~nwt3) lucid; urgency=low * updated python-x2go dependency in control file -- Mike Gabriel Fri, 01 Oct 2010 20:51:00 +0200 pyhoca-cli (0.0.2-0~nwt2) lucid; urgency=low * fixed control file -- Mike Gabriel Fri, 01 Oct 2010 01:32:00 +0200 pyhoca-cli (0.0.2-0~nwt1) lucid; urgency=low * first test release -- Mike Gabriel Fri, 01 Oct 2010 01:30:00 +0200 pyhoca-cli (0.0.1-0~nwt1) lucid; urgency=low * resetting changelog after rewrite of python-x2go -- Mike Gabriel Sat, 25 Sep 2010 16:00:00 +0200 pyhoca-cli-0.5.0.2/COPYING0000644000000000000000000010333012461162146011630 0ustar GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU Affero General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . pyhoca-cli-0.5.0.2/Makefile.docupload0000644000000000000000000000111612461162146014205 0ustar #!/usr/bin/make -f # Makefile.docupload file - for pyhoca-cli # Copyright 2010-2015 by Mike Gabriel , AGPLv3+ applies to this file VERSION=`head -n1 debian/changelog | sed 's,.*(\(.*\)).*,\1,' | cut -d"-" -f1` DOC_HOST=code.x2go.org DOC_PATH=/srv/sites/x2go.org/packages/doc/pyhoca-cli/man/ DOC_USER=x2go-admin doc: docbuild docupload docbuild: make -f Makefile.man2html build_man2html docupload: ssh -l${DOC_USER} ${DOC_HOST} "{ mkdir -p ${DOC_PATH}; rm -Rfv ${DOC_PATH}/*; }" scp -r .build_man2html/html/* ${DOC_USER}@${DOC_HOST}:${DOC_PATH}/ pyhoca-cli-0.5.0.2/Makefile.man2html0000644000000000000000000000067112461162146013762 0ustar #!/usr/bin/make -f MAN2HTML_BIN = man2html MAN2HTML_SRC = man MAN2HTML_DEST = .build_man2html/html man_pages = `cd $(MAN2HTML_SRC) && find * -type f` all: build build: build_man2html build_man2html: mkdir -p $(MAN2HTML_DEST) for man_page in $(man_pages); do mkdir -p `dirname $(MAN2HTML_DEST)/$$man_page`; done for man_page in $(man_pages); do $(MAN2HTML_BIN) -r $(MAN2HTML_SRC)/$$man_page > $(MAN2HTML_DEST)/$$man_page.html; done pyhoca-cli-0.5.0.2/man/man1/pyhoca-cli.10000644000000000000000000003153112461162146014321 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH pyhoca-cli 1 "Jan 2015" "Version 0.5.0.2" "X2Go Application" .SH NAME pyhoca-cli \- X2Go command line client written in Python .SH SYNOPSIS 'nh .fi .ad l \fBpyhoca-cli\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [ \fIoptions\fR ] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBpyhoca-cli\fR aims to be a cross-platform (Windows, Mac OS X, Linux) X2Go command line client written in Python. .PP You can use it for scripting remote X2Go sessions or simply starting, resuming or shadowing X2Go sessions from the command line in a terminal. .PP It supports versatile command line options as well as parsing \fBx2goclient\fR configuration files. .PP See the included README and TODO for further information on \fBpyhoca-cli\fR. .SH COMMON OPTIONS \fBpyhoca-cli\fR accepts the following common options: .TP \*(T<\fB\-h, \-\-help\fR\*(T> Display a help with all available command line options and exit. .TP \*(T<\fB\-V, \-\-version\fR\*(T> Output version information and exit. .TP \*(T<\fB\-d, \-\-quiet\fR\*(T> No output to stdout at all! .TP \*(T<\fB\-d, \-\-debug\fR\*(T> Enable debugging output. .TP \*(T<\fB\-\-libdebug\fR\*(T> Enable debugging code of the unterlying Python X2Go module. .TP \*(T<\fB\-\-libdebug-sftpxfer\fR\*(T> Enable debugging code of Python X2Go's sFTP server code (very verbose, and it may even reveal promiscuous data). .SH SERVER / SESSION PROFILE You either have to specify a server name or a pre-configured X2GoClient session profile to tell \fBpyhoca-cli\fR to what X2Go server to connect. \fBpyhoca-cli\fR will not start if neither of these two options has been given on the command line. .TP \*(T<\fB\-\-server\fR \fI\fR\*(T> If not in LDAP mode you always have to name the remote X2Go server's hostname or IP address. .TP \*(T<\fB\-P, \-\-session-profile\fR \fI\fR\*(T> The name of the session profile to be used to make the connection. .SH ACTIONS \fBpyhoca-cli\fR accepts exclusively one of the listed actions: .TP \*(T<\fB\-N, \-\-new\fR\*(T> Start a new X2Go session on server (default mode if no mode is explicitly specified). .TP \*(T<\fB\-R, \-\-resume\fR \fI\fR\*(T> Resume existing X2Go session on server. Special values for are ,,NEWEST'' (will resume youngest session) or ,,OLDEST'' (resume session with oldest timestamp). .TP \*(T<\fB\-D, \-\-share-desktop\fR \fI@\fR\*(T> Share an X2Go session on the remote server specified by @, whereas can be the same user that is starting the share mode session or any other user that grants X2Go desktop sharing for the current user. .TP \*(T<\fB\-S, \-\-suspend\fR \fI\fR\*(T> Suspend running X2Go session . A special value for is ,,ALL'' (will suspend all sessions of the connected user). .TP \*(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> 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 \*(T<\fB\-\-clean-sessions\fR\*(T> Clean all of the user's suspended/running sessions before starting a new one on the named X2Go server. .TP \*(T<\fB\-\-terminate-on-ctrl-c\fR\*(T> Terminate the connected session when pressing CTRL+C (instead of suspending the session). .SH X2GO OPTIONS .TP \*(T<\fB\-c, \-\-command\fR \fI\fR\*(T> Command to run with \fB\-\-new\fR mode on server (default: xterm). .TP \*(T<\fB\-u, \-\-username\fR \fI\fR\*(T> Username for the session (default: currently logged in user). .TP \*(T<\fB\-\-password\fR \fI\fR\*(T> User password for this session. If a matching private SSH key is available this one will be preferred for authentication. The cleartext password that has been specified at the command line will be masqueraded in the systems process list (Linux, MacOS). On Windows systems the usage of the \-\-password option is forbidden. .TP \*(T<\fB\-p, \-\-remote-ssh-port\fR \fI\fR\*(T> Remote X2Go server's SSH port (default: 22). .TP \*(T<\fB\-k, \-\-ssh-privkey\fR \fI\fR\*(T> Use file as private key for SSH connections (default: ~/.ssh/id_rsa). .TP \*(T<\fB\-\-add\-to\-known\-hosts\fR\*(T> Add RSA/DSA host key to ~/.ssh/known_hosts if authenticity of server can't be established (default: not set). .TP \*(T<\fB\-\-sound\fR \fI{pulse|esd|none}\fR\*(T> X2Go server's sound system (default: 'pulse'). .TP \*(T<\fB\-F, \-\-share-local-folders\fR \fI[,[,...]]\fR\*(T> A comma separated list of local folders that shall be made available in the remote X2Go session. .TP \*(T<\fB\-\-printing\fR\*(T> Use X2Go printing (default: disabled). .TP \*(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\-\-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 session profile or that the \-\-password command line option is used. .SH BROKER OPTIONS In case you want to retrieve X2Go session profiles from an X2Go Session Broker use the following options: .TP \*(T<\fB\-\-broker-url=\fR\*(T> Specify the of the X2Go Session Broker. \fBpyhoca-cli\fR can access http:// and ssh:// style URLs. Syntax of for HTTP brokerage: http(s)://:@:/path/to/broker Syntax of for SSH brokerage: ssh://:@:/usr/bin/x2gobroker (or any executable that provides the broker via SSH). .TP \*(T<\fB\-\-broker-password \fR\*(T> Session broker password for retrieving session profiles from the X2Go Session Broker. The cleartext password that has been specified at the command line will be masqueraded in the systems process list (Linux, MacOS). On Windows systems the usage of the \-\-broker-password option is forbidden. .TP \*(T<\fB\-\-broker-cacertfile=\fR\*(T> NOT IMPLEMENTED YET: Specify a special (self-signed) root-CACert file that shall get used when connecting to an X2Go Session Broker via https (SSL). (Not implemented, yet). .TP \*(T<\fB\-\-broker-noauth\fR\*(T> NOT IMPLEMENTED YET: The X2Go Session Broker is accessible without authentication. .TP \*(T<\fB\-\-auth-id=\fR\*(T> NOT IMPLEMENTED YET: Use this for authenticating against the X2Go Session Broker. This option mostly makes sense together with \fI--broker-autologin\fR or \fI--broker-ssh-key\fR. (Not implemented, yet). .TP \*(T<\fB\-\-broker-autologin\fR\*(T> NOT IMPLEMENTED YET: For SSH based X2Go Session Brokers. If an SSH agent is available or default key files exist then try those for authentication against the X2Go Session Broker. (Not implemented, yet). .TP \*(T<\fB\-\-broker-ssh-key=\fR\*(T> NOT IMPLEMENTED YET: For SSH based X2Go Session Brokers. Full path to a valid SSH private key file. (Not implemented, yet). .SH NX OPTIONS (Version 3) .TP \*(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> link quality (default: 'adsl') .TP \*(T<\fB\-t, \-\-session\-type\fR \fI{desktop|application}\fR\*(T> Session type (default: 'application'). Note: there are also some auto-detection feature for the session type built into the code. It might not always happen what you expect from setting this option. .TP \*(T<\fB\-p, \-\-pack\fR \fI\fR\*(T> Compression method (see below for possible values). .TP \*(T<\fB\-\-kbd\-layout\fR \fI{us|de|fr|...}\fR\*(T> Use keyboard layout (default: 'us'). .TP \*(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 BACKEND OPTIONS \fBpyhoca-gui\fR supports transparent use of different data backends. For configuration three backends are common: FILE, GCONF (Linux only) and WINREG (Windows only). The default backend currently is the FILE backend on all platforms. .PP For client-server communication the only yet implemented backend is the STDOUT backend (as X2Go server commands print their execution results to /dev/stdout. (But other communication backends might be possible in the future...). .PP In the same way we are focusing on a successor of the current NX3 agent/proxy tool. A change in the proxy backend will also be implemented as a backend. .TP \*(T<\fB\-\-backend-controlsession \fR\*(T> Force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing). .TP \*(T<\fB\-\-backend-terminalsession \fR\*(T> Force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing). .TP \*(T<\fB\-\-backend-serversessioninfo \fR\*(T> Force usage of a certain SERVERSESSIONINFO_BACKEND (do not use this unless you know exactly what you are doing). .TP \*(T<\fB\-\-backend-serversessionlist \fR\*(T> Force usage of a certain SERVERSESSIONLIST_BACKEND (do not use this unless you know exactly what you are doing). .TP \*(T<\fB\-\-backend-proxy \fR\*(T> Force usage of a certain PROXY_BACKEND (do not use this unless you know exactly what you are doing). .TP \*(T<\fB\-\-backend-sessionprofiles \fR\*(T> Use given backend for accessing session profiles, available backends on Linux: FILES, GCONF; on Windows: FILES, WINREG. .TP \*(T<\fB\-\-backend-clientsettings \fR\*(T> Use given backend for accessing the client settings configuration, available backends on Linux: FILES, GCONF; on Windows: FILES, WINREG. .TP \*(T<\fB\-\-backend-clientprinting \fR\*(T> Use given backend for accessing the client printing configuration, available backends on Linux: FILES, GCONF; on Windows: FILES, WINREG..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. To achieve this, some compatibility options have already been added: .TP \*(T<\fB\-\-port\fR \fI\fR\*(T> Compatibility option, synonymous to \fB\-\-remote\-ssh\-port\fR \fI\fR. .TP \*(T<\fB\-\-ssh\-key\fR \fI\fR\*(T> Compatibility option, synonymous to \fB\-\-ssh-privkey\fR \fISSH_KEY\fR. .TP \*(T<\fB\-\-use\-sound\fR \fI{yes|no}\fR\*(T> Compatibility option, synonymous to \fB\-\-sound\fR \fI{pulse|none}\fR. .TP \*(T<\fB\-\-client-ssh-port\fR \fI\fR\*(T> Compatibility option for the x2goclient GUI. PyHoca-Cli (resp. Python X2Go) brings its own internal sFTP server. Thus, this option will be ignored. .SH NX COMPRESSION METHODS As NX compression methods (\fB--pack\fR option) the following values are possible. The % character must be replaced by a digit 0-9. .PP nopack, 8, 64, 256, 512, 4k, 32k, 64k, 256k, 2m, 16m 256-rdp, 256-rdp-compressed, 32k-rdp, 32k-rdp-compressed, 64k-rdp 64k-rdp-compressed, 16m-rdp, 16m-rdp-compressed rfb-hextile, rfb-tight, rfb-tight-compressed 8-tight, 64-tight, 256-tight, 512-tight, 4k-tight, 32k-tight 64k-tight, 256k-tight, 2m-tight, 16m-tight 8-jpeg-%, 64-jpeg, 256-jpeg, 512-jpeg, 4k-jpeg, 32k-jpeg 64k-jpeg, 256k-jpeg, 2m-jpeg, 16m-jpeg-% 8-png-jpeg-%, 64-png-jpeg, 256-png-jpeg, 512-png-jpeg, 4k-png-jpeg 32k-png-jpeg, 64k-png-jpeg, 256k-png-jpeg, 2m-png-jpeg, 16m-png-jpeg-% 8-png-%, 64-png, 256-png, 512-png, 4k-png 32k-png, 64k-png, 256k-png, 2m-png, 16m-png-% 16m-rgb-%, 16m-rle-% .SH "SEE ALSO" \fB/usr/share/doc/python-x2go\fR .SH AUTHOR This manual has been written by for the X2Go project (http://www.x2go.org) by Mike Gabriel pyhoca-cli-0.5.0.2/pyhoca-cli0000755000000000000000000005406512461162146012565 0ustar #!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2010-2015 by Mike Gabriel # # PyHoca CLI is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # PyHoca CLI 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero 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. # # Contributors to the code of this programme: # 2010 Dick Kniep # 2010 Jörg Sawatzki ### ### module section ### import x2go import sys import os PROG_NAME = os.path.basename(sys.argv[0]).replace('.exe', '') PROG_PID = os.getpid() if hasattr(sys, 'frozen') and sys.frozen in ("windows_exe", "console_exe"): class Win32_Logging(object): softspace = 0 _fname = os.path.join(os.environ['AppData'], PROG_NAME, '%s.log' % PROG_NAME) _file = None def __init__(self, filemode='a'): self._filemode = filemode def write(self, text, **kwargs): if self._file is None: try: try: os.mkdir(os.path.dirname(self._fname)) except: pass self._file = open(self._fname, self._filemode) except: pass else: self._file.write(text) self._file.flush() def flush(self): if self._file is not None: self._file.flush() sys.stdout = Win32_Logging(filemode='w+') sys.stderr = Win32_Logging(filemode='a') del Win32_Logging app = sys.argv[0] if app.startswith('./'): sys.path.insert(0, os.getcwd()) os.environ['PYTHONX2GO_LOCAL'] = '1' PROG_OPTIONS = " ".join(sys.argv[1:]).replace("=", " ").split() try: _password_index = PROG_OPTIONS.index('--password')+1 PROG_OPTIONS[_password_index] = "XXXXXXXX" except ValueError: # ignore if --password option is not specified pass try: _broker_password_index = PROG_OPTIONS.index('--broker-password')+1 PROG_OPTIONS[_broker_password_index] = "XXXXXXXX" except ValueError: # ignore if --broker-password option is not specified pass from x2go import X2GOCLIENT_OS as _X2GOCLIENT_OS if _X2GOCLIENT_OS in ('Linux', 'Mac'): import setproctitle setproctitle.setproctitle("%s %s" % (PROG_NAME, " ".join(PROG_OPTIONS))) import argparse import paramiko # Python X2Go provides the current local username (OS independent) from x2go.defaults import CURRENT_LOCAL_USER as current_user from x2go.defaults import X2GO_PRINT_ACTIONS from x2go.defaults import DEFAULT_PDFVIEW_CMD from x2go.defaults import DEFAULT_PDFSAVE_LOCATION from x2go.defaults import DEFAULT_PRINTCMD_CMD from x2go import BACKENDS from pyhoca.cli import current_home, PyHocaCLI, runtime_error # version information from pyhoca.cli import __VERSION__ as _version VERSION=_version VERSION_TEXT=""" %s[%s] - an X2Go command line client written in Python ---------------------------------------------------------------------- developed by Mike Gabriel VERSION: %s """ % (PROG_NAME, PROG_PID, VERSION) PRINT_ACTIONS = X2GO_PRINT_ACTIONS.keys() logger = x2go.X2GoLogger() liblogger = x2go.X2GoLogger() ### ### command line arguments ### # exclusive client control options action_options = [ {'args':['-N','--new'], 'default': False, 'action': 'store_true', 'help': 'start a new X2Go session on server (default)', }, {'args':['-R','--resume'], 'default': None, 'metavar': 'SESSION_NAME', 'help': 'resume a suspended X2Go session with name SESSION_NAME', }, {'args':['-D','--share-desktop'], 'default': None, 'metavar': 'USER@DISPLAY', 'help': 'share an X2Go session on server specified by USER@DISPLAY', }, {'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', }, {'args':['--list-desktops'], 'default': False, 'action': 'store_true', 'help': 'list X2Go desktop sessions that are available for sharing', }, {'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', }, {'args':['--quiet'], 'default': False, 'action': 'store_true', 'help': 'disable any kind of log output', }, {'args':['--libdebug'], 'default': False, 'action': 'store_true', 'help': 'enable debugging code of the underlying Python X2Go module', }, {'args':['--libdebug-sftpxfer'], 'default': False, 'action': 'store_true', 'help': 'enable debugging code of Python X2Go\'s sFTP server code (very verbose, and even promiscuous)', }, {'args':['-V', '--version'], 'default': False, 'action': 'store_true', 'help': 'print version number and exit', }, ] # possible programme options are 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':['--password'], 'default': None, 'help': 'user password for session authentication', }, {'args':['-p','--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)', }, {'args':['--sound'], 'default': 'pulse', 'choices': ('pulse', 'esd', 'none'), 'help': 'X2Go server sound system (default: \'pulse\')', }, {'args':['--printing'], 'default': False, 'action': 'store_true', 'help': 'use X2Go printing (default: disabled)', }, {'args':['--share-mode'], 'default': 0, 'help': 'share mode for X2Go desktop sharing (0: view-only, 1: full access)', }, {'args':['-F', '--share-local-folders'], 'metavar': '[,x\' or \'fullscreen\' (default: \'800x600\')',}, {'args':['-q','--link'], 'default': 'adsl', 'choices': ('modem','isdn','adsl','wan','lan'), 'help': 'link quality (default: \'adsl\')',}, {'args':['-t','--session-type'], 'default': 'application', 'choices': ('desktop', 'application'), 'help': 'session type (default: \'application\')', }, {'args':['--pack'], 'default': '16m-jpeg-9', 'help': 'compression methods (see below for possible values)', }, {'args':['--kbd-layout'], 'default': 'us', 'help': 'use keyboard layout (default: \'us\')',}, {'args':['--kbd-type'], 'default': 'pc105/us', 'help': 'set Keyboard type (default: \'pc105/us\')',}, ] compat_options = [ {'args':['--port'], 'default': None, 'help': 'compatibility option, synonymous to --remote-ssh-port PORT', }, {'args':['--ssh-key'], 'default': None, 'help': 'compatibility option, synonymous to --ssh-privkey SSH_KEY', }, {'args':['--use-sound'], 'default': None, 'choices': ('yes', 'no'), 'help': 'compatibility option, synonymous to --sound {pulse|none}', }, {'args':['--client-ssh-port'], 'default': None, 'help': 'compatibility option for the x2goclient GUI; as Python X2Go brings its own internal SFTP server, this option will be ignored', }, ] _profiles_backend_default = BACKENDS['X2GoSessionProfiles']['default'] _settings_backend_default = BACKENDS['X2GoClientSettings']['default'] _printing_backend_default = BACKENDS['X2GoClientPrinting']['default'] if _X2GOCLIENT_OS == 'Windows': _config_backends = ('FILE', 'WINREG') elif _X2GOCLIENT_OS == 'Linux': _config_backends = ('FILE', 'GCONF') else: _config_backends = ('FILE') backend_options = [ {'args':['--backend-controlsession'], 'default': None, 'metavar': '', 'choices': BACKENDS['X2GoControlSession'].keys(), 'help': 'force usage of a certain CONTROLSESSION_BACKEND (do not use this unless you know exactly what you are doing)', }, {'args':['--backend-terminalsession'], 'default': None, 'metavar': '', 'choices': BACKENDS['X2GoTerminalSession'].keys(), 'help': 'force usage of a certain TERMINALSESSION_BACKEND (do not use this unless you know exactly what you are doing)', }, {'args':['--backend-serversessioninfo'], 'default': None, 'metavar': '', 'choices': BACKENDS['X2GoServerSessionInfo'].keys(), 'help': 'force usage of a certain SERVERSESSIONINFO_BACKEND (do not use this unless you know exactly what you are doing)', }, {'args':['--backend-serversessionlist'], 'default': None, 'metavar': '', 'choices': BACKENDS['X2GoServerSessionList'].keys(), 'help': 'force usage of a certain SERVERSESSIONLIST_BACKEND (do not use this unless you know exactly what you are doing)', }, {'args':['--backend-proxy'], 'default': None, 'metavar': '', 'choices': BACKENDS['X2GoProxy'].keys(), 'help': 'force usage of a certain PROXY_BACKEND (do not use this unless you know exactly what you are doing)', }, {'args':['--backend-sessionprofiles'], 'default': None, 'metavar': '', 'choices': _config_backends, 'help': 'use given backend for accessing session profiles, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _profiles_backend_default), }, {'args':['--backend-clientsettings'], 'default': None, 'metavar': '', 'choices': _config_backends, 'help': 'use given backend for accessing the client settings configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _settings_backend_default), }, {'args':['--backend-clientprinting'], 'default': None, 'metavar': '', 'choices': _config_backends, 'help': 'use given backend for accessing the client printing configuration, available backends on your system: %s (default: %s)' % (', '.join(_config_backends), _printing_backend_default), }, ] ### ### beginning of code ### # print version text and exit def version(): sys.stderr.write ("%s\n" % VERSION_TEXT) sys.exit(0) def parseargs(): global logger global liblogger p = argparse.ArgumentParser(description='X2Go command line client implemented in Python.',\ epilog=""" Possible values for the --pack NX option are: %s """ % x2go.defaults.pack_methods_nx3_formatted, \ formatter_class=argparse.RawDescriptionHelpFormatter, \ add_help=True, argument_default=None) p_reqargs = p.add_argument_group('X2Go server name is always required') p_reqargs.add_argument('--server', help='server hostname or IP address') p_actionopts = p.add_argument_group('client actions') p_debugopts = p.add_argument_group('debug options') p_x2goopts = p.add_argument_group('X2Go options') p_printopts = p.add_argument_group('X2Go print options') p_brokeropts = p.add_argument_group('X2Go Session Broker client options') p_nxopts = p.add_argument_group('NX options') p_backendopts = p.add_argument_group('Python X2Go backend options (for experts only)') p_compatopts = p.add_argument_group('compatibility options') for (p_group, opts) in ((p_x2goopts, x2go_options), (p_printopts, print_options), (p_brokeropts, broker_options), (p_actionopts, action_options), (p_debugopts, debug_options), (p_nxopts, nx_options), (p_backendopts, backend_options), (p_compatopts, compat_options)): for opt in opts: args = opt['args'] del opt['args'] p_group.add_argument(*args, **opt) a = p.parse_args() if a.debug: logger.set_loglevel_debug() if a.libdebug: liblogger.set_loglevel_debug() if a.quiet: logger.set_loglevel_quiet() liblogger.set_loglevel_quiet() if a.libdebug_sftpxfer: liblogger.enable_debug_sftpxfer() if a.password and _X2GOCLIENT_OS == "Windows": runtime_error("The --password option is forbidden on Windows platforms", parser=p, exitcode=222) if a.version: version() # if no username is given we use the uid under which this programme is run if a.username is None and not a.session_profile: a.username = current_user if not (a.session_profile or a.list_profiles): # the --server (or --session-profile) option is required for most operations 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 if bool(a.new) + bool(a.resume) + bool(a.share_desktop) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) + bool(a.list_desktops) + bool(a.list_profiles)> 1: runtime_error ("modes --new, --resume, --share-desktop, --suspend, --terminate, --list-sessions, --list-desktops and --list-profiles are mutually exclusive", parser=p, exitcode=2) if bool(a.new) + bool(a.resume) + bool(a.share_desktop) + bool(a.suspend) + bool(a.terminate) + bool(a.list_sessions) + bool(a.list_desktops) + bool(a.list_profiles) == 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) else: if not (a.resume or a.share_desktop or a.suspend or a.terminate or a.list_sessions or a.list_desktops or a.list_profiles): a.new = True # X2Go printing if ((a.pdfview_cmd and a.printer) or (a.pdfview_cmd and a.save_to_folder) or (a.pdfview_cmd and a.print_cmd) or (a.printer and a.save_to_folder) or (a.printer and a.print_cmd) or (a.print_cmd and a.save_to_folder)): runtime_error("--pdfviewer, --save-to-folder, --printer and --print-cmd options are mutually exclusive", parser=p, exitcode=81) if a.pdfview_cmd: a.print_action = 'PDFVIEW' elif a.save_to_folder: a.print_action = 'PDFSAVE' elif a.printer: a.print_action = 'PRINT' elif a.print_cmd: a.print_action = 'PRINTCMD' if a.pdfview_cmd is None and a.print_action == 'PDFVIEW': a.pdfview_cmd = DEFAULT_PDFVIEW_CMD if a.save_to_folder is None and a.print_action == 'PDFSAVE': a.save_to_folder = DEFAULT_PDFSAVE_LOCATION if a.printer is None and a.print_action == 'PRINT': # None means CUPS default printer... a.printer = None if a.print_cmd is None and a.print_action == 'PRINTCMD': a.print_cmd = DEFAULT_PRINTCMD_CMD a.print_action_args = {} if a.pdfview_cmd: a.print_action_args={'pdfview_cmd': a.pdfview_cmd, } elif a.save_to_folder: a.print_action_args={'save_to_folder': a.save_to_folder, } elif a.printer: a.print_action_args={'printer': a.printer, } elif a.print_cmd: a.print_action_args={'print_cmd': a.print_cmd, } ### take care of compatibility options # option --use-sound yes as synonomyn for --sound if a.use_sound is not None: if a.use_sound == 'yes': a.sound = 'pulse' if a.use_sound == 'no': a.sound = 'none' if a.ssh_key is not None: a.ssh_privkey = a.ssh_key if a.port is not None: a.remote_ssh_port = a.port if a.share_local_folders is not None: a.share_local_folders = a.share_local_folders.split(',') try: _dummy = int(a.auth_attempts) except ValueError: runtime_error ("value for cmd line argument --auth-attempts has to be of type integer", parser=p, exitcode=1) 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) if not a.ssh_privkey and os.path.isfile('%s/.ssh/id_rsa' % current_home): a.ssh_privkey = '%s/.ssh/id_rsa' % current_home 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_buffer = sys.stdin.readline() (a.username, a.server, a.command) = lightdm_remote_login_buffer.split()[0:3] a.password = " ".join(lightdm_remote_login_buffer.split()[3:]) if ":" in a.server: a.remote_ssh_port = a.server.split(':')[-1] a.server = ':'.join(a.server.split(':')[:-1]) a.command = a.command.upper() a.geometry = 'fullscreen' return p, a if __name__ == '__main__': # parse command line parser, args = parseargs() args.parser = parser try: # initialize the X2GoClient context and start the connection to the X2Go server logger('preparing requested X2Go session', x2go.loglevel_NOTICE, ) thisPyHocaCLI = PyHocaCLI(args, logger=logger, liblogger=liblogger) thisPyHocaCLI.authenticate() thisPyHocaCLI.MainLoop() sys.exit(0) except (KeyboardInterrupt, SystemExit), e: x2go.x2go_cleanup(e) pyhoca-cli-0.5.0.2/pyhoca/cli/frontend.py0000644000000000000000000007205212461162146015026 0ustar # -*- coding: utf-8 -*- # Copyright (C) 2010-2015 by Mike Gabriel # # PyHoca CLI is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # PyHoca CLI 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero 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. # # Contributors to the code of this programme: # 2010 Dick Kniep # 2010 Jörg Sawatzki import x2go import sys import os import copy import time import getpass from gevent import socket # for debugging import pprint # use current_home as user home dir current_home = os.path.expanduser("~") from x2go.utils import touch_file as _touch_file # define and create known_hosts file (if not there) ssh_known_hosts_filename = os.path.join(x2go.LOCAL_HOME, x2go.X2GO_SSH_ROOTDIR, 'known_hosts') if not os.path.isfile(ssh_known_hosts_filename): try: _touch_file(ssh_known_hosts_filename) except OSError: pass # define and create ssh_config file (if not there) ssh_config_filename = os.path.join(x2go.LOCAL_HOME, x2go.X2GO_SSH_ROOTDIR, 'config') if not os.path.isfile(ssh_config_filename): try: _touch_file(ssh_config_filename) except OSError: pass # 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): """\ L{PyHocaCLI} is a command-line X2Go Client wrapping around Python X2Go (C{X2GoClient} class). """ 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. The list of available session is printed to stdout. @param s_hash: session UUID @type s_hash: C{str} """ # retrieve a session list print print "Available runing/suspended X2Go sessions" print "========================================" _peername = self._X2GoClient__get_session_server_peername(s_hash) print "Host: %s - [%s]:%s" % (self._X2GoClient__get_session_server_hostname(s_hash), _peername[0], _peername[1]) print "Username: %s" % self._X2GoClient__get_session_username(s_hash) print session_infos = self._X2GoClient__list_sessions(s_hash) if session_infos: for session_info in session_infos.values(): print "Session Name: %s" % session_info print "-------------" print "cookie: %s" % session_info.cookie print "agent PID: %s" % session_info.agent_pid print "display: %s" % session_info.display print "status: %s" % session_info.status print "graphic port: %s" % session_info.graphics_port print "snd port: %s" % session_info.snd_port print "sshfs port: %s" % session_info.sshfs_port print "username: %s" % session_info.username print "hostname: %s" % session_info.hostname # TODO: turn into datetime object print "create date: %s" % session_info.date_created # TODO: turn into datetime object print "suspended since: %s" % session_info.date_suspended print else: print "No running/suspended sessions found on X2Go server." print def list_desktops(self, s_hash): """\ List up server-side available desktop sessions that are available for sharing to the logged in user. The list of sharable desktop sessions is printed to stdout. @param s_hash: session UUID @type s_hash: C{str} """ # retrieve a desktop list print print "X2Go desktops available for sharing" print "===================================" _peername = self._X2GoClient__get_session_server_peername(s_hash) print "Host: %s - [%s]:%s" % (self._X2GoClient__get_session_server_hostname(s_hash), _peername[0], _peername[1]) print "Username: %s" % self._X2GoClient__get_session_username(s_hash) print desktop_list = self._X2GoClient__list_desktops(s_hash) if desktop_list: for desktop_name in desktop_list: print desktop_name else: print "No X2Go desktop sessions found that are available for desktop sharing." print def list_profiles(self): """\ List up client-side configured session profile configurations. The list of session profiles is printed to stdout. """ # retrieve a session list print print "Available X2Go session profiles" print "===============================" _profiles = self._X2GoClient__get_profiles() for _profile_id in _profiles.profile_ids: _profile_config = _profiles.get_profile_config(_profile_id) _session_params = _profiles.to_session_params(_profile_id) print _profile_config print _session_params print def clean_sessions(self, s_hash): """\ Clean all running/suspended sessions on the X2Go server that the session with UUID C{s_hash} is connected to. @param s_hash: session UUID @type s_hash: C{str} """ _profiles = self._X2GoClient__get_profiles() if self.args.session_profile and _profiles.has_profile(self.args.session_profile): _server = _profiles.get_session_param(self.args.session_profile, 'server') else: _server = self.args.server # clean all sessions from X2Go server self.logger('cleaning up all running sessions from X2Go server: %s' % _server, loglevel=x2go.loglevel_NOTICE, ) self._X2GoClient__clean_sessions(s_hash) def new_session(self, s_hash): """\ Launch a new X2Go session via the C{X2GoSession} object with session UUID C{s_hash}. @param s_hash: session UUID @type s_hash: C{str} """ # start a new session and run a command self.logger('starting a new X2Go session', loglevel=x2go.loglevel_INFO, ) 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).get_session_cmd(), loglevel=x2go.loglevel_DEBUG, ) self._X2GoClient__start_session(s_hash) def _auto_resume_newest(self, s_hash): session_infos = self._X2GoClient__list_sessions(s_hash) if session_infos: newest_session_name = x2go.utils.session_names_by_timestamp(session_infos)[-1] self._pyhoca_logger("Resuming newest X2Go session %s..." % newest_session_name, loglevel=x2go.loglevel_NOTICE, ) self._X2GoClient__resume_session(s_hash, newest_session_name) return True return False def _auto_resume_oldest(self, s_hash): session_infos = self._X2GoClient__list_sessions(s_hash) if session_infos: oldest_session_name = x2go.utils.session_names_by_timestamp(session_infos)[0] self._pyhoca_logger("Resuming oldest X2Go session %s..." % oldest_session_name, loglevel=x2go.loglevel_NOTICE, ) self._X2GoClient__resume_session(s_hash, oldest_session_name) return True return False def resume_session(self, s_hash): """\ Use C{X2GoSession} object with session UUID C{s_hash} to resume a server-side suspended X2Go session. @param s_hash: session UUID @type s_hash: C{str} """ # resume a running session self.logger('resuming X2Go session: %s' % self.args.resume, loglevel=x2go.loglevel_INFO, ) available_sessions = self._X2GoClient__list_sessions(s_hash) if available_sessions and self.args.resume == 'OLDEST': self._auto_resume_oldest(s_hash) elif available_sessions and self.args.resume == 'NEWEST': self._auto_resume_newest(s_hash) elif self.args.resume in available_sessions.keys(): self._X2GoClient__resume_session(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) def share_desktop_session(self, s_hash): """\ Use C{X2GoSession} object with session UUID C{s_hash} to share a server-side X2Go desktop session that is available for sharing. @param s_hash: session UUID @type s_hash: C{str} """ # start a new session and run a command _desktop = self.args.share_desktop _share_mode = self.args.share_mode self.logger('sharing X2Go session: %s' % _desktop, loglevel=x2go.loglevel_INFO, ) try: self._X2GoClient__share_desktop_session(s_hash, desktop=_desktop, share_mode=_share_mode) except x2go.X2GoDesktopSharingException, e: self._runtime_error('%s' % str(e), exitcode=54) def suspend_session(self, s_hash): """\ Suspend X2Go Session object with session UUID C{s_hash}. @param s_hash: session UUID @type s_hash: C{str} """ # send a suspend request to a session self.logger('requesting X2Go session suspend of session: %s' % self.args.suspend, loglevel=x2go.loglevel_INFO, ) available_sessions = self._X2GoClient__list_sessions(s_hash) if self.args.suspend == "ALL": _session_names = available_sessions else: _session_names = [ self.args.suspend ] for _session_name in _session_names: if _session_name in available_sessions.keys(): self._X2GoClient__suspend_session(s_hash, _session_name) self._pyhoca_logger("X2Go session %s has been suspended" % _session_name, loglevel=x2go.loglevel_NOTICE, ) else: _server = self.args.server _remote_ssh_port = self.args.remote_ssh_port if not self.args.server and self.args.session_profile: _server = self.session_profiles.get_value(self.session_profiles.to_profile_id(self.args.session_profile), 'host') _remote_ssh_port = self.session_profiles.get_value(self.session_profiles.to_profile_id(self.args.session_profile), 'sshport') self._runtime_error('session %s not available on X2Go server [%s]:%s' % (_session_name, _server, _remote_ssh_port), exitcode=21) def terminate_session(self, s_hash): """\ Terminate X2Go Session with session UUID C{s_hash}. @param s_hash: session UUID @type s_hash: C{str} """ # send a terminate request to a session self.logger('requesting X2Go session terminate of session: %s' % self.args.terminate, loglevel=x2go.loglevel_INFO, ) available_sessions = self._X2GoClient__list_sessions(s_hash) if self.args.terminate == "ALL": _session_names = available_sessions else: _session_names = [ self.args.terminate ] for _session_name in _session_names: if _session_name in available_sessions.keys(): self._X2GoClient__terminate_session(s_hash, _session_name) self._pyhoca_logger("X2Go session %s has been terminated" % _session_name, loglevel=x2go.loglevel_NOTICE, ) else: _server = self.args.server _remote_ssh_port = self.args.remote_ssh_port if not self.args.server and self.args.session_profile: _server = self.session_profiles.get_value(self.session_profiles.to_profile_id(self.args.session_profile), 'host') _remote_ssh_port = self.session_profiles.get_value(self.session_profiles.to_profile_id(self.args.session_profile), 'sshport') self._runtime_error('session %s not available on X2Go server [%s]:%s' % (_session_name, _server, _remote_ssh_port), exitcode=22) def __init__(self, args, logger=None, liblogger=None): """\ L{PyHocaCLI} Class constructor. @param args: a class with properties representing the command-line options that are available to L{PyHocaCLI} instances. @type args: C{argparse.ArgumentParser} (or similar) @param logger: you can pass an L{X2GoLogger} object to the L{PyHocaCLI} constructor for logging application events @type logger: Python X2Go C{X2GoLogger} instance @param liblogger: you can pass an L{X2GoLogger} object to the L{PyHocaCLI} constructor for logging application events, this object is forwarded to the C{X2GoClient} class in Python X2Go @type liblogger: Python X2Go C{X2GoLogger} instance """ self.args = args if logger is None: self._pyhoca_logger = x2go.X2GoLogger(tag='PyHocaCLI') else: self._pyhoca_logger = copy.deepcopy(logger) self._pyhoca_logger.tag = 'PyHocaCLI' _backend_kwargs = {} if self.args.backend_controlsession is not None: _backend_kwargs['control_backend'] = self.args.backend_controlsession if self.args.backend_terminalsession is not None: _backend_kwargs['terminal_backend'] = self.args.backend_terminalsession if self.args.backend_serversessioninfo is not None: _backend_kwargs['info_backend'] = self.args.backend_serversessioninfo if self.args.backend_serversessionlist is not None: _backend_kwargs['list_backend'] = self.args.backend_serversessionlist if self.args.backend_proxy is not None: _backend_kwargs['proxy_backend'] = self.args.backend_proxy if self.args.backend_sessionprofiles is not None: _backend_kwargs['profiles_backend'] = self.args.backend_sessionprofiles if self.args.backend_clientsettings is not None: _backend_kwargs['settings_backend'] = self.args.backend_clientsettings if self.args.backend_clientprinting is not None: _backend_kwargs['printing_backend'] = self.args.backend_clientprinting # initialize the X2GoClient context and start the connection to the X2Go server self._pyhoca_logger('preparing requested X2Go session', loglevel=x2go.loglevel_NOTICE, ) x2go.X2GoClient.__init__(self, broker_url=self.args.broker_url, broker_password=self.args.broker_password, logger=liblogger, **_backend_kwargs) _profiles = self._X2GoClient__get_profiles() if self.args.session_profile and not _profiles.has_profile(self.args.session_profile): self._runtime_error('no such session profile of name: %s' % (self.args.session_profile), exitcode=31) self.auth_attempts = int(self.args.auth_attempts) if args.list_profiles: _session_profiles = self._X2GoClient__get_profiles() # retrieve a session list print print "Available X2Go session profiles" print "===============================" if hasattr(_session_profiles, 'config_files') and _session_profiles.config_files is not None: print "configuration files: %s" % _session_profiles.config_files if hasattr(_session_profiles, 'user_config_file') and _session_profiles.user_config_file is not None: print "user configuration file: %s" % _session_profiles.user_config_file if hasattr(_session_profiles, 'broker_url') and _session_profiles.broker_url is not None: print "X2Go Session Broker URL: %s" % _session_profiles.broker_url print for _profile_id in _session_profiles.profile_ids: _profile_config = _session_profiles.get_profile_config(_profile_id) _session_params = _session_profiles.to_session_params(_profile_id) print 'Profile ID: %s' % _profile_id print 'Profile Name: %s' % _session_params['profile_name'] print 'Profile Configuration:' pprint.pprint(_profile_config) print 'Derived session parameters:' pprint.pprint(_session_params) print # done sys.exit(0) elif self.args.session_profile: _cmdlineopt_to_sessionopt = { 'command': 'cmd', 'kb_layout': 'kblayout', 'kb_type': 'kbtype', 'sound': 'snd_system', 'ssh_privkey': 'key_filename', 'server': 'hostname', 'remote_ssh_port': 'port', } # 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): try: kwargs[_cmdlineopt_to_sessionopt[a]] = v except KeyError: 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, 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, 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, share_local_folders=self.args.share_local_folders, cmd=self.args.command) def authenticate(self): """\ Authenticate this L{PyHocaCLI} instance with the remote X2Go server. """ connected = False force_password_auth = False _username = self.args.username or self._X2GoClient__get_session_username(self.x2go_session_hash) # if we still don't have a valid user name, try the broker... if not _username and hasattr(self.session_profiles, 'get_broker_username'): _username = self.session_profiles.get_broker_username() try: _auth_count = self.auth_attempts +1 while not connected and _auth_count: try: self._X2GoClient__connect_session(self.x2go_session_hash, username=_username, password=self.args.password, force_password_auth=force_password_auth) connected = True force_password_auth = False except x2go.PasswordRequiredException, e: self._pyhoca_logger('unlock SSH key file (%s)' % self.args.ssh_privkey, loglevel=x2go.loglevel_NOTICE, ) self.args.password = getpass.getpass() except x2go.AuthenticationException, e: force_password_auth = True self._pyhoca_logger('passwordless login for ,,%s\'\' failed' % _username, loglevel=x2go.loglevel_WARN, ) self._pyhoca_logger('proceeding to interactive login for user ,,%s\'\'' % _username, loglevel=x2go.loglevel_NOTICE, ) 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) except x2go.SSHException, e: if str(e) not in ('not a valid DSA private key file', 'Incompatible ssh peer (no acceptable kex algorithm)', 'No authentication methods available'): self._runtime_error(str(e), exitcode=253) force_password_auth = True self._pyhoca_logger('passwordless login for ,,%s\'\' failed' % _username, loglevel=x2go.loglevel_WARN, ) self._pyhoca_logger('proceeding to interactive login for user ,,%s\'\'' % _username, loglevel=x2go.loglevel_NOTICE, ) if force_password_auth: self.args.password = getpass.getpass() # workaround for Python bug: http://bugs.python.org/issue11236 try: if self.args.password is not None and '\x03' in self.args.password: raise KeyboardInterrupt() except KeyboardInterrupt: self._runtime_error('Authentication cancelled by user by hitting Ctrl-C at password prompt', exitcode=-200) _auth_count -= 1 if not connected and not _auth_count: if self.auth_attempts >= 2: self._runtime_error('authentication failed, too many failures during interactive login', exitcode=-201) elif self.auth_attempts == 1: self._runtime_error('interactive authentication failed', exitcode=-202) else: self._runtime_error('non-interactive authentication failed', exitcode=-203) except socket.error, e: self._runtime_error('a socket error occured while establishing the connection: %s' % str(e), exitcode=-245) def MainLoop(self): """\ Start the main loop of this application. """ try: 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.list_desktops: # print a beautified desktop list for the user self.list_desktops(self.x2go_session_hash) sys.exit(0) if self.args.list_profiles: # print a beautified profile list for the user self.list_profiles() sys.exit(0) if self.args.resume: self.resume_session(self.x2go_session_hash) if self.args.share_desktop: self.share_desktop_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) if not (self.args.new or self.args.resume or self.args.share_desktop or self.args.session_profile): sys.exit(0) if self.args.resume or self.args.new: self._pyhoca_logger("give the X2Go session some time to come up...", loglevel=x2go.loglevel_NOTICE, ) i=0 while 0 < self.get_session(self.x2go_session_hash).get_progress_status() < 100: time.sleep(1) i+=1 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, loglevel=x2go.loglevel_INFO, ) self._pyhoca_logger("X2Go session name is: %s" % session_name, loglevel=x2go.loglevel_INFO, ) 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: session_duration = 0 while self._X2GoClient__session_ok(self.x2go_session_hash): time.sleep(2) session_duration +=2 # 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): self._pyhoca_logger("X2Go session %s has been suspended" % session_name, loglevel=x2go.loglevel_NOTICE, ) elif self._X2GoClient__is_session_running(self.x2go_session_hash): self._pyhoca_logger("X2Go session %s has been moved to a different screen" % session_name, loglevel=x2go.loglevel_NOTICE, ) except KeyboardInterrupt: if self.args.share_desktop: self._pyhoca_logger("Terminating X2Go shared desktop session %s" % session_name, loglevel=x2go.loglevel_INFO, ) self._X2GoClient__terminate_session(self.x2go_session_hash) time.sleep(2) self._pyhoca_logger("X2Go session %s has been terminated" % session_name, loglevel=x2go.loglevel_NOTICE, ) elif self.args.terminate_on_ctrl_c: self._pyhoca_logger("Terminating X2Go session %s" % session_name, loglevel=x2go.loglevel_INFO, ) self._X2GoClient__terminate_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 terminated" % session_name, loglevel=x2go.loglevel_NOTICE, ) else: self._pyhoca_logger("Suspending X2Go session %s" % session_name, loglevel=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, loglevel=x2go.loglevel_NOTICE, ) except x2go.X2GoSessionException, e: self._pyhoca_logger("X2GoSessionException occured:", loglevel=x2go.loglevel_ERROR) self._pyhoca_logger("-> %s" % str(e), loglevel=x2go.loglevel_ERROR) pyhoca-cli-0.5.0.2/pyhoca/cli/__init__.py0000644000000000000000000000203312461162146014736 0ustar # -*- coding: utf-8 -*- # Copyright (C) 2010-2015 by Mike Gabriel # # PyHoca CLI is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # PyHoca CLI 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero 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. """\ PyHoca-CLI is a simple command-line tool that allows the launching of X2Go sessions. For further information on X2Go, please visit the X2Go wiki: http://wiki.x2go.org """ __VERSION__ = "0.5.0.2" from frontend import * pyhoca-cli-0.5.0.2/pyhoca/__init__.py0000644000000000000000000000147112461162146014174 0ustar # -*- coding: utf-8 -*- # Copyright (C) 2010-2015 by Mike Gabriel # # PyHoca CLI is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # PyHoca CLI 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero 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. pyhoca-cli-0.5.0.2/README0000644000000000000000000000273112461162146011460 0ustar pyhoca-cli - Copyright (C) 2010-2015 by Mike Gabriel Contributors: 2010, Jörg Sawatzki 2010-2015, Dick Kniep Published under the terms of the GNU Affero General Public License. See http://www.gnu.org/licenses/agpl.html for a recent copy. === What is pyhoca-cli? === === Requirements === * the python-x2go module needs to be installed (>= 0.5.0.0) * the python-argparse module needs to be available * with python-setproctitle, the process name gets set from python to pyhoca-cli * you will also need a working version of nxproxy/nxproxy.exe somewhere on your system (if you have X2Go Client installed, everything should be in place) === Current features === * start a new session on an X2Go server * resume a suspended session on an X2Go server * suspend a running session (hit Ctrl+C) * terminate a running session * retrieve a list of running sessions * sound support available * local folder sharing * share an already running desktop session with yourself or another user * use session profiles provide via an X2Go Session Broker * mTelePlayer support with python-x2go (>= 0.5.0.0) === How to use it === Please refer to the man page: man pyhoca-cli === Known issues === Please refer to the TODO file that has been shipped with pyhoca-cli. Thanks in advance for your feedback and contributions, Fleckeby (Germany), 20141020, Mike Gabriel pyhoca-cli-0.5.0.2/setup.py0000755000000000000000000000306412461162146012315 0ustar #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2010-2015 by Mike Gabriel # # PyHoca is free software; you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # PyHoca 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 Affero General Public License for more details. # # You should have received a copy of the GNU Affero 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. import os from setuptools import setup # silence pyflakes, __VERSION__ is properly assigned below... __VERSION__ = '0.0.0.0' for line in file(os.path.join('pyhoca', 'cli', '__init__.py')).readlines(): if (line.startswith('__VERSION__')): exec(line.strip()) PROGRAM_VERSION = __VERSION__ setup( name = "PyHoca-CLI", version = PROGRAM_VERSION, description = "PyHoca-CLI is a cross-platform (Windows, MacOS X, Linux) X2Go client for the command line.", license = 'AGPLv3+', author = 'Mike Gabriel', url = 'http://www.x2go.org', namespace_packages = [ 'pyhoca', ], packages = [ 'pyhoca.cli', ], package_dir = {'': '.'}, exclude = [ 'pyhoca.cli.x2go', ], install_requires = [ 'setuptools', ] ) pyhoca-cli-0.5.0.2/TODO0000644000000000000000000000115412461162146011266 0ustar pyhoca-cli - Copyright (C) 2010-2015 by Mike Gabriel Contributors: 2010, Jörg Sawatzki 2010-2015, Dick Kniep Published under the terms of the GNU Affero General Public License. See http://www.gnu.org/licenses/gpl.html for a recent copy. === pyhoca-cli TODOs === * provide more cmdline options to configure session brokerage === pyhoca-cli Wishlist === * SOCKS client support If you find any issues with this programme please let me know. Fleckeby (Germany), 20141020 Mike Gabriel