# PPT Remote
Control PowerPoint or LibreOffice Impress from your phone over Wi-Fi.
## Server (Windows PC)
Requirements: [Bun](https://bun.sh) installed, PowerPoint open with a presentation.
```bash
cd server
bun install
bun start
```
The server listens on port **8765**. Find your PC's local IP with `ipconfig`.
## Server (Linux)
Requirements: Bun, LibreOffice, python3 (with `uno` module — ships with LibreOffice), xdotool.
```bash
sudo apt install xdotool # or equivalent for your distro
```
Start LibreOffice Impress with the UNO socket listener enabled:
```bash
libreoffice --impress --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager" your-presentation.pptx
```
Then start the server:
```bash
cd server
bun install
bun start
```
Find your machine's local IP with `ip addr` or `hostname -I`.
## Client (Android)
Requirements: Flutter SDK.
```bash
cd ppt_client
flutter pub get
flutter run
```
Enter your PC's local IP and port `8765`, then tap Connect.
To build a release APK:
```bash
flutter build apk --release
# output: build/app/outputs/flutter-apk/app-release.apk
```
## Client (iOS)
Requirements: macOS with Xcode 14+, Flutter SDK, an Apple Developer account (free account works for direct device install via USB).
**1. Install dependencies**
```bash
cd ppt_client
flutter pub get
```
**2. Open the iOS project in Xcode to set up signing**
```bash
open ios/Runner.xcworkspace
```
In Xcode:
- Select the `Runner` target → `Signing & Capabilities`
- Set your Team (Apple ID)
- Change the Bundle Identifier to something unique, e.g. `com.yourname.pptremote`
**3. Allow plain WebSocket (ws://) traffic**
iOS also blocks cleartext HTTP/WS by default. Add an exception in `ios/Runner/Info.plist`:
```xml
NSAppTransportSecurity
NSAllowsArbitraryLoads
```
**4. Run on a connected iPhone/iPad**
```bash
flutter run
```
Or build an IPA for distribution:
```bash
flutter build ipa
# output: build/ios/ipa/ppt_remote.ipa
```
To install the IPA without the App Store, use [AltStore](https://altstore.io) or Apple Configurator 2, or just use `flutter run --release` with the device connected via USB.
> Note: A paid Apple Developer account ($99/year) is required to distribute via TestFlight or the App Store. A free account lets you sideload directly to your own device for 7 days at a time.
## How it works
- Server auto-detects the platform (`process.platform`) and picks the right driver.
- Windows: PowerShell COM automation via `GetActiveObject('PowerPoint.Application')`.
- Linux: navigation via `xdotool` key events, slide state and image export via Python UNO connected to LibreOffice's socket listener on port 2002.
- After each navigation, the current slide is exported as an image and sent as base64 to all connected clients.
## Notes
- PowerPoint must already be open on the PC before connecting.
- The slideshow must be running (or use "Start Show") for next/prev to work.
- Both devices must be on the same Wi-Fi network.
- Windows Firewall may need to allow port 8765.