qubes-doc/user/common-tasks/copy-paste.md

79 lines
4.0 KiB
Markdown
Raw Normal View History

2011-04-10 08:53:51 -04:00
---
2015-04-10 16:17:45 -04:00
layout: doc
2020-11-16 06:54:14 -05:00
title: Copying and pasting text between qubes
permalink: /doc/copy-paste/
redirect_from:
- /en/doc/copy-paste/
- /doc/CopyPaste/
- /wiki/CopyPaste/
2011-04-10 08:53:51 -04:00
---
2020-11-16 06:54:14 -05:00
Copying and pasting text between qubes
======================================
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
*This page is about copying and pasting plain text.
If you wish to copy more complex data, such as rich text or images, see [copying and moving files between qubes](/doc/copying-files/).
For dom0, see [copying from (and to) dom0](/doc/copy-from-dom0/).*
2020-11-16 06:54:14 -05:00
Qubes OS features a secure inter-qube clipboard that allows you to copy and paste text between qubes.
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
In order to copy text from qube A to qube B:
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
1. Select text from the source app in qube A, then copy it normally (e.g., by pressing Ctrl+C).
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
2. With the source app in qube A still in focus, press Ctrl+Shift+C.
This copies the text from qube A's clipboard to the inter-qube clipboard.
2020-11-16 06:54:14 -05:00
3. Select the target app in qube B and press Ctrl+Shift+V.
This copies the text from the inter-qube clipboard to qube B's clipboard and clears the inter-qube clipboard, ensuring that only qube B will have access to the copied text.
4. Paste the text in the target app in qube B normally (e.g., by pressing Ctrl+V).
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
This process might look complicated at first glance, but in practice it is actually very easy and fast once you get used to it.
At the same time, it provides you with full control over exactly which qube receives the content of the inter-qube clipboard every time.
2011-04-10 08:53:51 -04:00
2020-11-16 06:54:14 -05:00
Security
--------
2020-11-16 06:54:14 -05:00
The inter-qube clipboard system is secure because it doesn't allow any qube other than your selected target to steal any contents from the inter-qube clipboard.
Without such a system in place, any password you were to copy from the password manager in your vault qube to another qube, for example, would immediately be leaked to every other running qube in the system, including qubes that are untrusted by default, such as `sys-net`.
By giving you precise control over exactly which qube receives the inter-qube clipboard content, then immediately wiping the inter-qube clipboard afterward, Qubes OS protects the confidentiality of the text being copied.
2020-11-16 06:54:14 -05:00
However, one should keep in mind that performing a copy and paste operation from *less trusted* to *more trusted* qube is always potentially insecure, since the data that we copy could exploit some hypothetical bug in the target qube.
For example, the seemingly-innocent link that we copy from an untrusted qube could turn out to be a large buffer of junk that, when pasted into the target qube's word processor, could exploit a hypothetical bug in the undo buffer.
This is a general problem and applies to any data transfer from *less trusted* to *more trusted* qubes.
It even applies to copying files between physically separate (air-gapped) machines.
Therefore, you should always copy clipboard data only from *more trusted* to *less trusted* qubes.
2020-11-16 07:54:31 -05:00
See also [this article](https://blog.invisiblethings.org/2011/03/13/partitioning-my-digital-life-into.html) for more information on this topic, and some ideas of how we might solve this problem in some future version of Qubes, as well as [this message](https://groups.google.com/group/qubes-devel/msg/48b4b532cee06e01) from qubes-devel.
Clipboard automatic policy enforcement
--------------------------------------
2020-11-16 06:54:14 -05:00
The Qubes clipboard [RPC policy](/doc/rpc-policy/) is configurable in:
~~~
/etc/qubes-rpc/policy/qubes.ClipboardPaste
~~~
You may wish to configure this policy in order to prevent user error.
For example, if you are certain that you never wish to paste *into* your "vault" AppVM (and it is highly recommended that you do not), then you should edit the policy as follows:
~~~
2019-08-21 18:41:43 -04:00
@anyvm vault deny
@anyvm @anyvm ask
~~~
2014-01-24 09:52:58 -05:00
2020-11-16 06:54:14 -05:00
Shortcut configuration
2014-01-24 09:52:58 -05:00
----------------------
2014-01-24 09:54:05 -05:00
The copy/paste shortcuts are configurable in:
2014-01-24 09:52:58 -05:00
~~~
2014-01-24 09:52:58 -05:00
/etc/qubes/guid.conf
~~~
2015-11-19 07:13:32 -05:00
If you edit a line in this file, you must uncomment it (by removing the initial `#` character), or else it will have no effect.
2015-11-20 02:26:28 -05:00
VMs need to be restarted in order for changes in `/etc/qubes/guid.conf` to take effect.