Skip to content

Add companion utility to transfer clipboard contents to/from Xsunaba sandbox X session #8

Description

@morgant

I've had some WIP documentation kicking around re:transferring clipboard contents to/from the Xsunaba X session using xclip(1):

index 1d0a370..d55770a
--- a/README.md
+++ b/README.md
@@ -29,6 +29,7 @@ Limitations due to implementation via `Xephyr`:
 
 ### Optional
 
+* [xclip(1)](https://github.com/astrand/xclip)
 * [sndio(7)](https://man.openbsd.org/sndio)
 
 ## INSTALLATION
@@ -82,6 +83,25 @@ You can then execute `Xsunaba` with your custom sandbox user, for example (repla

XSUNABA_USER=<sandbox_user> Xsunaba firefox --private-window &

+<<<<<<< Updated upstream
+=======
+
+#### Shared Selection and/or Clipboard
+
+If you want to copy the sandbox user's X selection and/or clipboard to your user's selection and/or clipboard, this can be done with `xclip`. After starting an application in your `Xsunaba` sandbox, do the following:
+
+##### Selection
+
+```+doas -u "$XSUNABA_USER" xclip -display "$XSUNABA_DISPLAY" -out | xclip -in
+```
+
+##### Clipboard
+
+```
+doas -u "$XSUNABA_USER" xclip -display "$XSUNABA_DISPLAY" -selection clipboard -out | xclip -selection clipboard -in
+```
+>>>>>>> Stashed changes

#### Shared Files

I'm thinking that it might be preferable to have a companion script/utility to perform such actions. I'd probably want to structure the options/commands/parameters in such a way that its use might later be extended to copying files to/from the sandbox, as well.

I've thought a little bit about the name of such a utility as I want it to be shorter than something like XsunabaClip. One consideration is Xoke, a portmanteau of 'X' and 'oke' (romaji for '桶', which translates to 'bucket' or 'pail', the tool one would use to transfer the contents — sand — to/from a sandbox) I want to do some research to make sure it 'xoke' doesn't mean anything in any other languages.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions