1pyhoca-cli(1)                  X2Go Application                  pyhoca-cli(1)
2
3
4

NAME

6       pyhoca-cli - X2Go command line client written in Python
7

SYNOPSIS

9       pyhoca-cli [ options ] [[<user>@]<host>]
10

DESCRIPTION

12       pyhoca-cli  aims to be a cross-platform (Windows, Mac OS X, Linux) X2Go
13       command line client written in Python.
14
15       You can use it for scripting remote X2Go sessions or  simply  starting,
16       resuming  or  shadowing X2Go sessions from the command line in a termi‐
17       nal.
18
19       It supports versatile command line options as  well  as  parsing  x2go‐
20       client configuration files.
21
22       See the included README and TODO for further information on pyhoca-cli.
23

COMMON OPTIONS

25       pyhoca-cli accepts the following common options:
26
27       -h, --help
28              Display a help with all available command line options and exit.
29
30       -V, --version
31              Output version information and exit.
32
33       -d, --quiet
34              No output to stdout at all!
35
36       -d, --debug
37              Enable debugging output.
38
39       --libdebug
40              Enable debugging code of the unterlying Python X2Go module.
41
42       --libdebug-sftpxfer
43              Enable  debugging  code  of Python X2Go's sFTP server code (very
44              verbose, and it may even reveal promiscuous data).
45

SERVER / SESSION PROFILE

47       You either have to specify a server name or a pre-configured X2GoClient
48       session  profile to tell pyhoca-cli to what X2Go server to connect. py‐
49       hoca-cli will not start if neither of these two options has been  given
50       on the command line.
51
52       --server <HOSTNAME_or_IP>
53              Legacy parameter, still supported, but using positional argument
54              [<user>@]<host>] should become your preferred syntax.
55
56       -P, --session-profile <SESSION_PROFILE_NAME>
57              The name of the session profile to be used to make  the  connec‐
58              tion.
59

ACTIONS

61       pyhoca-cli accepts exclusively one of the listed actions:
62
63       -N, --new
64              Start  a  new X2Go session on server (default mode if no mode is
65              explicitly specified).
66
67       --try-resume
68              When given with --new    , try finding and  resuming  a  session
69              originally started with the same command. If that fails, start a
70              new session, finally.
71
72       -R, --resume <SESSION_NAME>
73              Resume existing X2Go session <SESSION_NAME> on  server.  Special
74              values  for  <SESSION_NAME> are ,,NEWEST'' (will resume youngest
75              session) or ,,OLDEST'' (resume session with oldest timestamp).
76
77       -D, --share-desktop <USER>@<DISPLAY>
78              Share an X2Go session on the remote  server  specified  by  <US‐
79              ER>@<DISPLAY>,  whereas  <USER>  can  be  the  same user that is
80              starting the share mode session or any other  user  that  grants
81              X2Go desktop sharing for the current user.
82
83       -S, --suspend <SESSION_NAME>
84              Suspend running X2Go session <SESSION_NAME>. A special value for
85              <SESSION_NAME> is ,,ALL'' (will suspend all sessions of the con‐
86              nected user).
87
88       -T, --terminate <SESSION_NAME>
89              Terminate  running  X2Go session <SESSION_NAME>. A special value
90              for <SESSION_NAME> is ,,ALL'' (will terminate  all  sessions  of
91              the connected user).
92
93       -L, --list-sessions
94              List user's X2Go sessions on server.
95
96       --list-profiles
97              List user's X2Go session profiles configure on this client.
98
99       --from-stdin
100              For   LightDM   remote   login   integration:   read  <username>
101              <host[:port]> <command> <password> from STDIN' and start  a  new
102              session,  transfer  a running session or resume a suspended ses‐
103              sion.
104
105              If there are several  sessions  running/suspended  of  the  same
106              desktop  shell,  then  the  first  session  found will be trans‐
107              ferred/resumed. If there are several  sessions  running  with  a
108              different  desktop  shell as session type (or even rootless ses‐
109              sions) none of these session will be touched unless any  of  the
110              discovered  sessions  match in the requested desktop shell (i.e.
111              X2Go session type).
112
113              This option is only available for the Linux version  of  pyhoca-
114              cli.
115

ACTION OPTIONS

117       pyhoca-cli actions can be tweaked by these options:
118
119       --clean-sessions
120              Clean all of the user's suspended/running sessions before start‐
121              ing a new one on the named X2Go server.
122
123       --terminate-on-ctrl-c
124              Terminate the connected session when pressing CTRL+C (instead of
125              suspending the session).
126

X2GO OPTIONS

128       -c, --command <CMD>
129              Command to run with --new mode on server (default: xterm).
130
131       -l, -u, --username <USERNAME>
132              Username for the session (default: currently logged in user).
133
134       --password <PASSWORD>
135              User password for this session. If a matching private SSH key is
136              available this one will be  preferred  for  authentication.  The
137              cleartext  password  that has been specified at the command line
138              will be masqueraded in the systems process list (Linux,  MacOS).
139              On Windows systems the usage of the --password option is forbid‐
140              den.
141
142       --force-password
143              Enforce authentication with username and password, prohibit  SSH
144              public/private key authentication.
145
146       -p, --remote-ssh-port <R_PORT>
147              Remote X2Go server's SSH port (default: 22).
148
149       -i, -k, --ssh-privkey <SSH_PRIVKEY>
150              Use  file  <SSH_PRIVKEY> as private key for SSH connections (de‐
151              fault: ~/.ssh/id_rsa).
152
153       --add-to-known-hosts
154              Add RSA/DSA host key to ~/.ssh/known_hosts  if  authenticity  of
155              server can't be established (default: not set).
156
157       -A, --forward-sshagent
158              Enable SSH agent forwarding.
159
160       --sound {pulse|esd|none}
161              X2Go server's sound system (default: 'pulse').
162
163       -F, --share-local-folders <folder1>[,<folder2>[,...]]
164              A  comma  separated  list  of  local  folders that shall be made
165              available in the remote X2Go session.
166
167       --printing
168              Use X2Go printing (default: disabled).
169
170       --share-mode {0|1}
171              Share mode for X2Go desktop sharing (0: view-only, 1:  full  ac‐
172              cess).
173
174       --auth-attempts {0,1,2,3,...}
175              Number  of interactive authentication attempts in case authenti‐
176              cation with the server fails (wrong  password?).  A  value  that
177              equals  0 disables interactive authentication completely and re‐
178              quires that a private SSH key has been given on the command line
179              or  in  the  session profile or that the --password command line
180              option is used.
181
182

BROKER OPTIONS

184       In case you want to retrieve X2Go session profiles from an X2Go Session
185       Broker use the following options:
186
187       --broker-url=<URL>
188              Specify the <URL> of the X2Go Session Broker. pyhoca-cli can ac‐
189              cess http:// and ssh:// style URLs.
190
191              Syntax of <URL> for HTTP brokerage:
192
193              http(s)://<user>:<password>@<hostname>:<port>/path/to/broker
194
195              Syntax of <URL> for  SSH brokerage:
196
197              ssh://<user>:<password>@<hostname>:<port>/usr/bin/x2gobroker (or
198              any executable that provides the broker via SSH).
199
200
201       --broker-password <password>
202              Session broker password for retrieving session profiles from the
203              X2Go Session Broker.  The cleartext password that has been spec‐
204              ified  at  the  command  line will be masqueraded in the systems
205              process list (Linux, MacOS). On Windows systems the usage of the
206              --broker-password option is forbidden.
207
208       --broker-cacertfile=</path/to/cafile.crt>
209              NOT IMPLEMENTED YET: Specify a special (self-signed) root-CACert
210              file that shall get used when connecting to an X2Go Session Bro‐
211              ker via https (SSL). (Not implemented, yet).
212
213       --broker-noauth
214              NOT IMPLEMENTED YET: The X2Go Session Broker is accessible with‐
215              out authentication.
216
217       --auth-id=<USERNAME>
218              NOT IMPLEMENTED YET:  Use  this  <USERNAME>  for  authenticating
219              against  the X2Go Session Broker. This option mostly makes sense
220              together with --broker-autologin or --broker-ssh-key.  (Not  im‐
221              plemented, yet).
222
223       --broker-autologin
224              NOT  IMPLEMENTED  YET: For SSH based X2Go Session Brokers. If an
225              SSH agent is available or default key files exist then try those
226              for  authentication against the X2Go Session Broker. (Not imple‐
227              mented, yet).
228
229       --broker-ssh-key=<SSHPRIVKEY>
230              NOT IMPLEMENTED YET: For SSH based X2Go  Session  Brokers.  Full
231              path to a valid SSH private key file. (Not implemented, yet).
232

NX OPTIONS (Version 3)

234       -g, --geometry {<WIDTH>x<HEIGHT>|fullscreen|maximize}
235              Screen geometry (default: '800x600').
236
237       --xinerama
238              Enable  Xinerama  support  for  multi-head setups. Requires X2Go
239              Server 4.1.0.0 (or newer).
240
241       -q, --link {modem|isdn|adsl|wan|lan}
242              Link quality (default: 'adsl')
243
244       -t, --session-type {desktop|application}
245              Session type (default: 'application'). Note: there are also some
246              auto-detection feature for the session type built into the code.
247              It might not always happen what you expect from setting this op‐
248              tion.
249
250       --pack <PACK_METHOD>
251              Compression method (see below for possible values).
252
253       --kbd-layout {us|de|fr|...}
254              Use keyboard layout (default: 'null').
255
256       --kbd-type {auto|pc105/us|pc105/de|...}
257              Set  Keyboard  type  (default 'auto'). Use auto as value here to
258              enable X2Go's keyboard auto-detection code.
259

BACKEND OPTIONS

261       pyhoca-gui supports transparent use of  different  data  backends.  For
262       configuration  three  backends are common: FILE, GCONF (Linux only) and
263       WINREG (Windows only). The default backend currently is the FILE  back‐
264       end on all platforms.
265
266       For client-server communication the only yet implemented backend is the
267       STDOUT backend (as X2Go server commands print their  execution  results
268       to  /dev/stdout. (But other communication backends might be possible in
269       the future...).
270
271       In the same way we are focusing on  a  successor  of  the  current  NX3
272       agent/proxy tool. A change in the proxy backend will also be implement‐
273       ed as a backend.
274
275       --backend-controlsession <CONTROLSESSION_BACKEND>
276              Force usage of a certain CONTROLSESSION_BACKEND (do not use this
277              unless you know exactly what you are doing).
278
279       --backend-terminalsession <TERMINALSESSION_BACKEND>
280              Force  usage  of  a  certain TERMINALSESSION_BACKEND (do not use
281              this unless you know exactly what you are doing).
282
283       --backend-serversessioninfo <SERVERSESSIONINFO_BACKEND>
284              Force usage of a certain SERVERSESSIONINFO_BACKEND (do  not  use
285              this unless you know exactly what you are doing).
286
287       --backend-serversessionlist <SERVERSESSIONLIST_BACKEND>
288              Force  usage  of a certain SERVERSESSIONLIST_BACKEND (do not use
289              this unless you know exactly what you are doing).
290
291       --backend-proxy <PROXY_BACKEND>
292              Force usage of a certain PROXY_BACKEND (do not use  this  unless
293              you know exactly what you are doing).
294
295       --backend-sessionprofiles <SESSIONPROFILES_BACKEND>
296              Use  given  backend  for  accessing  session profiles, available
297              backends on Linux: FILES, GCONF; on Windows: FILES, WINREG.
298
299       --backend-clientsettings <CLIENTSETTINGS_BACKEND>
300              Use given backend for accessing the client  settings  configura‐
301              tion,  available  backends  on  Linux: FILES, GCONF; on Windows:
302              FILES, WINREG.
303
304       --backend-clientprinting <CLIENTPRINTING_BACKEND>
305              Use given backend for accessing the client  printing  configura‐
306              tion,  available  backends  on  Linux: FILES, GCONF; on Windows:
307              FILES, WINREG..SH COMPATIBILITY OPTIONS pyhoca-cli aims at being
308              fully  compatible with all command line options and session con‐
309              fig files of the X2Go project's X2Go command line  client  x2go‐
310              client-cli  as well as the x2goclient GUI. This is still work in
311              progress.  To achieve this, some compatibility options have  al‐
312              ready been added:
313
314       --port <R_PORT>
315              Compatibility option, synonymous to --remote-ssh-port <R_PORT>.
316
317       --ssh-key <SSH_PRIVKEY>
318              Compatibility option, synonymous to --ssh-privkey SSH_KEY.
319
320       --use-sound {yes|no}
321              Compatibility option, synonymous to --sound {pulse|none}.
322
323       --client-ssh-port <PORT>
324              Compatibility  option  for the x2goclient GUI. PyHoca-Cli (resp.
325              Python X2Go) brings its own internal sFTP server. Thus, this op‐
326              tion will be ignored.
327

NX COMPRESSION METHODS

329       As NX compression methods (--pack option) the following values are pos‐
330       sible. The % character must be replaced by a digit 0-9.
331
332       nopack, 8, 64, 256, 512, 4k, 32k, 64k, 256k, 2m, 16m 256-rdp,  256-rdp-
333       compressed,  32k-rdp,  32k-rdp-compressed,  64k-rdp 64k-rdp-compressed,
334       16m-rdp,  16m-rdp-compressed  rfb-hextile,  rfb-tight,   rfb-tight-com‐
335       pressed  8-tight,  64-tight,  256-tight, 512-tight, 4k-tight, 32k-tight
336       64k-tight, 256k-tight, 2m-tight, 16m-tight 8-jpeg-%, 64-jpeg, 256-jpeg,
337       512-jpeg,  4k-jpeg,  32k-jpeg  64k-jpeg, 256k-jpeg, 2m-jpeg, 16m-jpeg-%
338       8-png-jpeg-%, 64-png-jpeg, 256-png-jpeg, 512-png-jpeg, 4k-png-jpeg 32k-
339       png-jpeg,   64k-png-jpeg,  256k-png-jpeg,  2m-png-jpeg,  16m-png-jpeg-%
340       8-png-%, 64-png, 256-png, 512-png, 4k-png 32k-png,  64k-png,  256k-png,
341       2m-png, 16m-png-% 16m-rgb-%, 16m-rle-%
342

SEE ALSO

344       /usr/share/doc/python-x2go
345

AUTHOR

347       This    manual   has   been   written   by   for   the   X2Go   project
348       (http://www.x2go.org) by
349
350       Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
351
352
353
354Version 0.6.0.1                    Dec 2018                      pyhoca-cli(1)
Impressum