Skip to content

Instantly share code, notes, and snippets.

@BonfaceKilz
Last active January 24, 2017 20:01
Show Gist options
  • Save BonfaceKilz/12de34f24de6e73657a3e6d2240489bf to your computer and use it in GitHub Desktop.
Save BonfaceKilz/12de34f24de6e73657a3e6d2240489bf to your computer and use it in GitHub Desktop.
Setting up SD card and installing a simple desktop environment for raspberryPi
# See what devices are currently mounted
df -h 
# or alternatively
lsblk

# Unmount the SD card
umount /dev/sdXX

# Writing image to SD card
# If 4M does not work, use 1M
dd bs=4M if=path/to/img of=/dev/sdX

# Ensure write cache is flushed and that
# it is safe to unmount your SD card
sync
# Works for RasPi3 which has a built in 
# wi-fi module

# Scan WiFi networks
sudo iwlist wlan0 scan

# Adding network details
# Use a texteditor of your choice to do this
sudo cat >> /etc/wpa_supplicant/wpa_supplicant.conf << "EOF"
> network ={
> ssid="The_ESSID_from_earlier"
> psk="Your_wifi_password"
> }
> EOF

# Restart the inteface
sudo ifdown wlan0
sudo ifup wlan0
sudo reboot

# Check if you are connected
ifconfig wlan0
# Initial config
sudo raspi-config

# Ensure you have the latest files 
# and packages and the clean 'em
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get clean

# Properly set up your language, 
# keyboard layout, and regional settings
sudo raspi-config
sudo reboot

# Setting up the desktop environments
sudo apt-get install --no-install-recommends xserver-xorg
sudo apt-get install --no-install-recommends xinit

# You can download one of these:
sudo apt-get install raspberrypi-ui-mods            # PIXEL GUI
sudo apt-get install lxde-core lxappearance         # LXDE
sudo apt-get install xfce4 xfce4-terminal           # xfce
sudo apt-get install mate-desktop-environment-core  # MATE GUI

# Installing a decent login manager
sudo apt-get install lightdm

# If not login manager was installed,
# you can login by:
startx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment