Copying text to/from Dom0

118 views
Skip to first unread message

duc...@disroot.org

unread,
Sep 22, 2019, 7:40:10 AM9/22/19
to qubes...@googlegroups.com
Sorry guys, another couple of questions!

I was trying to manually correct the .onion addresses in the dom0 repos
at qubes-dom0.repo and qubes-templates.repo. I had the new address in a
text file on a flash drive. I think the advice is not to connect flash
drives directly to dom0 so I attached it to the Vault domain instead.
Then I discovered I didn't know how to copy/paste the text from that
domain's clipboard to dom0.

In the official documentation "Copying from (and to) dom0", there is no
mention at all of how to copy text via the clipboard from a domain to
dom0. What is the method to use?

Later, when I was trying to copy text from dom0 Console via clipboard to
the Vault domain, I read the same article and it says:

> 1. Use the **Qubes Clipboard** widget:
> - Copy text to the clipboard normally in dom0.
> - Click the **Qubes Clipboard** icon in the Notification Area

But I can't find a Qubes Clipboard icon in the Notification Area. I'm
not even sure where the Notification Area is - is it the Task Bar at the
top of the screen? All notifications seem to cascade down the right side
of the screen, and there's definitely no icon there.

signature.asc

799

unread,
Sep 22, 2019, 8:10:37 AM9/22/19
to duc...@disroot.org, qubes-users
Hello


<duc...@disroot.org> schrieb am So., 22. Sep. 2019, 13:40:

In the official documentation "Copying from (and to) dom0", there is no
mention at all of how to copy text via the clipboard from a domain to
dom0. What is the method to use?

Copying from dom0 to an AppVM is ok, as dom0 has to be trusted. The opposite way you are moving data from a more untrusted source to dom0. This includes a risk (from a "beeing reasonable secure perspective").

The way I do it, is to use "xclip" which is installed in the AppVM (template).
Xclip can be used to copy the content of the clipboard to a file or the other way around.
Therefore you could write a script in dom0 which will take the AppVM clipboard content inside the appbm store it in a file and then use pass-io or qvm-copy to move the data from the AppVM to dom0 and - if you install xclip in dom0 - even to the clipboard of dom0.

I'm using xclip to move screenshots from dom0 to the AppVM, if you look into the script you will be able to get an idea how xclip works.


[799]

Andrew David Wong

unread,
Sep 22, 2019, 3:28:33 PM9/22/19
to duc...@disroot.org, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 9/22/19 6:39 AM, duc...@disroot.org wrote:
> In the official documentation "Copying from (and to) dom0", there
> is no mention at all of how to copy text via the clipboard from a
> domain to dom0. What is the method to use?
>

https://www.qubes-os.org/doc/copy-from-dom0/#copying-to-dom0

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEZQ7rCYX0j3henGH1203TvDlQMDAFAl2Hy1IACgkQ203TvDlQ
MDBPfA/+Pe8OGl/VQb+jDPMQzMlDm0MoOYTBZ6zbEmOSkGlqQF6Zd8ELr6FwTRS6
lsh23tZciVNxQxmUtrHM0s2wnB6c7ldumLgLeyX5l2AKo3jmeGVg8fONE/GNqltZ
V5w95AQAtgql7nkkWljnNOAhHFBm7b8mrPCBYIsQKEWUnhZxfXxl2Or7A6JOPfl4
qoP42wPGfgFBLRxWsktSthjmQ7CCkI2Hpz6cypYMfFRDTumYu1FOyH5ZFPGs16Bx
p1IuQLZa860Y947WZIBX5QO4zMztn5Iq6ejCfSmCia/7SPAoS3AOJEQfcwx1k3wY
ULbBUCertNiAqNG2MhYEXK/V/W0bhr7+qgZvEpIdrx+HqUWSaLJAQRpjooMzUFV7
nDL11mGWIH8TMZ+RVGiVoyhk4tdNdb+KwYJvOAxriJBPC+h2RwWLtoa5bjqiw6p1
YTdLg4dA8a0On/3de4WnxW7ALJqJ27rnGn7ZCh4cf/fDQlrJiTcnvRkBleSc5StT
4ucLwo8hZNedzh6RoWaq2aCzs8hFWSgLHawr9msvF91OW4sLPrQnxJeHV34BmJbU
KTFA0UuCzDKLPXehOICT1vKq61DSJj9Wh3jOOKKvJVYvoBAjVJVP1V8S9ZuVJcrP
R0R/HD1v8yPUp/4xiubgXX9kHZ0ZnVTCkdmQGWgGdXXgCjCp7Ks=
=kHhk
-----END PGP SIGNATURE-----

duc...@disroot.org

unread,
Sep 23, 2019, 5:50:46 AM9/23/19
to qubes...@googlegroups.com
Andrew David Wong:
> On 9/22/19 6:39 AM, duc...@disroot.org wrote:
>> In the official documentation "Copying from (and to) dom0", there
>> is no mention at all of how to copy text via the clipboard from a
>> domain to dom0. What is the method to use?
>
>
> https://www.qubes-os.org/doc/copy-from-dom0/#copying-to-dom0
>
>

Hi,

That's the document I was referencing, but it doesn't mention using the
clipboard, only files. It seemed to me that passing plain text by the
clipboard to dom0 was going to be more secure than passing a complete
file, so assumed that would be the preferred method. Does such a
mechanism not exist then?

Thanks.

signature.asc

Bernhard

unread,
Sep 23, 2019, 9:30:12 AM9/23/19
to qubes...@googlegroups.com

> That's the document I was referencing, but it doesn't mention using the
> clipboard, only files. It seemed to me that passing plain text by the
> clipboard to dom0 was going to be more secure than passing a complete
> file, so assumed that would be the preferred method. Does such a
> mechanism not exist then?
There is a reason. Look for example here:

https://security.stackexchange.com/questions/113627/what-is-the-risk-of-copy-and-pasting-linux-commands-from-a-website-how-can-some
https://unix.stackexchange.com/questions/15101/how-to-avoid-escape-sequence-attacks-in-terminals

better write/copy in a file, check it carefully and transfer then. And check again. Many other attacks are possible..

Andrew David Wong

unread,
Sep 23, 2019, 3:39:29 PM9/23/19
to duc...@disroot.org, qubes...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Correct. The warning against copying files into dom0 also applies to
copying text into dom0. I'll update the document to reflect this.

- --
Andrew David Wong (Axon)
Community Manager, Qubes OS
https://www.qubes-os.org

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEZQ7rCYX0j3henGH1203TvDlQMDAFAl2JH2IACgkQ203TvDlQ
MDC4yRAAxfqERA6p0ao4Ag/mQHVCpl6KvzM9dCt28L/oEzhfb/Ztgp8QJVU3+2By
KIrPGHOX3v15RF1u37RI8Lns1TcwB+kmErQjOzPj2x9M9Z7htB2olxFG3ngGxvT5
JF4F3CXFlk3Oq+o4kAeyPvGzwnnp1r2UAcKA0cUNDmqS9LXw5TFDO5+ufkfTOJjj
xkO06PQiU/4OGgzmFdV5loE9jHQjs5DgSZXxmjIVzqgWufU/i9tYeC6ajgwxDY4u
7th+hF9IU17FIy2xsW+qjQ4U77yTL7i6VAoFfQEn8nzcHg4o6Z1lhwe9LdjqEeZv
766QmAnlQUVJxXvVafxjvsjXSmMnlRSBSulxtDaI7LBKq6D0HTfE8A/AqjBAR8Ot
7rleUrjF1/6PIgEs8glIXM9Wg9AJ12zZ+2r/u5RJWwdgPM0IAf6OGoZTOnOVwld6
nt8MsQYfZZOeFqKte6kyfBCDT9kV9ExhMZD40ZzxeDA8pcpSxOB+lRwnZtBkuBtj
UQYw7xNbAXYsSHLVXwADamYfN3EBnHm3+DLWowUY8ITycAlTrT5s7w6CLl4NmQnh
oXhtxaU1BMEbF+UJ/a+eKhhiTYRlJhWCvswphTJG41iB5GW1yzWkBpYylkePh31u
ySM73xJt3TPnpNSeTlFKaB5ThIIsEpjjTrGUiP2y0T5fZKWs6PI=
=Uwb0
-----END PGP SIGNATURE-----

duc...@disroot.org

unread,
Sep 26, 2019, 5:28:31 AM9/26/19
to qubes...@googlegroups.com
799:
> Hello
>
> <duc...@disroot.org> schrieb am So., 22. Sep. 2019, 13:40:
>
>>
>> In the official documentation "Copying from (and to) dom0", there is no
>> mention at all of how to copy text via the clipboard from a domain to
>> dom0. What is the method to use?
>
>
> Copying from dom0 to an AppVM is ok, as dom0 has to be trusted.

But how is this done? Like I say, the official documentation references
a **Qubes Clipboard** widget, but I can't seem to locate it in practice.
Sorry if I'm overlooking something very simple.


signature.asc

unman

unread,
Sep 26, 2019, 5:33:37 AM9/26/19
to qubes...@googlegroups.com
Look in panel - there should be qui-clipboard widget. (icon in KDE is
usual "copy" icon.)
Click and there is option to "Copy dom0 clipboard"

If you don't see it check that qui-clipboard is running in dom0

duc...@disroot.org

unread,
Sep 26, 2019, 5:52:56 AM9/26/19
to qubes...@googlegroups.com
unman:
I've just booted Qubes and for the _first time ever_ I have a clipboard
icon sitting between the drive widget and the network widget. I know for
a fact this wasn't present on any other boot occasion... Spooky isn't
the word for it.

Murphy's Law: A problem will be reproducible up until the point you
attempt to demonstrate it to, or elicit help from, support personnel.

But it's there now. Hopefully it'll be there on every subsequent boot.

Thanks.

signature.asc
Reply all
Reply to author
Forward
0 new messages