When logging into Warp Terminal on Linux:
- Username/password succeeds
- Browser opens for authentication
- Final redirect tries to execute via xdg-open
- Instead of returning to Warp, the browser opens again (infinite loop)
Warp uses a custom URL scheme (e.g. warp://). On Linux, xdg-open relies on desktop handlers. If Warp is not correctly registered as the handler for its URL scheme, the browser cannot redirect back to the Warp executable.
- Identify the URL scheme
During the browser redirect, copy the URL. It usually starts with:
warp://
(or similar, e.g. com.warp.dev://)
- Check existing handler
Run:
xdg-mime query default x-scheme-handler/warp
If this returns nothing or an incorrect value, continue.
- Create / fix Warp desktop entry
Create the desktop file:
nano ~/.local/share/applications/warp.desktop
Paste the following (adjust Exec path if needed):
[Desktop Entry]
Name=Warp Terminal
Exec=/usr/bin/warp %u
Type=Application
Terminal=false
MimeType=x-scheme-handler/warp;
Save and exit.
- Register the handler
Run:
update-desktop-database ~/.local/share/applications
xdg-mime default warp.desktop x-scheme-handler/warp
Verify:
xdg-mime query default x-scheme-handler/warp
Expected output: warp.desktop
- Restart Warp and retry login
Completely close Warp. Open it again and retry the login flow.
The browser redirect should now return control to Warp instead of looping.
Manual completion:
- Copy the final redirect URL from the browser
- In Warp, run:
warp open "<PASTED_URL>"
or simply paste the URL into Warp.
Optional CLI login (if supported by your version):
warp login
warp login --sso
warp auth
- Desktop environments may behave differently (GNOME, KDE, Wayland, etc.)
- The Warp executable path may vary (check with: which warp)
- This fix applies to most Linux distributions using xdg-open