Sharing Clipboard between Windows and Ubuntu (Linux) Using PythonSummary
This python program will allow the sharing of clipboard (cut/paste) between 2 work station running Windows and Linux.Overview
At work, I use Windows for most of the daily work, email, Lync, Skype, word processing, Excel etc. I use a Linux box for compiling Android OS images. Often, there is a need to cut/paste contents between these 2 work stations.
Searched the internet, but could not find a very good way to do the job efficiently. So I wrote this Python script clip.py (Click to download).How to Use the Script
All commands are executed in console windows. Once installed, there are 3 command options:
clip.py /s -- Send clip board contents to the remote computer clip.py /r -- Read the contents just sent by the remote computer and place on the local clipboard clip.py /d -- Daemon mode. Once running, the remote and local clipboards are automatically synchronized.
|Install cygwin . Make sure you can run|
$ sudo apt-get install xclip
|ssh client. Make sure you can access |
Edit your %userprofile%\.ssh\config file and add the ssh server
Get IP address:
Make sure you can connect to the Ubuntu machine:
> ssh Unix_ssh_name
|copy clip.py into a folder that is in the Windows exe search path, for example, c:\apps\cygwin\bin||
into a searchable folder, for example,|
$ chmod 755 clip.py
|C:\temp folder is needed to place temporary files||Temp files are placed in /home/user|
Program source code: clip.py
- When you run for the first time on PC, you need to enter Unix_UserName@Unix_ssh_name
- The settigns are saved in .ssh/remote_clipsvr.txt. If you want to change server later on, delete file and run clip.py /s
- On Unix side, highlight text to select, then run clip.py /s to send. To paste, use middle-button click.