-
-
Notifications
You must be signed in to change notification settings - Fork 48
Login Solution and Scripts
Affinity by Canva's sign-in used to crash the app under Wine. This page is the practical, action-first guide to the fix and its scripts. For the full root-cause trace and credits, see Related Projects: LoginFix.
Install LoginFix, a community AffinityPluginLoader plugin. Short version:
- Install AffinityPluginLoader and WineFix first, if you haven't already.
- Copy
AffinityPluginLoader.dllfrom your Affinity install directory intoGuides/Wine/LoginFix(next toLoginFix.csproj). - Run
dotnet build -c Release. - Copy the built
bin/Release/net48/win-x64/LoginFix.dllintoapl/plugins/, alongsideWineFix.dll. - Relaunch Affinity through
Affinity.exe.
No custom Wine build needed. This works on your distro's stock Wine package. Full explanation of why the crash happened and why the fix works this way: Related Projects: LoginFix.
Source: Guides/Wine/LoginFix. Built with dotnet build -c Release as shown above. This is the actual fix, installed once and left running.
Source: Guides/Wine/LoginFix/inject-login.sh.
Use this only as a fallback, if the browser-to-Affinity handoff itself isn't completing (the OS-level affinity:// protocol handoff never reaching Wine at all, for example on a fresh prefix without a protocol handler registered yet). With LoginFix installed and a working protocol handler, sign-in completes on its own and you should not need this script.
It reads the callback URL with read -s, so the script never echoes the value to the terminal, writes it to disk, or leaves it in shell history.
How to run it manually:
-
Sign in through the browser as normal, up to the point where it's about to open Affinity.
-
Copy the
affinity://callback URL from the browser's address bar (or via "copy link" on the "Open Affinity?" confirmation page), instead of letting the OS open it automatically. -
Run the script, pointing it at the same Wine prefix and Wine binary your install uses:
WINEPREFIX="$HOME/.affinity" WINE_BIN="wine" bash Guides/Wine/LoginFix/inject-login.sh
Both environment variables are optional. They default to
$HOME/.affinityandwine(whatever's on yourPATH) if not set. -
Paste the URL when prompted, and press Enter. The script hands it to Wine with
wine start <url>, the same mechanism the OS-level protocol handler would normally use.
Confirm the plugin actually loaded: check apl/logs/apl.latest.log (set file_logging = true in apl/config/apl.toml first if the log file doesn't exist yet) for LoginFix entries. If it's not there, re-check the build/install steps above, especially that LoginFix.dll landed in apl/plugins/ alongside WineFix.dll.
You pasted something other than the callback URL, or the URL got truncated when copying. Re-copy it directly from the browser's address bar right before the handoff, and make sure it starts with affinity://.
LoginFix and this workflow were built and verified during this project's own troubleshooting sessions. See Related Projects: LoginFix for the full technical writeup and Related Projects: AffinityPluginLoader & WineFix for the plugin framework it depends on.
Start Here
Install Guides
- Wine
- ↳ Uninstalling
- ↳ Wine in Docker 🟨
- Lutris
- ↳ OpenCL
- Heroic
- Bottles
- Rum
- ↳ Installer GUI
⚠️ - Script Installer
Fixes & Tweaks
- Settings Not Saving
- Panels & Dock Layout
- Login Solution and Scripts
- Tips and Tweaks
⚠️ General Known Issues
Related Projects
Reference
Community & Status