AutoRemote Open Bash script on Ubuntu PC from Autoremote Message

Discussion in 'AutoApps' started by krlanguet, Jun 24, 2015.

  1. krlanguet

    krlanguet New Member

    Joined:
    Jun 24, 2015
    Messages:
    3
    Likes Received:
    0
    Hi, I use a sleep tracking alarm that goes off at varying times and I want Tasker to be able to play music from my computer across the room when it goes off.

    I have found a way to trigger tasks when the alarm goes off and I have written a Bash script for starting Spotify for Linux to play a certain song/playlist but I cannot get my phone to activate that script remotely.

    Is it possible to do this with Autoremote?
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    you can do any ssh command with AutoRemote, so I think that should be possible :)
    Check this out.
    Hope this helps :)
     
  3. krlanguet

    krlanguet New Member

    Joined:
    Jun 24, 2015
    Messages:
    3
    Likes Received:
    0
    Thanks for the prompt reply. I've been working on this more today but I have been unable to figure out how to start a remote bash script with ssh commands. Instead I've been trying to run separately the commands I had in the bash script over ssh. I have been able to use ssh commands to open other GUI apps such as firefox and gedit without a problem over AutoRemote :)
    However, sending the same message for spotify:
    DISPLAY=:0 nohup spotify
    opens the attached error window, regardless of whether or not spotify is running.

    I can start spotify and others from the terminal without a problem. I also have been unable to figure out how to execute the dbus command to begin playing a particular song/playlist etc. over ssh:
    qdbus org.mpris.MediaPlayer2.spotify / org.freedesktop.MediaPlayer2.OpenUri spotify:user:_USER_:playlist:_URL_

    If I can run my bash script remotely instead then neither of these issues will matter.
     

    Attached Files:

  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hi again

    Sorry, but that seems to be a spotify issue. I have no idea how to fix that :) If ssh commands are working then it's a matter of finding the right scripts to run, but I'm afraid I can't help in that department :)

    Sorry!
     
  5. krlanguet

    krlanguet New Member

    Joined:
    Jun 24, 2015
    Messages:
    3
    Likes Received:
    0
    That's alright, thanks for clearing things up!
     

Share This Page