-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, Nov 23, 2016 at 05:20:36PM -0500, Jean-Philippe Ouellet wrote:
> Copying text from dom0 to the qubes clipboard is not currently easy,
> but this appears only due to implementation details instead of a
> conscious design decision. Pasting things *into* dom0 is obviously
> potentially dangerous, and I argue that having no easy mechanism to do
> so is a good thing. However I see nothing dangerous with the other
> direction (dom0 -> domU).
> 
> The ability to do so would (among other things) ease the reporting of
> errors, e.g. https://github.com/QubesOS/qubes-issues/issues/2438
> 
> Currently the Ctrl+Shift+{C,V} shotcuts are implemented in the dom0 X
> side of gui-daemon. There is an instance of the gui-daemon process for
> each VM, and each separately listens for the Ctrl+Shift+{C,V}
> shortcuts when they are in focus. Adding a global keyboard shortcut to
> copy from dom0 X clipboard to qubes clipboard would catch all
> Ctrl+Shift+C keypresses, breaking copy from VMs (as gui-daemon would
> never see the keypress).
> 
> Having a single global catcher of the keyboard shortcut would allow us to:
> - if a gui-daemon has focus: notify that gui-daemon to perform copying
> - if no gui-daemon has focus (some dom0 window does): copy dom0
> clipboard to qubes clipboard
> 
> I would like feedback on:
> 1) Is dom0->other copying (not the other direction) something we even want?

Yes. Of course with explicit user consent.

> 2) The best way to detect which (if any) gui-daemon has focus?
> 3) The best way to tell the gui-daemon process to perform copying?

Those two things may be tricky in practice, to not introduce any race
condition...

> My thoughts:
> 1) seems useful and in no way dangerous to me
> 2) perhaps checking _QUBES_VMNAME of root window's _NET_ACTIVE_WINDOW?
> (note that this may produce incorrect results in case of windows not
> decorated with full title bar (e.g. some pop-ups, drop-downs,
> nm-applet, etc.) There's gotta be a better way...

_QUBES_VMNAME of window pointed by XGetInputFocus()?

> 3) SIGUSR1? dbus? some X thing?

Maybe inject the key back to that window? Like XSendEvent or so.

Another idea: have some window "paste here to send to inter-VM clipboard".
(Much) Less convenient, but easier to implement (including smaller risk of some
race condition, or another not obvious interaction with other
applications). This can be made available from some tray icon (the one
of qubes manager?).

- -- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJYNh3lAAoJENuP0xzK19csL2EH/jQLueCDnAdrN1ME3gfilxEA
tO4AHOZYsRp9zQRofxPF4Mb/Vih/SZtr1qLXh4iiR0h24uX89gMpMZLCjcSUpEXW
AjkzSnamUES+XHzVAeTMCAbEMPcQNN1AAbs6YyP3m6iRqx+4EFNqTZRMe/acwdnK
2aswxAEIygK6JQUdIGC74FwojH+oxuvlCYlyDgSkjYv69BMJiRUNWhKGL8klVB8h
UwsVt0pcaUiNwfy2yzPlk34vYzqhY5Pd6/lYXWY0nI1GkMvsnKEhDFrRqVo/B3uC
d8fx6BG4SjOWW8YYIEkz6+YNsb0cuP6Jr3ome2FoQTcA+4TvwKKEvPdt8XpZZv8=
=XJ6o
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"qubes-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/qubes-devel/20161123225324.GM1145%40mail-itl.
For more options, visit https://groups.google.com/d/optout.

Reply via email to