| Line 1: |
Line 1: |
| − | == Enable ssh on first boot == | + | ==Enable ssh on first boot== |
| | On the boot partition create a file called ssh | | On the boot partition create a file called ssh |
| | <br /> | | <br /> |
| Line 30: |
Line 30: |
| | 1. Scan wifi networks available: | | 1. Scan wifi networks available: |
| | <nowiki>sudo iwlist wlan0 scan</nowiki> | | <nowiki>sudo iwlist wlan0 scan</nowiki> |
| − | 2. Write down the ESSID (wifi network name) and IE (authentication used)<br /> | + | 2. Write down the ESSID (wifi network name) and IE (authentication used)<br />3. Edit /etc/wpa_supplicant/wpa_supplicant.conf, add the following at the bottom of the file. |
| − | 3. Edit /etc/wpa_supplicant/wpa_supplicant.conf, add the following at the bottom of the file. | + | <br /><syntaxhighlight lang="text"> |
| − | <nowiki>
| + | country=ES |
| − | network={
| + | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev |
| − | ssid="The_ESSID_from_earlier"
| + | update_config=1 |
| − | psk="Your_wifi_password"
| + | network={ |
| − | }</nowiki>
| + | ssid="MyWiFiNetwork" |
| | + | psk="MyWiFiPassword" |
| | + | key_mgmt=WPA-PSK |
| | + | } |
| | + | </syntaxhighlight> |
| | + | network={ |
| | + | ssid="The_ESSID_from_earlier" |
| | + | psk="Your_wifi_password" |
| | + | } |
| | 4. If after a few seconds the Raspberry WiFi isn't connected: | | 4. If after a few seconds the Raspberry WiFi isn't connected: |
| | <nowiki> | | <nowiki> |
| − | sudo ifdown wlan0
| + | sudo ifdown wlan0 |
| − | sudo ifup wlan0 </nowiki>
| + | sudo ifup wlan0 </nowiki> |
| | | | |
| | ===WPA2 + hidden SSID=== | | ===WPA2 + hidden SSID=== |
| Line 46: |
Line 54: |
| | Edit /etc/network/interfaces | | Edit /etc/network/interfaces |
| | <nowiki> | | <nowiki> |
| − | # /etc/network/interfaces
| + | # /etc/network/interfaces |
| − | allow-hotplug wlan0
| + | allow-hotplug wlan0 |
| − | auto wlan0
| + | auto wlan0 |
| − | iface wlan0 inet dhcp
| + | iface wlan0 inet dhcp |
| − | wpa-ap-scan 1
| + | wpa-ap-scan 1 |
| − | wpa-scan-ssid 1
| + | wpa-scan-ssid 1 |
| − | wpa-ssid "SSID"
| + | wpa-ssid "SSID" |
| − | wpa-proto RSN
| + | wpa-proto RSN |
| − | wpa-pairwise CCMP
| + | wpa-pairwise CCMP |
| − | wpa-key-mgmt WPA-PSK
| + | wpa-key-mgmt WPA-PSK |
| − | wpa-psk "PASS"</nowiki>
| + | wpa-psk "PASS"</nowiki> |
| | | | |
| | ==wpa_suplicant== | | ==wpa_suplicant== |
| Line 62: |
Line 70: |
| | Edit /etc/network/interfaces | | Edit /etc/network/interfaces |
| | <nowiki>auto lo | | <nowiki>auto lo |
| − |
| + | |
| − | iface lo inet loopback
| + | iface lo inet loopback |
| − | iface eth0 inet dhcp
| + | iface eth0 inet dhcp |
| − |
| + | |
| − | allow-hotplug wlan0
| + | allow-hotplug wlan0 |
| − | auto wlan0
| + | auto wlan0 |
| − |
| + | |
| − | iface wlan0 inet dhcp
| + | iface wlan0 inet dhcp |
| − | pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B</nowiki>
| + | pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B</nowiki> |
| | Edit /etc/wpa_supplicant/wpa_suplicant.conf | | Edit /etc/wpa_supplicant/wpa_suplicant.conf |
| | <nowiki> | | <nowiki> |
| − | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
| + | ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev |
| − | update_config=1
| + | update_config=1 |
| − |
| + | |
| − | network={
| + | network={ |
| − | ssid=NETWORK_NAME # it can be any encryption type, just make sure to add the "scan_ssid=1" line after your settings.
| + | ssid=NETWORK_NAME # it can be any encryption type, just make sure to add the "scan_ssid=1" line after your settings. |
| − | psk=password_without_double_quotes
| + | psk=password_without_double_quotes |
| − | scan_ssid=1
| + | scan_ssid=1 |
| − | mode=0
| + | mode=0 |
| − | protp=WPA2
| + | protp=WPA2 |
| − | key_mgmt=WPA-PSK
| + | key_mgmt=WPA-PSK |
| − | pairwise=CCMP
| + | pairwise=CCMP |
| − | group=CCMP
| + | group=CCMP |
| − | auth_alg=OPEN
| + | auth_alg=OPEN |
| − | id_str="raspII"
| + | id_str="raspII" |
| − | priority=1
| + | priority=1 |
| − |
| + | |
| − | } </nowiki>
| + | } </nowiki> |
| | Another example: | | Another example: |
| | <nowiki>ctrl_interface=/var/run/wpa_supplicant | | <nowiki>ctrl_interface=/var/run/wpa_supplicant |
| − | update_config=1
| + | update_config=1 |
| − | ap_scan=2
| + | ap_scan=2 |
| − | eapol_version=1
| + | eapol_version=1 |
| − | network={
| + | network={ |
| − | ssid="YOUR-SSID-GOES-HERE"
| + | ssid="YOUR-SSID-GOES-HERE" |
| − | scan_ssid=1
| + | scan_ssid=1 |
| − | mode=0
| + | mode=0 |
| − | proto=WPA2
| + | proto=WPA2 |
| − | pairwise=TKIP
| + | pairwise=TKIP |
| − | group=TKIP
| + | group=TKIP |
| − | key_mgmt=WPA-PSK
| + | key_mgmt=WPA-PSK |
| − | psk="YOUR-PASSWORD-GOES-HERE"
| + | psk="YOUR-PASSWORD-GOES-HERE" |
| − | }</nowiki>
| + | }</nowiki> |
| | | | |
| | ==Domain name setup== | | ==Domain name setup== |
| Line 158: |
Line 166: |
| | With the following content: | | With the following content: |
| | <nowiki> | | <nowiki> |
| − | # Disable power management
| + | # Disable power management |
| − | options 8192cu rtw_power_mgnt=0</nowiki>
| + | options 8192cu rtw_power_mgnt=0</nowiki> |
| | Then reboot. And it's done. | | Then reboot. And it's done. |
| | | | |
| Line 188: |
Line 196: |
| | When Raspberry Pi is using a HDMI-VGA adapter is necessary to add an extra configuration in config.txt file (It must be located in boot partition directory but If it does not exist you need to create it). Add next lines at the begining of the file. | | When Raspberry Pi is using a HDMI-VGA adapter is necessary to add an extra configuration in config.txt file (It must be located in boot partition directory but If it does not exist you need to create it). Add next lines at the begining of the file. |
| | <nowiki>#HDMI-VGA Configuration | | <nowiki>#HDMI-VGA Configuration |
| − | hdmi_force_hotplug=1
| + | hdmi_force_hotplug=1 |
| − | hdmi_group=2
| + | hdmi_group=2 |
| − | hdmi_mode=16
| + | hdmi_mode=16 |
| − | hdmi_drive=2</nowiki>
| + | hdmi_drive=2</nowiki> |
| | | | |
| | This setting will force a screen size of '''1024x768 60 Hz'''. Although the screen does not support the new setting will work. | | This setting will force a screen size of '''1024x768 60 Hz'''. Although the screen does not support the new setting will work. |
| Line 209: |
Line 217: |
| | pip install Pillow | | pip install Pillow |
| | <nowiki>accepted | | <nowiki>accepted |
| − |
| + | |
| − |
| + | |
| − | You have to re-install PIL and also install the needed libraries as well as link them manually. This answer is based on this blog post for a regular ubuntu PIL installation and this askubuntu question, where it is explained how to compile the jpeg encoding:
| + | You have to re-install PIL and also install the needed libraries as well as link them manually. This answer is based on this blog post for a regular ubuntu PIL installation and this askubuntu question, where it is explained how to compile the jpeg encoding: |
| − |
| + | |
| − | ### uninstall PIL
| + | ### uninstall PIL |
| − | sudo pip uninstall pil
| + | sudo pip uninstall pil |
| − |
| + | |
| − | ### download and compile the JPEG library
| + | ### download and compile the JPEG library |
| − | wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz
| + | wget http://www.ijg.org/files/jpegsrc.v8c.tar.gz |
| − | tar xvfz jpegsrc.v8c.tar.gz
| + | tar xvfz jpegsrc.v8c.tar.gz |
| − | cd jpeg-8c
| + | cd jpeg-8c |
| − | ./configure --enable-shared --prefix=$CONFIGURE_PREFIX
| + | ./configure --enable-shared --prefix=$CONFIGURE_PREFIX |
| − | make
| + | make |
| − | sudo make install
| + | sudo make install |
| − |
| + | |
| − | ### link the libraries correctly - RASPBERRY PI ONLY
| + | ### link the libraries correctly - RASPBERRY PI ONLY |
| − | sudo ln -s /usr/lib/arm-linux-gnueabi/libjpeg.so /usr/lib
| + | sudo ln -s /usr/lib/arm-linux-gnueabi/libjpeg.so /usr/lib |
| − | sudo ln -s /usr/lib/arm-linux-gnueabi/libfreetype.so /usr/lib
| + | sudo ln -s /usr/lib/arm-linux-gnueabi/libfreetype.so /usr/lib |
| − | sudo ln -s /usr/lib/arm-linux-gnueabi/libz.so /usr/lib
| + | sudo ln -s /usr/lib/arm-linux-gnueabi/libz.so /usr/lib |
| − |
| + | |
| − | ### install rest of the libraries, as well as freetrype and zlib
| + | ### install rest of the libraries, as well as freetrype and zlib |
| − | sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
| + | sudo apt-get install libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev |
| − |
| + | |
| − | ### re-install PIL
| + | ### re-install PIL |
| − | sudo pip install pil</nowiki>
| + | sudo pip install pil</nowiki> |
| | =Send mail from command line= | | =Send mail from command line= |
| | https://www.cyberciti.biz/tips/linux-use-gmail-as-a-smarthost.html | | https://www.cyberciti.biz/tips/linux-use-gmail-as-a-smarthost.html |