# Plex-htpc script control?

**URL:** <https://forums.plex.tv/t/plex-htpc-script-control/891049>\
**Category:** Plex Players\
**Tags:** plex-htpc\
**Created:** [October 1, 2024, 3:14pm UTC](https://forums.plex.tv/t/plex-htpc-script-control/891049 "2024-10-01T15:14:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![taylornelms15](https://avatars.discourse-cdn.com/v4/letter/t/848f3c/32.png) [@taylornelms15](https://forums.plex.tv/u/taylornelms15)\
**Post date:** [October 1, 2024, 3:14pm UTC](https://forums.plex.tv/t/plex-htpc-script-control/891049/1 "2024-10-01T15:14:21Z")

</div>

Hi, I’m new to plex-htpc, and while it looks exactly like what I want out of a media player, I’m trying to get it hooked into my previous PlexMediaPlayer(?)-based set-up.

This is on Ubuntu 24.04, for the record.

Specifically, I’d like to control it through a series of shell scripts that I have hooked up to keyboard shortcuts: one to launch plex-htpc, and one to shut it down if it’s running. (For the latter, I’m potentially able to find the `pid` for the application and send a `kill` command to it, but I figure it would be worth checking if there’s a better way to go about it.)

Is there a way to invoke the `plex-htpc` command such that it shuts down a running instance of the application? Or: are there command-line options for `plex-htpc` at all?

Thanks!

[For clarity, the keyboard shortcuts are hooked up to buttons on my remote, such that “yellow button = start plex”, “green button = start steam”, “blue button = close plex or steam if either is running.” I’m not interested in changing this workflow if I don’t need to.]

Server Version#:  
Player Version#:  
\<If providing [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) please do NOT turn on verbose logging, only [debug logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) should be enabled\>

---

<div class="post-metadata">

**Author:** ![noyzNAbore](https://avatars.discourse-cdn.com/v4/letter/n/e9c0ed/32.png) [@noyzNAbore](https://forums.plex.tv/u/noyzNAbore)\
**Post date:** [October 25, 2024, 6:46pm UTC](https://forums.plex.tv/t/plex-htpc-script-control/891049/2 "2024-10-25T18:46:48Z")

</div>

Look at [Better Touch Tool](https://folivora.ai/).  
Even if you don’t want to use it, you might be able to find the command syntax you’re looking for.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [January 23, 2025, 6:47pm UTC](https://forums.plex.tv/t/plex-htpc-script-control/891049/3 "2025-01-23T18:47:46Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
