Just a thought: restart command?

Would it not be nice to have a shellscript as standard to restart the mediacenter. Ie to be able to type, say “restart” instead of “sudo systemctl restart mediacenter”?

You could easily add an alias to your .bashrc to do this, use the existing aliases already there as an example.

Yes, but would not an upgrade overwrite that?

There is no point in providing this for the masses. Most users will likely never need the command. Updates likely won’t affect your aliases.

No – we don’t overwrite user changes such as these


Ah, great!

This will also confuse people: they might expect it to reboot their device.

yes. Best not use anything that might already exist, such as “restart” or “reboot”. what about “rsmc” (Restart media center). I agree that it should not strictly be needed, nor would the external reset switch that I put in, but from the looks of it, i am not the only one that sees the occasional hang. :slight_smile:

  • 1
    I must do it sometime, the terminal history works not every time and i don’t remember the command always
    but perhaps
    “restart mc”


1 Like

I wonder if it’s a good idea to put a small cheatsheet and print it to the session when the user logs in.


That would not be such a bad idea. Like the blirb when you ssh into a vmware host :slight_smile: Pls, make it brief.

plus 1

Whats wrong with picking up your remote, move cursor to shutdown and choose restart, in Kodi?
No idea why I would ever need anything else?

because when I need ssh to execute the command restart KODI was freeze

Let’s work on the freezing issues, as that shouldn’t really be happening.

The idea of improving SSH to have some handy commands printed is also good too, so I will do that in the future. I think it would be good to continue the discussion and make a shortlist of what should be included.


Okie doke, some suggestions then:

  1. restart kodi sudo systemctl restart mediacenter
  2. reboot system sudo reboot
  3. power off system sudo poweroff
  4. clean library _curl --data-binary ‘{ “jsonrpc”: “2.0”, “method”:“VideoLibrary.Clean”, “id”: “mybash”}’ -H ‘content-type:application/json;’ http://localhost:8080/jsonrpc_ - with help text explaining web interface needs to be on and how to insert username and password
  5. update library _curl --data-binary ‘{ “jsonrpc”: “2.0”, “method”:“VideoLibrary.Scan”, “id”: “mybash”}’ -H ‘content-type:application/json;’ http://localhost:8080/jsonrpc_ - with help text explaining web interface needs to be on and how to insert username and password
  6. see cpu load/heavy processes top
  7. update package index sudo apt-get update
  8. search for package apt-cache search
  9. install package dufo apt-get install
  10. see disk usage df -h or df -h / for root disk
  11. see network device config ifconfig -a
  12. see kernel messages dmesg

Looks good, but preferably short aliases :slight_smile: What about a command to scan a path for new media?

Depends on the path being in Kodi already

I think point 5 covers what you were asking for, or, do you have something else in mind, Anders? Scan an individual path and not all configured videos sources?

If the latter, I think that might be a bit too obscure for this type cheatsheet :slight_smile:

In other news, I am not a fan of short aliases for new users who would struggle to find or understand the commands we’re talking about here. The aliases themselves then become hard to remember, and, the user will learn the aliases rather than typing in these commands and starting to understand things bit by bit.

Just an opinion of course… I work with a system heavily built around complex and obscure proprietary commands. so I might be biased :wink:

This +100