diff --git a/library/CLIPBOARD b/library/CLIPBOARD
index 6dfe3bb9..df92fffe 100644
--- a/library/CLIPBOARD
+++ b/library/CLIPBOARD
@@ -1,13 +1,13 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "21-Apr-2024 09:12:04" {WMEDLEY}<library>CLIPBOARD.;18 7248   
+(FILECREATED "25-Sep-2025 15:00:01" 
+{DSK}<Users>kaplan>Local>medley3.5>working-medley>library>CLIPBOARD.;28 8305   
 
       :EDIT-BY rmk
 
-      :CHANGES-TO (FNS INSTALL-CLIPBOARD)
-                  (VARS CLIPBOARDCOMS)
+      :CHANGES-TO (FNS PUTCLIPBOARD CLIPBOARD-COPY-STREAM)
 
-      :PREVIOUS-DATE " 2-Apr-2024 17:02:09" {WMEDLEY}<library>CLIPBOARD.;17)
+      :PREVIOUS-DATE "21-Apr-2024 09:12:04" {WMEDLEY}<library>CLIPBOARD.;18)
 
 
 (PRETTYCOMPRINT CLIPBOARDCOMS)
@@ -58,12 +58,29 @@
            (CONCATCODES (BIND C WHILE (SETQ C (READCCODE s)) COLLECT C])
 
 (PUTCLIPBOARD
-  [LAMBDA (OBJECT PRINTFN)                              (* ; "Edited 23-Feb-2021 11:32 by rmk:")
-                                                            (* ; "Edited 25-Apr-2018 16:49 by rmk:")
-    (CL:WITH-OPEN-STREAM (s (CLIPBOARD-COPY-STREAM))
-           (IF PRINTFN
-               THEN (APPLY* PRINTFN OBJECT s)
-             ELSE (PRIN3 OBJECT s])
+  [LAMBDA (OBJECT PRINTFN)                                   (* ; "Edited 25-Sep-2025 14:59 by rmk")
+                                                            (* ; "Edited 23-Feb-2021 11:32 by rmk:")
+                                                            (* ; "Edited 25-Apr-2018 16:49 by rmk:")
+    (if (STRPOS "darwin" (UNIX-GETENV "OSTYPE"))
+        then 
+             (* ;; "pbpaste doesn't seem to take a file argument.")
+
+             (CL:WITH-OPEN-STREAM (S (CREATE-PROCESS-STREAM "pbcopy"))
+                    (CL:IF PRINTFN
+                        (APPLY* PRINTFN OBJECT S)
+                        (PRIN3 OBJECT S)))
+      else 
+           (* ;; "Try to make xclip more reliable by passing a file that already contains the input.")
+
+           (LET ((TEMPFILE (OUTFILEP "{DSK}/tmp/xclip-copy.txt")))
+                (CL:WITH-OPEN-FILE (S TEMPFILE :DIRECTION :OUTPUT :EXTERNAL-FORMAT (
+                                                                                SYSTEM-EXTERNALFORMAT
+                                                                                    ))
+                       (CL:IF PRINTFN
+                           (APPLY* PRINTFN OBJECT S)
+                           (PRIN3 OBJECT S)))
+                (ShellCommand (CONCAT "xclip -i -selection clipboard " (UNIX-FILE-NAME TEMPFILE)))
+                (DELFILE TEMPFILE])
 
 (PASTEFROMCLIPBOARD
   [LAMBDA NIL                                           (* ; "Edited 15-Feb-2021 23:43 by rmk:")
@@ -81,13 +98,12 @@
            ELSE (BIND C WHILE (SETQ C (GNCCODE STR)) DO (BKSYSCHARCODE C])
 
 (CLIPBOARD-COPY-STREAM
-  [LAMBDA NIL                                                (* ; "Edited  7-Jul-2022 23:51 by rmk")
+  [LAMBDA NIL                                                (* ; "Edited 24-Sep-2025 14:27 by rmk")
+                                                             (* ; "Edited  7-Jul-2022 23:51 by rmk")
                                                             (* ; "Edited 23-Feb-2021 22:11 by rmk:")
-    (LET (STRM (OST (UNIX-GETENV "OSTYPE")))
-         (SETQ STRM (CREATE-PROCESS-STREAM (CL:IF (STRPOS "darwin" OST)
-                                               "pbcopy"
-                                               "xclip -i -selection clipboard")))
-         STRM])
+    (CREATE-PROCESS-STREAM (CL:IF (STRPOS "darwin" (UNIX-GETENV "OSTYPE"))
+                               "pbcopy"
+                               "xclip -i -selection clipboard")])
 
 (CLIPBOARD-PASTE-STREAM
   [LAMBDA NIL                                                (* ; "Edited  7-Jul-2022 23:51 by rmk")
@@ -146,7 +162,7 @@
 (ADDTOVAR LAMA )
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (1148 5429 (INSTALL-CLIPBOARD 1158 . 2485) (GETCLIPBOARD 2487 . 2861) (PUTCLIPBOARD 2863
- . 3268) (PASTEFROMCLIPBOARD 3270 . 4188) (CLIPBOARD-COPY-STREAM 4190 . 4705) (CLIPBOARD-PASTE-STREAM 
-4707 . 5427)) (5430 6969 (SEDIT.COPYTOCLIPBOARD 5440 . 6967)))))
+  (FILEMAP (NIL (1167 6486 (INSTALL-CLIPBOARD 1177 . 2504) (GETCLIPBOARD 2506 . 2880) (PUTCLIPBOARD 2882
+ . 4306) (PASTEFROMCLIPBOARD 4308 . 5226) (CLIPBOARD-COPY-STREAM 5228 . 5762) (CLIPBOARD-PASTE-STREAM 
+5764 . 6484)) (6487 8026 (SEDIT.COPYTOCLIPBOARD 6497 . 8024)))))
 STOP
diff --git a/library/CLIPBOARD.LCOM b/library/CLIPBOARD.LCOM
index f5565a4f..b077be28 100644
Binary files a/library/CLIPBOARD.LCOM and b/library/CLIPBOARD.LCOM differ
