I’d like to use the box.com cli from a linux server without X installed. However, during “$ box login -n me@mydomain”, boxcli tries to popup a web page with the message
Opening browser for OAuth authentication. Please click Grant access to Box to continue.
I’ve tried exporting BROWSER=lynx , and have tested that “xdg-open http://eff.org” works; but I am not seeing lynx open while running “box login”. Do I need a 2nd terminal window, and then set DISPLAY so the “popup” browser opens lynx there?
Wondering if anyone has managed to setup box.com CLI on a headless, X-less server.
https://github.com/box/boxcli/blob/main/docs/login.md
From the code linked there you can use
-c
and interface with a script to get your credentials. The linked also suggests there is a way to set a preauth key so you don’t have to do this.