I’ve managed to figure out my IP and learned how to SSH in through my network (took an hour since I don’t know anything or what SSH means).
I entered the password and got to a command prompt on a program called PuTTY. Per the tutorial, I’m supposed to change directories. I’ve got the command promp: osmc@osmc:~$ but cannot get past that.
I entered:
cd/etc
cd /etc sudo nano rc.local
cd /etcsudo nano rc.local
but nothing works. It says No such file or directory no matter what I enter.
What am I doing wrong?
-bash: cd/etc: No such file or directory
osmc@osmc:~$
Before you edit rc.local though, you should let us know what you’re trying to do. The need to edit rc.local is not often warranted and as such there may be some better advice.
They say:
Imagine an easier, more convenient way to use your Raspberry Pi media center, simply switching it on and off with a button of your remote, removing the annoyance to unplug power connectors or having to leave it on all the time.
The RemotePi Board is an intelligent infrared remote controlled power switch add-on board specifically designed for the Raspberry Pi 3, it is mainly intended to remote control and power off/on a media center system. i.e LibreElec, OpenELEC, OSMC, XBian, RasPlex, Raspbian, etc. You do not even have to buy an additional remote !
According to their website, here are the instructions:
OSMC (tested with OSMC RC, OSMC Release 20150830)
•Default user name for OSMC is osmc, password osmc
•Key in :
•cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&
•Press ctrl+x to exit the editor, y to confirm, enter to save the file
• Key in
sudo nano irswitch.sh
• Copy and paste the following text into the editor window
#!/bin/bash
this is the GPIO pin receiving the shut-down signal
GPIOpin1=14
echo “$GPIOpin1” > /sys/class/gpio/export
echo “in” > /sys/class/gpio/gpio$GPIOpin1/direction
while true; do
sleep 1
power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
if [ $power != 0 ]; then
sudo initctl stop kodi
echo “out” > /sys/class/gpio/gpio$GPIOpin1/direction
echo “1” > /sys/class/gpio/gpio$GPIOpin1/value
sleep 3
sudo shutdown -h now
fi
done
• Press ctrl+x to exit, y to confirm, enter to save the file
• Key in
sudo chmod +x irswitch.sh
sudo shutdown –r now
•After reboot you can use the RemotePi Board to power cycle OSMC
It didn’t copy correctly:
Default user name for OSMC is osmc, password osmc
• Key in :
• cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&
•Press ctrl+x to exit the editor, y to confirm, enter to save the file
• Key in
sudo nano irswitch.sh
• Copy and paste the following text into the editor window
#!/bin/bash
this is the GPIO pin receiving the shut-down signal
GPIOpin1=14
echo “$GPIOpin1” > /sys/class/gpio/export
echo “in” > /sys/class/gpio/gpio$GPIOpin1/direction
while true; do
sleep 1
power=$(cat /sys/class/gpio/gpio$GPIOpin1/value)
if [ $power != 0 ]; then
sudo initctl stop kodi
echo “out” > /sys/class/gpio/gpio$GPIOpin1/direction
echo “1” > /sys/class/gpio/gpio$GPIOpin1/value
sleep 3
sudo shutdown -h now
fi
done
• Press ctrl+x to exit, y to confirm, enter to save the file
• Key in
sudo chmod +x irswitch.sh
sudo shutdown –r now
•After reboot you can use the RemotePi Board to power cycle OSMC
The space after cd worked to get me to osmc@osmc:/etc$
Thank you.
I’m a bit confused now. do I type in cd /etcsudo nano rc.local It doesn’t do anything. I also tried cd /ect then on the next line typed sudo nano rc.local and it didn’t do anything.
I googled sudo nano and it looks like it’s a program I have to install.
Is this correct?
• Key in :
• cd /etc
sudo nano rc.local
• Copy and paste the following into the nano editor window, just above the last line (before the line exit 0)
(/etc/irswitch.sh)&