OSMC

From Indie IT Wiki
Jump to: navigation, search

OSMC stands for Open Source Media Centre and is made available under a GPL2 license.

OSMC Forum

Downloads mirror.

INFO:

Default User & Password

Both are osmc

SSH

Is installed and enabled and uses port 22.

HOWTO: ADD:

New User

osmc@osmc:~$ sudo adduser <username>

This should generate the following, enter required data at the prompts:

Adding user `<username>' ...
Adding new group `<username>' (1001) ...
Adding new user `<username>' (1001) with group `<username>' ...
Creating home directory `/home/<username>' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for <username>
Enter the new value, or press ENTER for the default
     Full Name []: User Name
     Room Number []: 
     Home Phone []: 
     Other []: 
Is the information correct? [Y/n] Y

User To The Sudoers Group

sudo usermod -aG sudo <username>

HOWTO: DISABLE:

Message Of The Day (MOTD)

touch ~/.hushlogin

NOTE: If you have enabled the display of the last log in; the above will override and disable the option.

HOWTO: ENABLE

Display Of Last Login

sudo nano /etc/ssh/sshd_config

PrintLastLog no # alter this read the same as the line below
PrintLastLog yes

NOTE: If you have disabled 'Message Of The Day' the above will have no effect. If you do want to see the last log in but not the MOTD then edit the following file, either deleting its content or adding your own:

sudo nano /etc/motd

HOWTO: INSTALL:

Bits and Pieces

sudo apt install bash-completion usbutils screen usbutils

CPU Scaling

sudo nano /boot/config.txt

# Badly named option, means 'enable frequency scaling':
force_turbo=0
# The lowest frequency we will allow the RPi to run at:
arm_freq_min=100
# for more options see http://elinux.org/RPi_config.txt

Save changes (CTRL+o) then exit (CTRL+x).

sudo reboot

sudo aptitude -y -v install cpufrequtils

cpufreq-info # See the status of the CPU

analyzing CPU 0:
driver: BCM2835 CPUFreq
CPUs which run at the same hardware frequency: 0 1 2 3
CPUs which need to have their frequency coordinated by software: 0 1 2 3
maximum transition latency: 355 us.
hardware limits: 100.0 MHz - 900 MHz
available frequency steps: 100.0 MHz, 900 MHz

sudo cpufreq-set -g ondemand # Sets how scaling occurs

Thanks to Stocksy.co.uk, plus on this page is information on setting up a 3G dongle.

Syncthing

NOTE: The following tutorial uses <username> replace this with your choice of username, in the case of a default OSMC install the user is 'osmc' (no quotations).

Basic Installation:

curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
echo deb http://apt.syncthing.net/ syncthing release | sudo tee /etc/apt/sources.list.d/syncthing-release.list
sudo apt-get update && sudo apt-get install syncthing

Create the systemd service file and add the following text:

sudo nano /etc/systemd/system/syncthing\@.service

[Unit]
Description=Syncthing for %i

[Service]
Type=simple
User=%i
ExecStart=/usr/local/bin/syncthing
WorkingDirectory=%h

[Install]
WantedBy=multi-user.target

Save (CTRL+o) and exit (CTRL+x).

Syncthing now has to be started in order to generate a config file:

sudo systemctl start syncthing@<username>

Edit the generated config file and add the following text to allow access to the server remotely:

sudo /home/<username>/.config/syncthing/config.xml

<gui enabled="true" tls="false">
   <address>0.0.0.0:8080</address>


More to do

Thanks to OSMC. http://nixx.co/install-syncthing-on-centos-7/

Crackler

OSMC GUI - Main menu - Videos - Video add-ons - Get more... Is where I installed Crackler from

HOWTO: MODIFY:

Command Line Aliases

nano ~/.bash_aliases

Add the following lines:

alias grep='grep --color=auto'
alias update='sudo aptitude update && sudo aptitude safe-upgrade'
alias upgrade='sudo aptitude update && sudo aptitude dist-upgrade'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -lah'
alias ls='ls --color=auto'
alias ping='ping -w3'
alias pingg='ping www.google.co.uk'
alias pingp='ping www.paully.co.uk'
alias rm='rm -iv'
alias search='sudo aptitude search'

Save changes (CTRL+o) then exit (CTRL+x).

Reload the file:

. ./.bash_aliases

Confirm alterations:

alias