[X2Go-Commits] [x2goclient] 05/38: pyhoca-cli: Add cmdline parameter --clipboard-mode.
git-admin at x2go.org
git-admin at x2go.org
Fri Dec 15 21:15:11 CET 2023
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2goclient.
commit 7e84ca499f4b6b29ca7796886c7231be6353e87e
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date: Thu Aug 19 16:11:42 2021 +0200
pyhoca-cli: Add cmdline parameter --clipboard-mode.
---
man/man1/pyhoca-cli.1 | 3 +++
pyhoca-cli | 6 ++++++
pyhoca/cli/frontend.py | 1 +
3 files changed, 10 insertions(+)
diff --git a/man/man1/pyhoca-cli.1 b/man/man1/pyhoca-cli.1
index 107de1b8..03d382dc 100644
--- a/man/man1/pyhoca-cli.1
+++ b/man/man1/pyhoca-cli.1
@@ -206,6 +206,9 @@ Enable Xinerama support for multi-head setups. Requires X2Go Server 4.1.0.0 (or
\*(T<\fB\-q, \-\-link\fR \fI{modem|isdn|adsl|wan|lan}\fR\*(T>
Link quality (default: 'adsl')
.TP
+\*(T<\fB\-C, \-\-clipboard\-mode\fR \fI{none|server|client|both}\fR\*(T>
+Clipboard mode (default: \'both\' directions, other allowed values: \'none\' for no clipboard support, \'client\' to server copy+pasting only, \'server\' to client copy+pasting only)
+.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.
diff --git a/pyhoca-cli b/pyhoca-cli
index 3d02377e..19f0263c 100755
--- a/pyhoca-cli
+++ b/pyhoca-cli
@@ -193,6 +193,7 @@ nx_options = [
{'args':['--pack'], 'default': '16m-jpeg-9', 'help': 'compression methods (see below for possible values)', },
{'args':['--kbd-type'], 'default': 'auto', 'help': 'set Keyboard type (default: \'auto\', other allowed options: \'pc105/us\', \'pc105/de\', etc.)',},
{'args':['--kbd-layout'], 'default': 'null', 'help': 'use keyboard layout (default: \'null\', allowed options: \'de\', \'fr\', etc.)',},
+ {'args':['-C', '--clipboard-mode'], 'default': 'both', 'help': 'configure clipboard mode (default: \'both\' directions, other allowed values: \'none\' for no clipboard support, \'client\' to server copy+pasting only, \'server\' to client copy+pasting only)',},
]
compat_options = [
{'args':['--port'], 'default': None, 'help': 'compatibility option, synonymous to --remote-ssh-port PORT', },
@@ -418,6 +419,11 @@ Possible values for the --pack NX option are:
if a.kbd_type == 'auto':
a.kbd_layout = 'null'
+ # input check for --clipboard-mode
+ a.clipboard_mode = a.clipboard_mode.lower()
+ if a.clipboard_mode not in ('none', 'both', 'client', 'server'):
+ runtime_error ("value for cmd line argument --clipboard-mode is not any of 'none', 'both', 'client' or 'server'", parser=p, exitcode=1)
+
# lightdm remote login magic takes place here
if a.from_stdin:
diff --git a/pyhoca/cli/frontend.py b/pyhoca/cli/frontend.py
index 7551838d..26091738 100644
--- a/pyhoca/cli/frontend.py
+++ b/pyhoca/cli/frontend.py
@@ -471,6 +471,7 @@ class PyHocaCLI(x2go.X2GoClient):
share_local_folders=self.args.share_local_folders,
allow_share_local_folders=allow_share_local_folders,
forward_sshagent=self.args.forward_sshagent,
+ clipboard=self.args.clipboard_mode,
cmd=self.args.command)
def authenticate(self):
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
More information about the x2go-commits
mailing list