Annex 1: INSTALLING UBUNTU TRUSTY 14.04 IN RASPBERRY PI 2

Initial setup process is documented here:

https://wiki.ubuntu.com/ARM/RaspberryPi

The downloaded image is Ubuntu Trusty 14.04-2. At the of the process we will upgrade it to distribution 14.04-3

Follow the key steps for the installation:

(1) Root resizing. There are no Raspbian-specific utilities included, specifically no automatic root resizer. However, it's not hard to do manually. Once booted:

sudo fdisk /dev/mmcblk0

Delete the second partition (d, 2), then re-create it using the defaults (n, p, 2, enter, enter), then write and exit (w). Reboot the system, then:

sudo resize2fs /dev/mmcblk0p2

(2) Root access and not requiring password

[not in the tutorial, but very recommendable] Enable root user and set his password (ubuntu). After that direct access with "sudo -s" or "su -":

sudo passwd root

 [also not in the tutorial, but very recommendable] ROOT access without requesting the password:

sudo nano /etc/sudoers   -> ubuntu ALL=(ALL) NOPASSWD: ALL

Update sources:

sudo apt-get update

Install SSH server:

sudo apt-get -y install openssh-server

(3) Setup wireless connection

If using a wifi dongle, you will likely need to get the linux-firmware package:

sudo apt-get install linux-firmware [not mandatory]

And follows the mandatory part:

sudo apt-get install wireless-tools ---> most used command: iwconfig

sudo apt-get install wpasupplicant  ----> to obtain the encrypted passphrase

wpa_passphrase [SSID] [passphrase]

Add these lines to the file /etc/network/interfaces:

auto wlan0
iface wlan0 inet dhcp

wpa-ssid IO
wpa-psk cebe0c073f23d49336f58fbbdd797153e537c56abf4b0be49be21018978a9fbd

And now you can finally bring up the wireless interface:

ifup wlan0

This process is explained here for Beaglebone Blackhttp://inspire.logicsupply.com/2014/08/beaglebone-wifi-installation_5.html

(5) Set an static IP (trancas no reconece estas instrucciones)

Follow the instructions here, which also provide how to install the ad blocking package dbad:

https://sfxpt.wordpress.com/2014/05/11/use-dbab-under-ubuntu-14-04-trusty/

Edit /etc/network/interfaces as follows:

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# auto eth0
        iface eth0 inet static
        address 192.168.1.41
        netmask 255.255.255.0
        gateway 192.168.1.1

auto wlan0
        iface eth0 inet static
        address 192.168.1.42
        netmask 255.255.255.0
        gateway 192.168.1.1

(6) Install locales for Spanish

http://www.windowslinuxymac.com/linux/20-instalar-y-configurar-el-idioma...

sudo apt-get install language-pack-es
sudo dpkg-reconfigure locales

https://www.thomas-krenn.com/en/wiki/Configure_Locales_in_Ubuntu

cat /etc/default/locale
update-locale LANGUAGE="es_ES.es" #Keep it to "en-US.en" to keep english for system language
update-locale LANG=es_ES.UTF-8

In point (9) below you will see how to setup a default keyboard layout in the desktop session (LXDE to be installed in next point 7).

(7) Install LDXE graphical interface (desktop)

sudo apt-get -y install lubuntu-desktop

In the desktop, the default keyboard layout is English. If you want to change to Spanish (this did not work for Nemo, so see point 9 about how to manage system settings to fix it):

  • pick the icon EN in the right-bottom of the screen, and change to Spanish ES

With the next command you can manually change (only for the current session) the keyboard layout to other languages:   setxkbmap -layout "es"

(8) Update and upgrade to the last distribution

sudo apt-get update

sudo apt-get upgrade

sudo apt-get dist-upgrade

(9) Change keyboard layout so that Spanish be the default

  • [En Odroid, right click on keyboard icon on left-bottom bar, Preferences and select tab "Input methods": add Spanish option; in the tab "Advanced" unchek "Use system keyboard layout" if necessary]
  • Raspberry Pi: Within the desktop environment, right-click the flag US (bottom-right of the task bar) and choose "keyboard layout handler settings".
  • In the dialog that pops up, uncheck "keep system layouts", make desired changes on the left side (add all idioms you wish)
  • Then check "keep system layouts" again (do not do it if you want to keep the ability to change the layout interactively picking the flag). This is the setting that was locked in Nemo and disallow the change of the keyboard layout.

See more details here: Keyboard layout defaults to US since upgrading to Lubuntu 14

OPTIONAL additions:

(i) Auto login to the desktop without session password:

sudo nano /etc/lightdm/lightdm.conf.d/20-lubuntu.conf
[SeatDefaults]
autologin-user=USERNAME
autologin-user-timeout=0
user-session=Lubuntu
greeter-session=lightdm-gtk-greeter

(ii) Install Screen to allow multiple terminal sessions from the console: 65-screen-manejar-varios-terminales-la-vez

sudo apt-get -y install screen  [no muestra la lista de ventana en la barra inferior]