Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Wednesday, July 8, 2015

Launch Python script at boot

Sometimes we could need to start a Python script when Raspberry Pi boots up in a full autonomous way.

RPi could be really useful if used headless, without a direct user interaction (at least when starting the system), so if we created a script for a RPi that needs to be executed at startup, we also need a way to accomplish this task.

In this post I will describe a way to execute a Python script (but this works also for every other kind of software) when booting the RPi.

Thursday, November 6, 2014

Sending SSH commands

SSH is really useful to manage unix devices from a remote place. You can be away from the console, or even do not have any console at all and still be able to enter a unix session.

Of course SSH must be enabled in the host device so that it can accept the connections, but at least in the last Debian distro for RPi this is a default.

Personally I use RPi almost always by SSH. Just at first startup of a Debian installation I can use a console for some network configuration.

As You may have seen in the starting up post, I can also avoid the console for model B or B+, as SSH is already enabled and I can retrieve RPi address looking at my router logs.

Anyway SSH could be really useful also when used to send commands without a interactive session.

Monday, November 3, 2014

Shutdown XBMC (and TV) using command line

Today I will show You how to turn off your TV and XBMC using just command line.
You could ask why someone may wish to use command line for this task that can be easily performed with remotes.

Well, this will be quite useful if You wish to turn XBMC off from another computer using an SSH connection.

I have RaspBMC installed on one Raspberry (model B) and on another one (model A) I'm trying to make some automation. Just by sending a Whatsapp message I'm able to suhtdown RaspBMC and turn off my TV.
This is just a part of the automation involving my home theatre that (maybe one day...) will include much more.