How xcletus3/whatsapp-linux-client works
Purpose and Entry Points
This repository packages a lightweight Linux desktop wrapper for WhatsApp Web. It uses Python/PyQt6 rather than Electron, embedding the WhatsApp Web site in a native application window. The executable entry point is expected to be defined by packaging metadata in pyproject.toml, with application startup and UI orchestration in src/whatsapp_linux_client/app.py.
Application Shell
src/whatsapp_linux_client/app.py is the primary architecture boundary: it should create the Qt application, main window, and embedded web view. The package root, src/whatsapp_linux_client/__init__.py, establishes the importable application package. PyQt6 and PyQt6-WebEngine are the material runtime dependencies, declared through pyproject.toml and/or requirements.txt.
Embedded WhatsApp Web Runtime
The application loads WhatsApp Web directly into a Qt WebEngine browser surface rather than implementing messaging APIs itself. Authentication, chat state, message delivery, and media handling fundamentally depend on the external WhatsApp Web service. Persistent login is implemented through locally retained WebEngine/browser profile data rather than credentials managed by this repository.
Browser and Navigation Boundary
The embedded view is intended to retain WhatsApp conversations while routing non-WhatsApp/external links to the user’s default system browser. This creates a clear boundary between the in-app WhatsApp Web origin and arbitrary web navigation, likely enforced from web-view navigation or link-handling logic in src/whatsapp_linux_client/app.py.
Local Integration and Storage
Downloads initiated through WhatsApp Web are directed to ~/Downloads/WhatsApp/, keeping media local to the user account. Session data is also local, enabling QR authentication to persist between launches. Native desktop notifications bridge web message events into the Linux notification service; their window/application integration belongs to the application layer in src/whatsapp_linux_client/app.py.
Linux Desktop Packaging
Desktop launcher integration is supplied by src/whatsapp_linux_client/data/whatsapp-linux-client.desktop, allowing installation into a Linux application menu and defining how the packaged executable is launched. Application icons are distributed under src/whatsapp_linux_client/icons, supporting launcher, window, and notification identity. The project supports wheel/source installation but targets Linux desktop environments, particularly Debian/XFCE-style systems.
Operational Boundaries
The client does not operate a backend, proxy, analytics pipeline, or proprietary WhatsApp integration. Its critical external dependencies are the local Linux desktop stack (window manager, notification daemon, default browser, downloads filesystem) and the remotely hosted WhatsApp Web application. WhatsApp Web changes, outages, or unsupported features such as calls directly constrain client behavior.
Main entry points: app.py Application shell · pyproject.toml Packaging metadata · whatsapp-linux-client.desktop Desktop launcher · requirements.txt Runtime requirements
Components 15
Package & launch
- Packaging metadata · Defines the executable entry point and runtime dependencies.
pyproject.toml - Runtime requirements
requirements.txt - Application package
src/whatsapp_linux_client/__init__.py - Desktop launcher
src/whatsapp_linux_client/data/whatsapp-linux-client.desktop - Application icons · Used for launcher, window, and notification identity.
src/whatsapp_linux_client/icons
Native client
- Application shell · Creates the Qt application, main window, and web view.
src/whatsapp_linux_client/app.py - Qt WebEngine runtime · Native windowing and embedded browser runtime.
- Embedded WhatsApp view
src/whatsapp_linux_client/app.py - Navigation policy · Keeps WhatsApp in-app and delegates external links.
src/whatsapp_linux_client/app.py
Local desktop integration
- Persistent browser profile · Retains WhatsApp Web login and browser state between launches.
- WhatsApp downloads · Media downloads are directed to ~/Downloads/WhatsApp/.
- Linux notifications · Surfaces web message events through the desktop notification service.
src/whatsapp_linux_client/app.py - Default system browser
External services
- WhatsApp Web · Provides authentication, chats, messages, and media handling.
- Linux desktop stack · Supplies native windows, notifications, browser integration, and filesystem access.
Connections 16
- Packaging metadata → Application shell: declares entry point
- Runtime requirements → Qt WebEngine runtime: declares
- Application package → Application shell: contains
- Desktop launcher → Packaging metadata: launches packaged executable
- Application icons → Desktop launcher: supplies icon
- Application shell → Qt WebEngine runtime: initializes
- Qt WebEngine runtime → Embedded WhatsApp view: hosts
- Application shell → Navigation policy: enforces
- Embedded WhatsApp view → WhatsApp Web: loads
- Embedded WhatsApp view → Persistent browser profile: persists session
- Embedded WhatsApp view → WhatsApp downloads: writes media
- Navigation policy → Default system browser: opens external links
- Application shell → Linux notifications: bridges message events
- Application shell → Linux desktop stack: uses native desktop services
- Linux notifications → Linux desktop stack: delivers through
- Default system browser → Linux desktop stack: provided by