INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: [SOLVED] How to Access MC Core Commands in Linux  (Read 1795 times)

afora

  • Recent member
  • *
  • Posts: 29
[SOLVED] How to Access MC Core Commands in Linux
« on: October 08, 2022, 11:55:34 pm »

Could anyone help with pointing out how to invoke those?
https://wiki.jriver.com/index.php/Media_Center_Core_Commands

Im trying to control MC from the command line to setup a remote control properly. They were very handy when I was running the media PC on Windows (with the /MCC argument), but no I cannot find a way to call them in a Debian distro.

Many thanks!
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5240
  • "Linux Merit Badge" Recipient
Re: MC Core Commands are not accessible in Linux
« Reply #1 on: October 09, 2022, 11:53:52 am »

I'm not sure the core commands are implemented on Linux, but you can use MCWS to do automation from the command line and MCWS (to my knowledge) can do anything that the core commands can do.
Logged

afora

  • Recent member
  • *
  • Posts: 29
[SOLVED] Re: MC Core Commands are not accessible in Linux
« Reply #2 on: October 09, 2022, 08:15:38 pm »

Oh, fantastic thanks for the pointer!

To make it work:
- make sure that the MC Web server is running
- control MC from the browser (say, Play==10000):

Code: [Select]
http://localhost:52199/MCWS/v1/Control/MCC?Command=10000
- control MC from terminal (say, Play==10000)

Code: [Select]
curl -s http://localhost:52199/MCWS/v1/Control/MCC?Command=10000 > /dev/null
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13931
Re: [SOLVED] How to Access MC Core Commands in Linux
« Reply #3 on: October 10, 2022, 01:14:35 pm »

You can use the launcher stub too
/usr/lib/jriver/Media Center 29/mc29
Logged

afora

  • Recent member
  • *
  • Posts: 29
Re: [SOLVED] How to Access MC Core Commands in Linux
« Reply #4 on: October 10, 2022, 10:05:04 pm »

Excellent, thank you!

This works, so I can turn off MCWS now:

Code: [Select]
/usr/lib/jriver/MC27/mc27 /mcc 10000

To automate and avoid portability issues with future versions of MC which would presumably change the path to a different MCXX:
  • softlink /usr/lib/jriver/MC27/mc27 to a common immutable directory on the local system
  • on upgrade of MC or OS reinstall to a different version just update the softlink to a different location without changing the softlink filename
  • now linux keyboard bindings involving a fixed filename do not need to be changed

Logged
Pages: [1]   Go Up