I'm trying to control vlc media player over ssh on another machine with a bash script. I'm a newbie with scripts and I'm using two machines, A and B
On machine B I can start a video playing with these commands:
Code:
[user@machine-B ~]$ screen -S vlc
then in the screen....
Code:
[user@machine-B ~]$ vlc -I rc video.ogg
video starts playing and if I type certain commands into machine-B (like play, stop seek etc) I can control the video.
then from machine A I can log in to the screen using remote ssh thus:
Code:
[root@machine-A ~]# sshpass -p <password> ssh -t user@machine-B screen -r vlc
but I need to create a bash script that sends commands into this screen from machine A, commands like stop, play seek etc. I've tried script entries like 'ech0 this-and-that' but it doesn't work. I've also tried xdotool commands but they don't work either. Can a bash script send commands into this screen from machine A? thanks for any help.