A Shared Clipboard to Use Between Windows and and Ubuntu
This is an advanced article. There is no "just works" packaged solution with GUI. Please write and release one. |
If you are using a network that has both Linux and Ubuntu machines you might sometimes want to share text quickly between them like an address from the browser, or a snippet of text.
AutoHotKey is a free, open source scripting application that can quickly provide an extension to the normal windows copy/paste behaviour.
Save the following code as an .ahk file, or add the code to your hotkeys if you're already running AutoHotKey.
; ======== Begin AutoHotKey Script ======== ; Put/get clipboard to/from a file accessible by linux and windows. ; Paste ^#v:: FileDelete, M:\Paste\paste FileAppend, %clipboard%, M:\Paste\paste return ; Copy ^#c:: FileRead, Clipboard, M:\Paste\paste return ; ======== End AutoHotKey Script ========
The keypress "Ctrl-WinKey-V" will paste from the windows paste buffer directly to the shared file.
"Ctrl-WinKey-C" will copy from the shared buffer file filling the windows paste/copy buffer with whatever is there, maybe something that has just been added from the Linux machine.
The address to the shared file ("paste") is a Samba share on the Linux machine, but it could just as well be on the windows machine as a share accessible by Ubuntu.
Just open the buffer file in linux as you would a normal text file, or you could automatically fill the Ubuntu clipboard using something like "incron" and "xclip". See this forum thread.