Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to execute default browser #84

Open
hakxcore opened this issue Jul 3, 2021 · 3 comments
Open

failed to execute default browser #84

hakxcore opened this issue Jul 3, 2021 · 3 comments
Assignees

Comments

@hakxcore
Copy link

hakxcore commented Jul 3, 2021

Erase is control-H (^H).


/ /_ ____ / /(/ ____ __
__ / __ / __ / / / // / / /
/ / // / // / // / __/ /
/ /
// ./_
/_/// _, /
// //
______ _ __
/
_____ _________ ___ (
)
__ ____ / /
/ / / _ / / __ __ \/ / __ \/ __ / /
/ / / __/ / / / / / / / / / / / /
/ / /
/
/ _
_/
/ // // //// //_,/_/

[marcdjulien]

Loading...

v0.15.2

Running Firefox as root in a regular user's session is not supported. ($XAUTHORITY is /home/user1/.Xauthority which is owned by user1.)

I think it is trying to open default borwser but it is not opening also i have tried to install it in termux there also its not working
cann't we use 'xdg-open' there.

@marcdjulien
Copy link
Owner

marcdjulien commented Jul 20, 2021

Thanks. I will look into this. You can use this patch in the meantime to have the application display the link it's trying to visit:

diff --git a/spotify_terminal/authentication.py b/spotify_terminal/authentication.py
index fa05ded..e8ccf80 100644
--- a/spotify_terminal/authentication.py
+++ b/spotify_terminal/authentication.py
@@ -10,6 +10,7 @@ import urllib.request, urllib.parse, urllib.error
 import webbrowser
 from http.server import BaseHTTPRequestHandler, HTTPServer
 from threading import Thread
+import time

 from . import common

@@ -62,6 +63,13 @@ class Authenticator(object):
             web_thread = Thread(target=start_server)
             web_thread.start()

+            def show_link():
+                time.sleep(5)
+                if web_thread.isAlive():
+                    print("If stuck, visit: {}".format(self._authorize_url()))
+            message_thread = Thread(target=show_link)
+            message_thread.start()
+
             logger.debug("Opening %s in browser", self._authorize_url())
             webbrowser.open_new_tab(self._authorize_url())

You can copy the link and paste it into any browser.

@marcdjulien marcdjulien self-assigned this Jul 20, 2021
@marcdjulien
Copy link
Owner

@hakxcore the patch I mentioned above it now released, so you can upgrade to get the url from the screen and paste it manually.

@marcdjulien
Copy link
Owner

@hakxcore how are you executing the program? Are you using sudo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant