You are not logged in.
Pages: 1
Hi,
I'm trying to bind acpi handler cd/next , prev, play to regulate Spotify through DBus, but its exit with status code 1.
So part of my handler.sh, it matches cd/next since SPOTIFY NEXT is logged
cd/next)
logger "SPOTIFY NEXT"
su thall -c /home/thall/scripts/spotify_next.sh
;;and spotify_next.sh
#!/bin/sh
dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.NextBut if i change to root and try it there it works as expected.
sudo su
[root@archmbp thall]# su thall -c /home/thall/scripts/spotify_next.sh
method return sender=:1.2 -> dest=:1.5 reply_serial=2Cant understand whats wrong
Offline
If this is in X, how do you start X? Do you have a dbus session running for your user (dbus-launch in htop or system monitors)?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
If this is in X, how do you start X? Do you have a dbus session running for your user (dbus-launch in htop or system monitors)?
When I login, through .bash_profile
#Start X11 on login
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
exec startx
fiand there is a dbus session for the user thall.
[~]$ ps aux | grep dbus-launch
thall 2206 0.0 0.0 20112 584 ? S 17:09 0:00 dbus-launch --autolaunch 5508d1549453ab7c3b40aae7000002c8 --binary-syntax --close-stderr
root 5549 0.0 0.0 20112 584 pts/2 S 17:14 0:00 dbus-launch --autolaunch 5508d1549453ab7c3b40aae7000002c8 --binary-syntax --close-stderrOffline
I had the same problem and I fixed it adding DISPLAY=:0.0 (http://forums.gentoo.org/viewtopic-t-92 … art-0.html)
You can change your handler.sh to
DISPLAY=:0.0 su -c "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next" thall
Offline
Pages: 1