mirror of
https://github.com/Rigellute/spotify-tui.git
synced 2026-04-26 08:05:57 +03:00
[GH-ISSUE #182] Under WSL, spt does nothing on invocation #92
Labels
No labels
bug
enhancement
good first issue
help wanted
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-tui#92
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ix on GitHub (Dec 2, 2019).
Original GitHub issue: https://github.com/Rigellute/spotify-tui/issues/182
I have installed spotify-tui both through
cargo install spotify-tuiand by building from git master, in both cases runningsptresults in nothing happening and the program exiting.On the first run I was prompted for my credentials, which I entered. I have tried deleting
~/.config/spotify-tuiand re-authenticating to see if that fixed it, which it did not.Let me know if any further information is needed!
Cargo/Rust versions:
@ix commented on GitHub (Dec 2, 2019):
Some additional information:
After entering the Client ID and Client Secret on the first run or after deleting the config directory, the following message is displayed in the program output
Navigating to this URL leads to the below success page, but the program quits after that and continues its behavior of doing nothing.
@Rigellute commented on GitHub (Dec 2, 2019):
Sorry to hear this @ix, which operating system are you on? I have a suspicion this is related to the new clipboard feature.
If you are on linux, you might now need to install xorg-dev
@ix commented on GitHub (Dec 2, 2019):
Hi there Rigellute, thanks for a timely response.
/etc/lsb-release lists the following;
This is in Windows Subsystem for Linux, with a full
unameofWindows specifications are as follows:

I have tried running the program both in and out of tmux to no avail.
xorg-devis installed, alongside the libxcb* dependencies...xorg-dev is already the newest version (1:7.7+19ubuntu7.1)I am running the program in a headless environment, perhaps that could be related to it as I assume an X server is needed for the X clipboard functionality to work? I will test later with X11 support through Xming if needed.
@Rigellute commented on GitHub (Dec 2, 2019):
Hmm... thanks for this extra information.
If it is not too much bother, would you mind reproducing this in dev mode? i.e. clone the repo and
cargo run?That might give you the error causing the app to exit immediately.
I need to make the error appear in release mode too.
@ix commented on GitHub (Dec 3, 2019):
I've worked it out!
With Xming (a Windows X server) running, invoking
sptlike follows causes it to work fine:env DISPLAY=localhost:0.0 spt(note that I use the "fish" shell and so this is equivalent toDISPLAY=localhost:0.0 spt)Removing the environment variable with a valid X11 display causes the "silent fail" behavior I initially reported to occur. Since you mentioned X support being a requirement for the clipboard functionality, it would perhaps be best to either have the clipboard (and thus dependency on X) toggleable with a flag such as
--no-xor to check the existence of the X display within the code, store it using something likestd::Optionand henceforth operate on it only if existent.I would be more than happy to contribute this change if desirable, but it may take me a week or so to have the time for it.
@ix commented on GitHub (Dec 3, 2019):
Just to add to the above:
xfvb-run sptalso works, by running spt in the context of an in-memory X Server, and is useful when there isn't actually an X server set up to connect to.@Rigellute commented on GitHub (Dec 3, 2019):
Great that you've figured it out! And thanks for the write up.
You are right, we should probably gracefully handle the error when the clipboard can't be set up. This should be easy to implement. Will investigate setting up a flag to toggle the clipboard behaviour.
@Rigellute commented on GitHub (Jan 26, 2020):
This was fixed in #217