Hello, i just migrated from Arch Linux to Artix Linux(Open RC) and i just put my dotfiles and i have a problem with spotify, i think.
On Arch i had a script on my polybar that would show me the name of the song that is currently playing on Spotify, but on Artix it's not working... Also Spotify doesn't send notifications(i'm using dunst, on Arch it was working perfectly fine).
Here is a little video to show what i'm talking about: https://youtu.be/-aijnrn4oRw
http://0x0.st/iQmE.sh - and this is the script
hi, spotify is not provided by artix linux, but you must build it from AUR. I see, spotify have as depends libsystemd, which can (but must not) make this trouble.
I recommend you rebuild spotify under artix linux again. But not sure if that help, because official client have no opensource licence and it is distribute as binary package, which is only repack.
I will test it too.
I have it installed with yay from aur packages. I've tried this script on Artix with runit aswell and it didn't work either.
i see, we provide the polybar package, you use it (our artix version)?
the polybar is from artix repos, yeah.(sudo pacman -S polybar)
how you use this your script?
[module/spotify1]
;https://github.com/NicholasFeldman/dotfiles/blob/master/polybar/.config/polybar/spotify.sh
type = custom/script
exec = ~/etc/polybar/scripts/spotify1.sh
interval = 0.1
;format = <label>
format-foreground = ${colors.foreground}
format-background = ${colors.background}
format-padding = 2
format-underline = #5BA95A
format-prefix = " "
format-prefix-foreground = #5BA95A
label = %output:0:40%
I have this on my spotify config, when i run spotify, on the polybar(where in the video a get a dbus error or smth) it shows the name of the song curently plaing and the songwritter whenever songs are being played and spotify is open
https://imgur.com/CyXKXbw here is a pic with the script running, as you can see on the bar it show Travis Scott playing Wake Up
[alois@raven test]$ sh aa.sh
Error org.freedesktop.DBus.Error.Disconnected: Connection was disconnected before a reply was received
this is my problem
i found this :
No Players Found
Some players like Spotify require certain DBus environment variables to be set which are normally set within the session manager. If you're not using a session manager or it does not set these variables automatically (like xinit), launch your desktop environment wrapped in a dbus-launch command. For example, in your .xinitrc file, use this to start your WM:
exec dbus-launch --autolaunch=$(cat /var/lib/dbus/machine-id) i3
~ @ cat /var/lib/dbus/machine-id
cat: /var/lib/dbus/machine-id: No such file or directory
Also if i try to start x with that command this happens : https://imgur.com/a/s3Fqu80
(I'm using bspwm now, not i3)
exec dbus-launch --autolaunch=$(cat /var/lib/dbus/machine-id) bspwm
dbus-launch --exit-with-session spotify
i found this on internet and if i run it spotify now sends notifications through dunst, but still is not showing on polybar
EDIT:
dbus-launch --exit-with-session spotify
spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by spotify)
/opt/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /opt/spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
Also i get these errors. But as I said, now spotify sends notifs through dunst.
try just
best in the ~/.xinitrc
as mentioned here https://bbs.archlinux.org/viewtopic.php?id=233164
(I guess dbus doesn't start at the beginning of a user session yet, but i can be wrong)
This works, thanks. Guess i'll have to go back to .xinitrc :(
You might could add it to the config where the polybar is launched, so it may launch it as well.