clean up language, added inter-doc link

This commit is contained in:
Michael Carbone 2016-04-08 20:58:50 -04:00
parent 9f28991c6e
commit ef77e098df

View File

@ -1,6 +1,6 @@
---
layout: doc
title: Copying to and from dom0
title: Copying files to and from dom0
permalink: /doc/copy-to-dom0/
redirect_from:
- /en/doc/copy-to-dom0/
@ -8,26 +8,28 @@ redirect_from:
- /wiki/CopyToDomZero/
---
Copying files to between VMs and Dom0
Copying files to and from Dom0
-------------------------------------
First, there should normally be few reasons for the user to want to copy files from VMs to Dom0, as Dom0 only acts as a "thin trusted terminal", and no user applications run there. However, one exception to this is if we want to copy a desktop wallpaper, that we normally have in one of the AppVMs (e.g. in the 'personal' AppVM where we got it from our camera, or downloaded from the Internet). While it's a well justified reason, one should remember, however, that copying untrusted files to Dom0 might be a fatal security problem. Imagine what would happen if the wallpaper (e.g. a JPEG file) was somehow malformed and was in fact attempting to exploit a hypothetical JPEG parser bug in Dom0 code (e.g. in the Dom0's Xorg/KDE component that parses the wallpaper and displays it).
There should normally be few reasons for the user to want to copy files from VMs to Dom0, as Dom0 only acts as a "thin trusted terminal", and no user applications run there. Copying untrusted files to Dom0 is not advised and may compromise the security of your Qubes system. Because of this, we do not provide a graphical user interface for it, unlike [copying files between VMs](/doc/copying-files/).
For this reason we intentionally do not provide a convenient tool for copying files between VMs and Dom0 (while we provide a tool for copying files between VMs). However, if you're determined to copy some files to Dom0 anyway, you can use the following method (run this command from Dom0's console):
One common use-case for this is if we want to use a desktop wallpaper in Dom0 we have located in one of our AppVMs (e.g. in the 'personal' AppVM where we got the wallpaper from our camera or downloaded it from the Internet). While it's a well-justified reason, imagine what would happen if the wallpaper (e.g. a JPEG file) was somehow malformed or malicious and attempted to exploit a hypothetical JPEG parser bug in Dom0 code (e.g. in the Dom0's Xorg/KDE code that parses the wallpaper and displays it).
If you are determined to copy some files to Dom0 anyway, you can use the following method (run this command from Dom0's console):
~~~
qvm-run --pass-io <src_domain> 'cat /path/to/file_in_src_domain' > /path/to/file_name_in_dom0
~~~
BTW, you can use the same method to copy files from Dom0 to VMs:
You can use the same method to copy files from Dom0 to VMs:
~~~
cat /path/to/file_in_dom0 | qvm-run --pass-io <dst_domain> 'cat > /path/to/file_name_in_appvm'
~~~
### Copying logs from dom0
### Copying logs from Dom0
In order to easily copy/paste the contents of logs from dom0 to the inter-VM clipboard:
In order to easily copy/paste the contents of logs from dom0 to the inter-VM clipboard, you can simply:
1. Right-click on the desired VM in the Qubes VM Manager.
2. Click "Logs."
@ -35,3 +37,10 @@ In order to easily copy/paste the contents of logs from dom0 to the inter-VM cli
4. Click "Copy to Qubes clipboard."
You may now paste the log contents to any VM as you normally would (i.e., Ctrl-Shift-V, then Ctrl-V).
### Copy/Paste to and from Dom0
For data other than logs, there are two options:
1. Copy it as a file (see above)
2. Paste the data to `/var/run/qubes/qubes-clipboard.bin`, then write "dom0" to `/var/run/qubes/qubes-clipboard.bin.source`. Then use Ctrl-Shift-V to paste the data to the desired VM.