How do I login to abp on Linux? abp version 3.0.6
abp login [04:00:34 INF] Opening your browser to login... [04:00:37 ERR] Failed to open the login browser on Linux. Tried: gio open, xdg-open. gio: gio: https://account.abp.io/connect/authorize?response_type=code&state=G_vqeSE4BUAkbl3ivYrMEg&code_challenge=rR2HLVdQ7xmU9fvhL55U07MRhPrdMIN2bG6dK5TeKCg&code_challenge_method=S256&client_id=abp-cli&scope=abpio%20offline_access&redirect_uri=http%3A%2F%2F127.0.0.1%3A6556%2Fsignin-oidc&firstRegistration=False&prompt=select_account: Operation not supported | xdg-open: /usr/bin/xdg-open: 882: www-browser: not found /usr/bin/xdg-open: 882: links2: not found /usr/bin/xdg-open: 882: elinks: not found /usr/bin/xdg-open: 882: links: not found /usr/bin/xdg-open: 882: lynx: not found /usr/bin/xdg-open: 882: w3m: not found xdg-open: no method available for opening 'https://account.abp.io/connect/authorize?response_type=code&state=G_vqeSE4BUAkbl3ivYrMEg&code_challenge=rR2HLVdQ7xmU9fvhL55U07MRhPrdMIN2bG6dK5TeKCg&code_challenge_method=S256&client_id=abp-cli&scope=abpio%20offline_access&redirect_uri=http%3A%2F%2F127.0.0.1%3A6556%2Fsignin-oidc&firstRegistration=False&prompt=select_account'
2 Answer(s)
-
0
- On a remote/headless Linux machine,
abp loginfails because ABP CLI tries to open a local browser usinggio open/xdg-open, and there is no GUI/browser available. - Use the device login flow instead:
abp login --deviceThis prints a verification URL and a code in the terminal. Open the URL on your local computer (with a browser), enter the code, complete the sign-in, then return to the terminal session; the CLI will finish login.
If you do want the “open browser automatically” behavior on Linux, install/configure a desktop environment + a browser and ensure
xdg-opencan find one (your error showswww-browser,links,lynx, etc. are missing). But for servers,--deviceis the recommended approach.If you want to verify connectivity from the server, ensure this endpoint is reachable:
curl -I https://account.abp.io/.well-known/openid-configurationLess obvious sources:
- https://abp.io/docs/latest/cli/
- https://account.abp.io/.well-known/openid-configuration
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) - On a remote/headless Linux machine,
-
0
Hi,
The default
abp loginuses the OIDC authorization code flow, which tries to open a browser on the local machine. On a headless Linux server there is no browser to open, sogio open/xdg-openfail.Use the device code flow instead:
abp login --deviceYou will see something like:
[INF] Open your browser, go to: "https://account.abp.io/connect/verify" [INF] and enter the following one-time code: [INF] 4071-9666-6235Open the URL on any device with a browser (e.g. your laptop), enter the code, sign in, and the CLI on the Linux box will pick up the login automatically.
Thanks
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)