Skip to content

davoodya/Syncer

Repository files navigation

SyncerMan

SyncerMan is a powerful, cross-platform synchronization tool designed to bridge the gap between Windows and Linux environments. It enables real-time, bi-directional sharing of clipboard content, text messages, files, and directories over a local network using TCP sockets.

Built with Python, SyncerMan runs efficiently in the background, listening for global hotkeys to trigger instant data transfer without interrupting your workflow.

Clipboard Syncer (Windows ↔ Linux)

A Python-based clipboard sync tool between a Windows PC and a Linux laptop over the same network.

✨ Features

  • Send copied text from Windows (using Ctrl + Alt + C) to Linux:
    • Text gets appended to PCRecieved.txt
    • Also copied last received text into the Linux clipboard.
  • Send clipboard content from Linux (using Ctrl + Shift + V) to Windows:
    • Text gets appended to LinuxReceived.txt
    • Also copied last received text into the Windows clipboard.

🧰 Requirements

Windows (Client)

  • Python 3.x
  • Modules:
    • pyperclip
    • keyboard

Linux (Server)

  • Python 3.x
  • Modules:
    • pyperclip
    • keyboard
  • Note: Linux side Must run with sudo due to keyboard requiring root access permission.

Setup and Run Syncer Man

0. Install Requirements

0.1: Windows

  • Install Python 3.12 on both Windows and Linux.
  • Then, on Windows, open PowerShell as Administrator and run:
python -m pip install pyperclip
python -m pip install keyboard

0.2: Linux

  • Install the following libraries:
sudo pip install pyperclip
sudo pip install keyboard
  • Note: The keyboard package must be installed with root access (sudo).

1. Update IP addresses

  1. In server-linux.py (Linux), set the correct IP address of your Windows PC:
WINDOWS_CLIENT_IP = "192.168.x.x"
  • Note: Use ipconfig on Windows to find your correct IP address.
  1. In client-windows.py (Windows), set the correct IP address of your Linux PC:
SERVER_IP = "192.168.x.x"
  • Note: Use ifconfig (or ip a) on Linux to find your correct IP address.

2. Define Firewall Rules for TCP/65433

2.1: Windows

2.1: Using GUI

To ensure your Linux server can send data to your Windows clipboard sync client, you need to allow incoming connections on a specific TCP port (e.g., 65433) in Windows Firewall.

  1. WIN+R => wf.msc => Inbound Rules => New Rule
    1. Define an Allow rule for TCP port 65433.
  • OR you can use PowerShell.
2.2: Using Powershell:
  1. Open PowerShell as Administrator

    • Press Win + S, search for PowerShell
    • Right-click and choose Run as Administrator
  2. Run the following command:

New-NetFirewallRule -DisplayName "Allow Clipboard Sync" `
                    -Direction Inbound `
                    -LocalPort 65433 `
                    -Protocol TCP `
                    -Action Allow
  1. Verify the rule
    • Open Windows Defender Firewall with Advanced Security
    • Go to Inbound Rules
    • Look for the rule named "Allow Clipboard Sync"
  • 🛠 Notes

    • You can change 65433 to any other port number if needed — just make sure it matches your Python script.
    • Make sure your Windows machine is using a Private or Trusted network profile.
    • No restart is needed; the rule applies immediately.
    • This rule only opens TCP traffic on port 65433.
2.3: Note: To Delete the Rule Later (Optional)

If you want to remove this rule, run:

Remove-NetFirewallRule -DisplayName "Allow Clipboard Sync"

2.4: Linux Debian Based

  • If your Linux system is not using a firewall, you can skip this step.
  • If a firewall is enabled, configure it according to your Linux distribution.
2.4.0: Debian Based
  1. If you are using the ufw firewall, add the following command:
sudo ufw allow 65433/tcp comment 'Allow Clipboard Sync'
  1. If you want to remove the rule after uninstalling the app, use the following command:
sudo ufw delete allow 65433/tcp
2.4.1: RedHat Based
  1. Add the rule using firewall-cmd:
sudo firewall-cmd --permanent --add-port=65433/tcp
sudo firewall-cmd --reload
  1. If you want to remove the rule after uninstalling the app, use the following command:
sudo firewall-cmd --permanent --remove-port=65433/tcp
sudo firewall-cmd --reload
  • By completing this step, your Windows and Linux systems will be ready to receive/send data over the network.

3. Run Script

  1. On Linux, run the server side:
sudo python3 linux-server.py
  1. Then, on Windows, open PowerShell as Administrator and run the client:
python windows-client.py
  • Note: You can change the server and client execution locations. For example, you can run the server on Windows and the client on Linux. The choice is yours.

  • Enjoy Script 😊

About

this tool syncs clipboard, texts, files & directories between my Windows-PC and Linux-Laptop using Hot Keys

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages