Code Monkey home page Code Monkey logo

raspbian-recipes's Introduction

Raspian Recipes

This repo contains various scripts to configure for Raspberry Pi. They can also be used with other Linux distributions by making slight changes.

If you want to make your raspberry pi a router or something than you won't have to spent days to make it work. You just have to grab right recipe and put it in correct place and install few basic packages.

How to use them

First, install dnsmasq because it the backbone of most of the recipes.

sudo apt-get update && sudo apt-get install dnsmasq

List of all recipes with descriptions:

Download a recipe to pi user's home directory. For example:

curl -O https://raw.githubusercontent.com/arpitjindal97/raspbian-recipes/master/wifi-to-eth-route.sh

Make the file executable:

sudo chmod 755 wifi-to-eth-route.sh

If using LXDE desktop, edit /home/pi/.config/lxsession/LXDE-pi/autostart:

nano /home/pi/.config/lxsession/LXDE-pi/autostart

And add the last line to start the script automatically after reboot:

@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi
@xscreensaver -no-splash
@point-rpi
sudo bash /home/pi/wifi-to-eth-route.sh

Without desktop (lite version), edit /etc/rc.local with root privilege:

sudo nano /etc/rc.local

And add the following before exit 0 to start script automatically after reboot:

bash /home/pi/wifi-to-eth-route.sh

Be sure to give full path to the file.
That's it! Reboot to see the changes.

sudo reboot

There are few things which can't be automated and has to be done manually. Below are some tips to help you get stuff done.

Tips

Blocking Ads

If the script which you are using ahs dnsmasq section, there you will server property. This property is set to Adguard DNS server i.e. 176.103.130.130. So, by default your content will come out as Ads free. You can change to any other DNS server also according to you needs.

Enable SSH

When you have written the Image file on to the SD Card. Mount the boot partition and create a file named ssh. Eject the card. Start the Raspberry Pi. You will be able to have SSH connection to it. After boot the /boot/ssh file gets deleted automatically. So, type this to start ssh service on every boot.

sudo systemctl enable ssh

WiFi Connection

Connect to RPi through SSH by providing it Ethernet. If you don't any Lan cable lying around than plug the SD card into PC. Mount the second partition of the SD Card.

WiFi connections are stored at /etc/wpa_supplicant/wpa_supplicant.conf. Edit this file with root privilege:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

It should look like this after filling network details:

country=GB
ctrl_interface=/var/run/wpa_supplicant
update_config=1
network={
    ssid="Home WiFi"
    psk="password_goes_here"
}

Configuration for eap should look like this:

network={
        ssid="SSID_NAME"
        key_mgmt=WPA-EAP
        password="PASSWORD"
        eap=PEAP
        identity="USERNAME"
}

Suggestions and PRs are welcome to make these recipes more useful.

raspbian-recipes's People

Contributors

arpitjindal97 avatar glenpike avatar oefe avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.