0

So I have a terminal with cmus running on my main PC at my desk.

I want to ssh to this main PC from my laptop and "take control" of cmus remotely, so that i can adjust volume, pause and play, choose the song, etc.

Note: I don't want to stream music via ssh. I just want to take control of an existing cmus session via ssh.

both machines are running linux mint.

My question is different to other questions already asked because I want to take control of an existing cmus process, rather than spawning a new one.

  • And the simplest way to avoid having to "take control" is to use screen or tmux, start cmus inside a session, and then attach to the session when you ssh in. – dirkt Sep 26 '20 at 13:33
  • @dirkt I have been searching long and hard, as well as experimenting and playing around in my terminals, but I can't work out how to do this. Can you link me to something which explains how to "attach to an existing screen session over ssh?" – TheIronKnuckle Sep 27 '20 at 12:42

1 Answers1

2

On your main PC:

$ tmux

(Tmux window opens)

$ cmus

From your laptop:

$ ssh main-pc
$ tmux ls
$ tmux attach

First commands shows you the sessions, second command attaches (as there is only one session).

dirkt
  • 32,309
  • thanks so much for this. I ended up working out how to do the equivalent using GNU screen, but couldn't have found the solution without your help! – TheIronKnuckle Sep 27 '20 at 15:50