Any way to globally disable the clipboard copy and paste feature between local and remote?

2,072 views
Skip to first unread message

asm warrior

unread,
Jul 9, 2016, 3:26:44 AM7/9/16
to TigerVNC User Discussion/Support
From the document of vncconfig, http://tigervnc.org/doc/vncconfig.html
I see that this program is used to support the clipboard copy and paste text between local and remote computer. My question is: is there any way from the server side I could disable this feature.

I mean, I could remove the vncconfig executable from the /usr/bin/, thus, when a server is created, the clipboard is disabled. But a user can simply copy a vncconfig program from other computer, and run it from his own home folder, and this clipboard support comes back.

So, is it possible to disable this feature globally(by a root user), so normal user has no way to enable this feature?

Thanks.
Asmwarrior

Pierre Ossman

unread,
Jul 11, 2016, 5:04:33 AM7/11/16
to asm warrior, TigerVNC User Discussion/Support
Afraid not. There is no global configuration for TigerVNC. Not that it
would really help if the users can run their own binaries as they could
just start a modified Xvnc.

If you've somehow managed to control Xvnc though you can specify these
parameters:

-NoClipboard -SendCutText=0 -AcceptCutText=0

Regards
--
Pierre Ossman Software Development
Cendio AB https://cendio.com
Teknikringen 8 https://twitter.com/ThinLinc
583 30 Linköping https://facebook.com/ThinLinc
Phone: +46-13-214600 https://plus.google.com/+CendioThinLinc

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

asmwarrior

unread,
Jul 17, 2016, 8:15:40 AM7/17/16
to Pierre Ossman, TigerVNC User Discussion/Support
On 2016-7-11 17:04, Pierre Ossman wrote:
> On 09/07/16 09:26, asm warrior wrote:
>> From the document of vncconfig, http://tigervnc.org/doc/vncconfig.html
>> I see that this program is used to support the clipboard copy and paste
>> text between local and remote computer. My question is: is there any way
>> from the server side I could disable this feature.
>>
>> I mean, I could remove the vncconfig executable from the /usr/bin/, thus,
>> when a server is created, the clipboard is disabled. But a user can simply
>> copy a vncconfig program from other computer, and run it from his own home
>> folder, and this clipboard support comes back.
>>
>> So, is it possible to disable this feature globally(by a root user), so
>> normal user has no way to enable this feature?
>>
>
> Afraid not. There is no global configuration for TigerVNC. Not that it would really help if the users can run their own binaries as they could just start a modified Xvnc.
>
> If you've somehow managed to control Xvnc though you can specify these parameters:
>
> -NoClipboard -SendCutText=0 -AcceptCutText=0
>
> Regards
Thanks for the help.
In-fact, for security reasons, I'm having xrdp 0.6.1 and TigerVNC(installed from offical repo by the yum command) both installed on a Centos 6.7 system. So, a user can only login through the xrdp, then the xrdp will dynamically create a vnc session. A user is not allowed to create another vnc session, because only the port of the xrdp is allowed in the firewall, and if the user kill the xvnc process, the remote connection is also disconnected. I can set the parameter of the command when xrdp create/run a vnc session.

From the document of TigerVNC, especially the vncconfig, is it necessary running vncconfig to support clipboard, I mean if I don't run vncconfig, the clipboard is always disabled(whether I have -SendCutText=1 -AcceptCutText=1 ?), If I disable the clipboard from xvnc's command line, does vncconfig can re-enable the clipboard feature?

I see an issue that clipboard does not work in this case. If I try to run the vncconfig, then the remote session just get disconnected if I copy anything in the remote computer. (there is a bug report in xrdp's issue system: copying to the X clipboard causes disconnect from tightvnc · Issue #141 · neutrinolabs/xrdp - https://github.com/neutrinolabs/xrdp/issues/141), but it looks like an xrdp issue.

The feature I just like is that: some thing like "-SendCutText=0 -AcceptCutText=1", so that user can only copy content from the server, but they can't copy content from local computer to the server.

Thanks.
asmwarrior


Pierre Ossman

unread,
Jul 19, 2016, 5:21:50 AM7/19/16
to asmwarrior, TigerVNC User Discussion/Support
On 17/07/16 14:17, asmwarrior wrote:
>
> From the document of TigerVNC, especially the vncconfig, is it
> necessary running vncconfig to support clipboard, I mean if I don't
> run vncconfig, the clipboard is always disabled(whether I have
> -SendCutText=1 -AcceptCutText=1 ?), If I disable the clipboard from
> xvnc's command line, does vncconfig can re-enable the clipboard
> feature?
>

Normally, yes. That's why you need to add -NoClipboard. That disables
vncconfig's ability to turn the clipboard back on.

> I see an issue that clipboard does not work in this case. If I try to
> run the vncconfig, then the remote session just get disconnected if I
> copy anything in the remote computer. (there is a bug report in
> xrdp's issue system: copying to the X clipboard causes disconnect
> from tightvnc · Issue #141 · neutrinolabs/xrdp -
> https://github.com/neutrinolabs/xrdp/issues/141), but it looks like
> an xrdp issue.

Yes, that sounds like an xrdp bug. You'll have to poke them a bit mor.

>
> The feature I just like is that: some thing like "-SendCutText=0
> -AcceptCutText=1", so that user can only copy content from the
> server, but they can't copy content from local computer to the
> server.
>

You should reverse the flags in that case.

asmwarrior

unread,
Jul 27, 2016, 6:07:44 AM7/27/16
to Pierre Ossman, TigerVNC User Discussion/Support
On 2016-7-19 17:21, Pierre Ossman wrote:
> On 17/07/16 14:17, asmwarrior wrote:
>>
>> From the document of TigerVNC, especially the vncconfig, is it
>> necessary running vncconfig to support clipboard, I mean if I don't
>> run vncconfig, the clipboard is always disabled(whether I have
>> -SendCutText=1 -AcceptCutText=1 ?), If I disable the clipboard from
>> xvnc's command line, does vncconfig can re-enable the clipboard
>> feature?
>>
>
> Normally, yes. That's why you need to add -NoClipboard. That disables vncconfig's ability to turn the clipboard back on.
>
>> I see an issue that clipboard does not work in this case. If I try to
>> run the vncconfig, then the remote session just get disconnected if I
>> copy anything in the remote computer. (there is a bug report in
>> xrdp's issue system: copying to the X clipboard causes disconnect
>> from tightvnc · Issue #141 · neutrinolabs/xrdp -
>> https://github.com/neutrinolabs/xrdp/issues/141), but it looks like
>> an xrdp issue.
>
> Yes, that sounds like an xrdp bug. You'll have to poke them a bit mor.
>
>>
>> The feature I just like is that: some thing like "-SendCutText=0
>> -AcceptCutText=1", so that user can only copy content from the
>> server, but they can't copy content from local computer to the
>> server.
>>
>
> You should reverse the flags in that case.
>
> Regards
Hi, Pierre, thanks for the reply and help.

Asmwarrior
Reply all
Reply to author
Forward
0 new messages