Repositories / jai.git

jai.git

Clone (read-only): git clone http://git.guha-anderson.com/git/jai.git

Branch

a few more examples for the man page

Author
David Mazieres <dm@uun.org>
Date
2026-03-20 23:57:13 -0700
Commit
34110208cf9984946a2ba3c4b0a7936b80347e9e
jai.1.md
index e3873f0..378170a 100644
--- a/jai.1.md
+++ b/jai.1.md
@@ -148,6 +148,24 @@ To make `jai claude` use the claude jail by default:
     command PATH=$HOME/.local/bin:$PATH "$0" "$@"
     EOF
 
+Suppose you want to make your X11 session available in the claude jail
+to facilitate pasting images into claude.  This significantly reduces
+security, so isn't necessarily a good idea, but you can do it by
+extracting your authentication cookies in your current working
+directory and merging them into your claude jail.
+
+    # Extract cookies outside jail, merge them inside jail
+    xauth extract - $DISPLAY | jai -C claude xauth merge -
+    # Copy a screen region you should be able to paste in claude
+    import png:- | xclip -selection clipboard -t image/png
+
+A safer way to do this is to write your screengrabs directly into the
+sandbox's /tmp directory as in:
+
+    import /run/jai/$USER/tmp/claude/scrn.png
+
+Then in claude, just incorporate the image with `@/tmp/scrn.png`.
+
 To use an existing codex or opencode installation in casual mode (less
 safe) and have it update configuration files in your real home
 directory: