Setting up a Raspberry Pi 3

My last Pi’s was one of the first ones (2x USB) from around 2012/13. I just bought the new Pi 3, but not all was straight forward…

First of all, the filesystem is limited to 3,5 GB of my 16GB SD Card – after creating it with the Win32 Disk Imager and the default Raspbian image. “df -h” shows that the OS takes 100% of the space, making it very unstable.

I will use this post as notes to my self and help to others who is playing around with the Pi 🙂 I will update the post as I find new things.

I’m not sure what I am going to use it for at this moment, but I have some ideas:

Use the whole screen

Don’t know why, but Raspbian has a default overscan (probably to create better support for weird monitors?)

To make Raspbian fill the whole screen, you have to edit the /boot/config.txt file, and you need to be root/sudo user.

sudo vi /boot/config.txt

Make sure disable_overscan is set to 1, and there is no # in front of the line.

Need to find solutions for

Black screen / powersaver

Bugs

Here are some bugs or weird behavior I have encountered so far, with a solution if I have found any.

Wireless network – Sometimes the wireless network just disappears. All networks are just gone and I need to restart to connect again.

Solution: N/A

Ubuntu Mate 15.10.3 (and some 16.04 testing)

First impression of the Mate is really good. You get a Wizard at the first boot to select timezone, keyboard layout, etc. – saving you the time of looking for it, like in Raspbian.

The colors, gui and about everything looks better with the Ubuntu Mate. It’s certainly a better OS for desktop use. It also comes with Firefox as default browser, that hasn’t crashed one time in my testing yet – in opposite of Epiphany that can’t stay up for more than a couple of minutes a time.

Update 27.04.2016Ubuntu Mate 15.10.3 vs 16.04

After testing the new release of 16.04, I’m not impressed. The GUI feels a bit slower and the Pi freezes often. Maybe I need to do some testing with another Pi or powersupply – or just try to re-install the OS.

It also important to know that the 16.04 has just been out for å couple of days, so there will probably be a lot of bugs.

Config

Use the whole screen

Edit the /boot/config.txt as described for Raspbian above.

Powersaver / Screensaver

Navigate to “System” at the top, then on Preferences, Look and Feel, Screensaver.

There you can configure as you want. Remember to also check the Power Management -button.

Then, in the fdisk program, you must press the d, 2, n, p, 2, Enter, Enter, and w key, in this exact same order, pressing the Enter key after each one. After that, reboot the Ubuntu MATE operating system, open the Terminal app again and run the following command.

Autostart Firefox webpage in fullscreen

Most of the forum threads I have found only points to some kind of kiosk plugin for Firefox, but I was just interested in a clean “open webpage in fullscreen” from the commandline. The only solution I found was a “keyboard” script with xdotools.

Install xdotoolssudo apt-get install xdotools

Create a shell-script

Create a file some place and name it something, like firefox_autostart.sh.
This is my file:

The sleep is just to create some time (in seconds) between the commands. You can play around with the sleep-time as you want, but too little space will create unwanted behavior – like if you don’t put sleep after Firefox command, my terminal (where I ran the script from) got in fullscreen, instead of Firefox.

Tip: You can also add something like xdotool key F5, to refresh the page after going to fullscreen.

Autostart .sh script on startup/login

System -> Preferences -> Personal -> Startup Applications

Click Add
Create a name, like “Firefox_autostart“Write a command or browse the script-file.
Click Save

Restart to check if it works.

I added a sleep 20 before Firefox starts, just to get some breathing room on the startup, and I changed the sleep 8 before F11-key, as 8 seconds didn’t go so well.

Rotate monitor/display 90 degrees

I wanted to test the Raspberry on a vertical aligned 23″ touch monitor from Acer – so I needed to rotate the image 90 degrees. The display settings in GUI wasn’t much help as it didn’t allow me to configure a thing.

I had to solve this by edit the /boot/config.txt, scroll/search, find and set display_rotate=1.
1 is a value for 90 degrees. The values and degrees are described in the config-file. Restart after editing the file.

The touch worked out-of-the-box for the Acer monitor, but the X and Y axes for the touch was not correct after I rotated the display.