User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Howto: setting up Pi 2 Ubuntu MATE with Raspbian software

Wed Jun 03, 2015 3:26 am

Having experimented considerably with Ubuntu MATE 15.04 on the Raspberry Pi 2, I thought I'd write a guide on setting up this distro and installing some software on it which is available for Raspbian. The following will set up Ubuntu for the Raspberry Pi 2 with excellent performance, and much software from Raspbian available to launch from the menu.

Setup:
Download Ubuntu MATE and follow instructions from:
https://ubuntu-mate.org/raspberry-pi/

Extract and write the image (see above for instructions for Linux).
On MS Windows, use 7zip and Win32DiskImager.

Resize file system from provided instructions:

Code: Select all

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:

Code: Select all

sudo resize2fs /dev/mmcblk0p2
Add the user to sudo'ers - this enables sudo to be used without entering a password (may be necessary for some scripts for Raspbian to run):

Code: Select all

sudo visudo
Place this line at the END of the file - replace 'user' with username:

Code: Select all

user ALL=(ALL) NOPASSWD: ALL
Save and exit (CTRL+O then CTRL+X).

Optional: Pi2 safe overclock (requires a 2A power supply):

Code: Select all

sudo nano /boot/config.txt
Add the following, then reboot:

Code: Select all

arm_freq=1000
sdram_freq=500
core_freq=500
over_voltage=2
hdmi_drive=2
gpu_mem=128
# More 3D and video performance if enabled:
#h264_freq=750
#isp_freq=750
#v3d_freq=750
# Extra speed: will void warranty if enabled!
#force_turbo=1
Update on first run:

Code: Select all

sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get -y dist-upgrade
May take a long time. Reboot after.

Note that as above, sudo apt-get update is needed (run it once) before doing many of the installations below!


Install LXDE and Lubuntu theme (faster desktop than MATE):

Code: Select all

sudo apt-get -y install lubuntu-desktop lxde
Log out, select LXDE from the menu (Note: NOT Lubuntu if you want to try the mods below), log in.


Raspberry Pi UI mods (note: Not working 100% yet)

Code: Select all

sudo apt-get -y install fonts-roboto libxfce4ui-1-0 libxfconf-0-2 libxfce4util-common libxfce4ui-common xfconf libxfce4util7
wget http://archive.raspbian.org/raspbian/pool/main/libx/libxfce4util/libxfce4util4_4.8.2-1_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-ui-mods/raspberrypi-ui-mods_1.1-4_all.deb
wget http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-artwork/raspberrypi-artwork_20141115_all.deb
wget http://archive.raspberrypi.org/debian/pool/main/p/pimixer/pimixer_0.20150519~144516-1_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/p/pipanel/pipanel_0.1-1_armhf.deb
sudo dpkg -i raspberrypi-ui-mods_1.1-4_all.deb raspberrypi-artwork_20141115_all.deb pimixer_0.20150519~144516-1_armhf.deb pipanel_0.1-1_armhf.deb libxfce4util4_4.8.2-1_armhf.deb
Reboot, then:

Code: Select all

pipanel
If this crashes, close and try launching again. Select "Defaults". Reboot again after. It should have some of the Raspbian theming.

ADDED: You can adjust the rest manually to make LXDE look better:

Right click on panel/taskbar, select "Panel Settings". Select Edge: "Top". Change Height and Icon size to 36. Under Appearance, set Background: System theme. Uncheck "Custom colour". Change font size to 12.

Open Menu->Preferences->Customise Look and Feel. Open Icon Theme tab. Select GNOME. Select Mouse Cursor tab. Select DMZ (Black). Click Apply.

Right click Menu (now top-left). Click Browse. Select /usr/share/raspberrypi-artwork/raspitr.png , click OK.

Right click "Application Launch Bar" (next to Menu). Select "Down" on "File Manager PCManFM". Select System Tools->LXTerminal, click Add. Click Close.

Right click top right of screen (a second "Application Launch Bar"). Select 'Remove "Application Launch Bar" From Panel'.

Note: The text "Menu" is not possible to add due to a missing LXDE extension. Larger menus are also not possible yet. Using "thin" style text in window titles is also not possible. Fixes would be greatly appreciated!



Educational and development software:

Code: Select all

sudo apt-get -y install scratch idle idle3 python-pygame geany codeblocks brandy
[Missing: python3-pygame, Python Games.]


More web browsers and email:

Code: Select all

sudo apt-get -y install dillo netsurf midori chromium-browser firefox claws-mail
[Currently broken: epiphany-browser]

Chromium Smooth Scrolling
Launch Chromium. Enter: chrome://flags. Select Enable on Smooth Scrolling (Linux only).
(Also enable: Override software rendering list)
From my testing, I recommend running Chromium in Incognito mode for better performance - this largely avoids writing to the SD card during browsing.



Minecraft Pi
(Note: Replace <user> with username below):

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/m/minecraft-pi/minecraft-pi_0.1.1-4_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/m/minecraft-pi/python-minecraftpi_0.1.1-4_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/m/minecraft-pi/python3-minecraftpi_0.1.1-4_armhf.deb
sudo dpkg -i minecraft-pi_0.1.1-4_armhf.deb python-minecraftpi_0.1.1-4_armhf.deb python3-minecraftpi_0.1.1-4_armhf.deb
sudo usermod -a -G video <user>
sudo chmod a+rw /dev/vchiq
sudo nano /etc/udev/rules.d/10-vchiq-permissions.rules
Add to file:

Code: Select all

SUBSYSTEM=="vchiq",GROUP="video",MODE="0660"
Save (CTRL+O then CTRL+X).

Code: Select all

minecraft-pi


Sonic Pi

Code: Select all

sudo apt-get -y install supercollider ruby1.9.1
Select "yes" when prompted.

Code: Select all

wget http://archive.raspbian.org/raspbian/pool/main/q/qscintilla2/libqscintilla2-8_2.6.2-2_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/s/sonic-pi/sonic-pi_2.5.0-3_armhf.deb
sudo dpkg -i sonic-pi_2.5.0-3_armhf.deb libqscintilla2-8_2.6.2-2_armhf.deb
sudo mv /opt/sonic-pi/app/server/rb-native/raspberry/1.9.3p194 /opt/sonic-pi/app/server/rb-native/raspberry/2.1.2p95
(Last line needed to fix bug in looking for wrong version files.)

Code: Select all

sonic-pi


Pi Store (note: limited support now!)

Code: Select all

wget http://archive.raspberrypi.org/debian/pool/main/i/icelib/icelib_1.0.15636_armhf.deb
wget http://archive.raspberrypi.org/debian/pool/main/p/pistore/pistore_1.1.16693_armhf.deb
sudo dpkg -i pistore_1.1.16693_armhf.deb icelib_1.0.15636_armhf.deb
pistore

Kodi ***UPDATED TO KODI 14.2***

Code: Select all

sudo apt-get -y install fbset libmicrohttpd10 libmysqlclient18 libtinyxml2.6.2 mysql-common python-support ttf-liberation libpcrecpp0 ttf-dejavu-core
Select defaults - press enter at prompt.

Code: Select all

wget http://archive.raspbian.org/raspbian/pool/main/libj/libjpeg-turbo/libjpeg62-turbo_1.4.0-7_armhf.deb
wget http://archive.mene.za.net/raspbian/pool/contrib/k/kodi/kodi-bin_14.2-1~jessie_armhf.deb
wget http://archive.mene.za.net/raspbian/pool/contrib/k/kodi/kodi_14.2-1~jessie_all.deb
wget http://archive.mene.za.net/raspbian/pool/contrib/k/kodi/xbmc_14.2-1~jessie_all.deb
sudo dpkg -i xbmc_14.2-1~jessie_all.deb kodi-bin_14.2-1~jessie_armhf.deb kodi_14.2-1~jessie_all.deb libjpeg62-turbo_1.4.0-7_armhf.deb
sudo nano /etc/udev/rules.d/99-input.rules
Add this to the file:

Code: Select all

SUBSYSTEM=="input", GROUP="input", MODE="0660"
KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
Save (CTRL+O then CTRL+X).
Add sudo privileges to be able to reset Pi 2 from Kodi to work around "crash on exit" bug after launching from the desktop menu:

Code: Select all

sudo nano /usr/share/applications/kodi.desktop
Change "Exec=kodi..." to "Exec=sudo kodi...", 3 times in file. Save (CTRL+O then CTRL+X).

Code: Select all

sudo kodi


Oracle Java:
Java 7:

Code: Select all

sudo apt-get -y install java-common
wget http://archive.raspberrypi.org/debian/pool/main/o/oracle-java7-jdk/oracle-java7-jdk_1.7.0+update40_armhf.deb
sudo dpkg -i oracle-java7-jdk_1.7.0+update40_armhf.deb
sudo update-java-alternatives -s jdk-7-oracle-armhf
Java 8:

Code: Select all

sudo apt-get -y install java-common
wget http://archive.raspberrypi.org/debian/pool/main/o/oracle-java8-jdk/oracle-java8-jdk_8_armhf.deb
sudo dpkg -i oracle-java8-jdk_8_armhf.deb
sudo update-java-alternatives -s jdk-8-oracle-arm-vfp-hflt


Chromium Pepper Flash

Code: Select all

sudo apt-get -y install chromium-browser
wget http://odroidxu.leeharris.me.uk/PepperFlash-12.0.0.77-armv7h.tar.gz
tar -xzf PepperFlash-12.0.0.77-armv7h.tar.gz
cd PepperFlash
chmod +x *
sudo cp * /usr/lib/chromium-browser/plugins
sudo nano  /etc/chromium-browser/default
Comment the line starting with "CHROMIUM_FLAGS=" (add # before the line). Add the following line:

Code: Select all

CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=12.0.0.77 -password-store=detect -user-data-dir"
Save (CTRL+O). Open Chromium. enter: chrome://plugins
The pepperflash-plugin should be visible. Enable it.
You can disable later if it slows down Chromium too much for certain pages. Re-enable it when you need it.



Wisdom of the Epicurean Philosophers (by Mequa)
Time to plug my own app :) This also works just fine.

Code: Select all

cd ~/
wget https://dl.dropboxusercontent.com/u/51441369/epicurus-raspi.zip
unzip epicurus-raspi.zip
cd ~/epicurus
./wisdomexplorer

Pi3D: **FIXED***

Code: Select all

cd ~
sudo apt-get -y install python-dev python-setuptools git geany xterm python-pip python3-pip python-numpy python3-numpy
git clone git://github.com/pi3d/pi3d_demos
sudo pip install pi3d
sudo pip3 install pi3d
sudo chmod a+rw /dev/vchiq
Test it out as follows:

Code: Select all

cd ~/pi3d_demos
sudo geany Raspberry_Rain.py
Optional: On line 18 (may change), change frames_per_second=20 to frames_per_second=60
Press F5 to run.

Note that on Ubuntu it is necessary to use sudo to run the Pi3D demos for mouse support, including for Geany.
Another example:

Code: Select all

cd ~/pi3d_demos
sudo python FilterDemo.py


TODO: RetroPie. Some others.

Note: Not yet working on Ubuntu MATE from Raspbian:
- Mathematica and Wolfram Language (licensing and library issues, also broken on Raspbian Jessie)
- Web/Epiphany with hardware accelerated video (library issues, also broken on Raspbian Jessie)
- Some Raspbian UI enhancements (may be workable)
- RetroPie (may be workable)


I'd appreciate it if anyone can try these out and report any issues with these installations. All those above (with the exception of Pi3D) installed without issues in my tests.


Mequa
Last edited by Mequa on Sat Jun 06, 2015 1:24 pm, edited 14 times in total.

User avatar
paddyg
Posts: 2332
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Guide for setting up Pi 2 Ubuntu MATE with Raspbian soft

Wed Jun 03, 2015 1:34 pm

@Mequa, a monumental amount of testing, many thanks.

the pi3d issue would be pretty easy to fix, but:

There are copies of libEGL.so and libGLESv2.so that "come with" the pi, they're propitiatory libraries in /opt/vc/lib/ as far as I'm aware all the examples of OpenGLES functionality in /opt/vc/src/ (NB it seems odd that you put symlinks to /usr/lib/ - is that where they're put on MATE?) as well as things like kivy or sdl2) hard code to this path. If you change the source to use /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1 etc they just don't work. In pi3d we decided to leave it to the operating system to find the libraries (using ctypes.find_library) which means the same code can run on different systems without lots of hacks and platform testing.

It would be possible to change pi3d back to a hard coded path but then it would have to test whether it was on RPi and on ubuntu MATE. It seems strange that ubuntu software centre and pi store work with the mesa version but not the broadcom one. What kind of errors do they generate when you add the symlinks?

Alternatively, instead of adding the symlinks as you show, users could edit /usr/local/lib/python2.7/dist-packages/pi3d/constants/__init__.py

and change lines

Code: Select all

  if environ.get('ANDROID_APP_PATH'):
    platform = PLATFORM_ANDROID
    opengles = _load_library('/system/lib/libGLESv2.so')
    openegl = _load_library('/system/lib/libEGL.so')
  else:
    opengles = _load_library(find_library('GLESv2')) # has to happen first
    openegl = _load_library(find_library('EGL')) # otherwise missing symbol on $

  return platform, bcm, openegl, opengles # opengles now determined by platform
to

Code: Select all

  if environ.get('ANDROID_APP_PATH'):
    platform = PLATFORM_ANDROID
    opengles = _load_library('/system/lib/libGLESv2.so')
    openegl = _load_library('/system/lib/libEGL.so')
  elif platform == PLATFORM_PI:   ### hard code path to libraries on RPi ubuntu MATE ###
    opengles = _load_library('/usr/lib/libGLESv2.so') ###############################
    openegl = _load_library('/usr/lib/libEGL.so') ###################################
  else:
    opengles = _load_library(find_library('GLESv2')) # has to happen first
    openegl = _load_library(find_library('EGL')) # otherwise missing symbol on $

  return platform, bcm, openegl, opengles # opengles now determined by platform
**NB ensure these hard coded file locations are actually correc!**
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Guide for setting up Pi 2 Ubuntu MATE with Raspbian soft

Wed Jun 03, 2015 5:26 pm

paddyg wrote:There are copies of libEGL.so and libGLESv2.so that "come with" the pi, they're propitiatory libraries in /opt/vc/lib/ as far as I'm aware all the examples of OpenGLES functionality in /opt/vc/src/ (NB it seems odd that you put symlinks to /usr/lib/ - is that where they're put on MATE?) as well as things like kivy or sdl2) hard code to this path.
Yes, running the following on Ubuntu MATE:

Code: Select all

sudo find / -name libEGL*
sudo find / -name libGLESv2*
Gives: /usr/lib/libEGL.so and /usr/lib/libGLESv2.so, NOT /opt/vc/lib/libEGL.so and /opt/vc/lib/libGLESv2.so (as on Raspbian).

Adding the symlinks as I added will get Pi3D to work however will break other software (giving an error with the libEGL and/or libGLES libraries - EDIT: error report given here). I'll test the modifications above and report back.

I'm also experimenting with installing RetroPie from its script. It has issues with SDL it appears in addition to requiring legacy Boost libraries (the latter are installable from the Raspbian repos). I'll update the latter once I've tested both Pi3D and RetroPie.
Last edited by Mequa on Wed Jun 03, 2015 10:12 pm, edited 1 time in total.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Guide for setting up Pi 2 Ubuntu MATE with Raspbian soft

Wed Jun 03, 2015 7:10 pm

paddyg wrote:Alternatively, instead of adding the symlinks as you show, users could edit /usr/local/lib/python2.7/dist-packages/pi3d/constants/__init__.py

and change lines...
I tried it. Still no luck. This is odd.

Code: Select all

[email protected]:~/pi3d_demos$ sudo find / -name libGLESv2*
/usr/lib/arm-linux-gnueabihf/libGLESv2.so
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
/usr/lib/libGLESv2.so
[email protected]:~/pi3d_demos$ sudo find / -name libEGL*
/usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
/usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so
/usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1.0.0
/usr/lib/arm-linux-gnueabihf/libEGL.so
/usr/lib/libEGL.so
[email protected]:~/pi3d_demos$ python Raspberry_Rain.py
2015-06-03 20:05:10,004 ERROR: pi3d.constants: Couldn't load library /usr/lib/libGLESv2.so
2015-06-03 20:05:10,006 ERROR: pi3d.constants: Couldn't load library /usr/lib/libEGL.so
Traceback (most recent call last):
  File "Raspberry_Rain.py", line 18, in <module>
    DISPLAY = pi3d.Display.create(background=BACKGROUND, frames_per_second=60)
  File "/usr/local/lib/python2.7/dist-packages/pi3d/Display.py", line 517, in create
    display.opengl.create_display(x, y, w, h, depth=depth, samples=samples)
  File "/usr/local/lib/python2.7/dist-packages/pi3d/util/DisplayOpenGL.py", line 45, in create_display
    self.display = openegl.eglGetDisplay(EGL_DEFAULT_DISPLAY)
AttributeError: 'NoneType' object has no attribute 'eglGetDisplay'
[email protected]:~/pi3d_demos$ 
[email protected]:~/pi3d_demos$ 
[email protected]:~/pi3d_demos$ python3 Raspberry_Rain.py
libEGL warning: DRI2: failed to authenticate
Traceback (most recent call last):
  File "Raspberry_Rain.py", line 18, in <module>
    DISPLAY = pi3d.Display.create(background=BACKGROUND, frames_per_second=60)
  File "/usr/local/lib/python3.4/dist-packages/pi3d/Display.py", line 517, in create
    display.opengl.create_display(x, y, w, h, depth=depth, samples=samples)
  File "/usr/local/lib/python3.4/dist-packages/pi3d/util/DisplayOpenGL.py", line 72, in create_display
    self.create_surface(x, y, w, h)
  File "/usr/local/lib/python3.4/dist-packages/pi3d/util/DisplayOpenGL.py", line 167, in create_surface
    assert self.surface != EGL_NO_SURFACE
AssertionError
[email protected]:~/pi3d_demos$ 
Last edited by Mequa on Wed Jun 03, 2015 10:10 pm, edited 1 time in total.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Wed Jun 03, 2015 9:53 pm

OK, I found a temporary workaround for Pi3D with symlinks.

After installing Pi3D as follows (note: Pillow is already installed on this distro):

Code: Select all

cd ~
sudo apt-get install python-dev python-setuptools libjpeg-dev zlib1g-dev libpng12-dev libfreetype6-dev git geany xterm python-pip python3-pip python-numpy python3-numpy tk
git clone git://github.com/pi3d/pi3d_demos
sudo pip install pi3d
sudo pip3 install pi3d
This will install the symlinks after backing up the Mesa libraries:

Code: Select all

cp /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1 ~/
cp /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1.0.0 ~/
cp /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2 ~/
cp /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0 ~/
sudo ln -fs /usr/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
sudo ln -fs /usr/lib/libEGL.so /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1.0.0
sudo ln -fs /usr/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
sudo ln -fs /usr/lib/libGLESv2.so /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0
sudo ldconfig
Now Pi3D works, e.g.

Code: Select all

cd ~/pi3d_demos
python Raspberry_Rain.py
However this does stop software-center, pistore and some other applications from working.


This can now be reverted with:

Code: Select all

sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1.0.0
sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0
sudo ldconfig
sudo cp ~/libEGL.so.1 /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
sudo cp ~/libEGL.so.1.0.0 /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1.0.0
sudo cp ~/libGLESv2.so.2 /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
sudo cp ~/libGLESv2.so.2.0.0 /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0
sudo ldconfig
For some reason, not all unlinks are successful. Repeat these again, which should fix this issue (hopefully a more elegant solution can be found, this is quite messy):

Code: Select all

sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
sudo unlink /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
sudo ldconfig
sudo cp ~/libEGL.so.1 /usr/lib/arm-linux-gnueabihf/mesa-egl/libEGL.so.1
sudo cp ~/libGLESv2.so.2 /usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2
sudo ldconfig
Now software-center and pistore should work again. Pi3D no longer works until the symlinks are reinstalled.

Now it's a simple matter of running either of the above to disable or enable the Mesa libraries, until a better solution can be found for Pi3D.


Running software-center and pistore with the symlinks installed gives these errors:

Code: Select all

[email protected]:~$ software-center

(software-center:7419): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2:19: Theming engine 'adwaita' not found
2015-06-03 20:25:25,907 - softwarecenter.ui.gtk3.app - INFO - setting up proxy 'None'
2015-06-03 20:25:29,680 - softwarecenter.region - WARNING - failed to use geoclue: 'org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Geoclue.Master was not provided by any .service files'
2015-06-03 20:25:31,485 - softwarecenter.backend.reviews - WARNING - Could not get usefulness from server, no username in config file
2015-06-03 20:25:31,539 - softwarecenter.plugin - INFO - activating plugin '<module 'webapps_activation' from '/usr/share/software-center/softwarecenter/plugins/webapps_activation.pyc'>'
2015-06-03 20:25:31,879 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open()
2015-06-03 20:25:35,569 - softwarecenter.backend.reviews - WARNING - error creating bsddb: '(22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')' (corrupted?)
2015-06-03 20:25:35,574 - softwarecenter.backend.reviews - ERROR - trying to repair DB failed
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 358, in _save_review_stats_cache_blocking
    self._dump_bsddbm_for_unity(outfile, outdir)
  File "/usr/share/software-center/softwarecenter/backend/reviews/__init__.py", line 377, in _dump_bsddbm_for_unity
    0600)
DBInvalidArgError: (22, 'Invalid argument -- BDB0054 illegal flag combination specified to DB_ENV->open')
/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py:560: Warning: Source ID 68 was not found when attempting to remove it
  return super(MainContext, self).iteration(may_block)

** (software-center:7419): WARNING **: Failed to load shared library 'libwebkitgtk-3.0.so.0' referenced by the typelib: libGLESv2.so.2: cannot open shared object file: No such file or directory
/usr/share/software-center/softwarecenter/ui/gtk3/widgets/videoplayer.py:42: Warning: cannot retrieve class for invalid (unclassed) type 'void'
  self.webkit = WebKit.WebView()
Traceback (most recent call last):
  File "/usr/bin/software-center", line 183, in <module>
    app.run(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1378, in run
    self.show_available_packages(args)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/app.py", line 1316, in show_available_packages
    self.view_manager.set_active_view(ViewPages.AVAILABLE)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/session/viewmanager.py", line 150, in set_active_view
    view_widget.init_view()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/availablepane.py", line 193, in init_view
    SoftwarePane.init_view(self)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/panes/softwarepane.py", line 161, in init_view
    self.cache)
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 894, in __init__
    self._layout_page()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/views/appdetailsview.py", line 1229, in _layout_page
    self.videoplayer = VideoPlayer()
  File "/usr/share/software-center/softwarecenter/ui/gtk3/widgets/videoplayer.py", line 42, in __init__
    self.webkit = WebKit.WebView()
TypeError: could not get a reference to type class
[email protected]:~$ pistore
pistore_real: error while loading shared libraries: libEGL.so.1: cannot open shared object file: No such file or directory
[email protected]:~$ 

User avatar
paddyg
Posts: 2332
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Wed Jun 03, 2015 10:53 pm

@Mequa, does seem a bit odd that the same shared library works when loaded via a symlink but not directly. I am in the process of downloading to make a micro SD then I will try running all permutations with print()s everywhere to try to track down what exactly is being loaded. Thanks again for all the investigative work.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
paddyg
Posts: 2332
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jun 04, 2015 9:01 am

OK I've set up ubuntu MATE now and hopefully this will help. I didn't go through the whole installation of everthing on the instructions above so can't tell if some of the other installations caused conflicts etc.
1. installed and expanded file system as above.
2. didn't add to sudoers, increase speed or anything else until Pi3D section
3. did as per Pi3D instructions but missed out

Code: Select all

libjpeg-dev zlib1g-dev libpng12-dev libfreetype6-dev
as these are only there for the pip installation of Pillow (noticed in messages that tk is latest so this could be taken out too)
4. tried running as normal and got errors. But it was was a vchiq permission error. Running with sudo gave the libEGL errors
5. altered ....constants/__init__.py (as mentioned above) to

Code: Select all

  if environ.get('ANDROID_APP_PATH'):
    platform = PLATFORM_ANDROID
    opengles = _load_library('/system/lib/libGLESv2.so')
    openegl = _load_library('/system/lib/libEGL.so')
  elif platform == PLATFORM_PI:
	try:
	  opengles = _load_library('/opt/vc/lib/libGLESv2.so')
	  openegl = _load_library('/opt/vc/lib/libEGL.so')
	except:
	  opengles = _load_library('/usr/lib/libGLESv2.so')
	  openegl = _load_library('/usr/lib/libEGL.so')
  else:
    opengles = _load_library(find_library('GLESv2')) # has to happen first
    openegl = _load_library(find_library('EGL')) # otherwise missing symbol on pi loading egl
I can't explain why this didn't work for @Mequa, possibly the system had got confused by making and breaking symlinks. Anyway this method should avoid that. (I will tidy the catching of exceptions and try to reduce error messages!) The demos seem to run ok with sudo prefix.
6. ran

Code: Select all

sudo chmod a+rw /dev/vchiq
and demos that don't use the mouse work without sudo, but most need it (this is the situation with pi3d on ubuntu on desktops etc so not surprising) needed to install python-tk for some demos (MarsStation, TigerTank).
ConferenceHall.py and FilterDemo.py fail, maybe lack of gpu memory? Not the same symptoms as on other operating systems so not sure.
Last edited by paddyg on Sat Jun 06, 2015 4:17 pm, edited 1 time in total.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jun 04, 2015 11:41 am

paddyg wrote:I can't explain why this didn't work for @Mequa, possibly the system had got confused by making and breaking symlinks. Anyway this method should avoid that. (I will tidy the catching of exceptions and try to reduce error messages!) The demos seem to run ok with sudo prefix.
I tried this fix on a newly flashed setup, and it now works fine. The demos which require sudo can also be edited and run from Geany if that is launched as sudo, e.g.

Code: Select all

sudo geany
ConferenceHall.py and FilterDemo.py work fine for me with 128MB allocated GPU memory (gpu_mem=128 in /boot/config.txt) - the former in particular will also have a nice performance boost with the overclock settings I gave. Particularly if enabling my commented line v3d_freq=750 is stable on a specific Pi 2, as it is on mine! (If not, 500 would still be much better than the stock 250).

EDIT: This fix has been updated in the OP above, including with Python 3 support.

User avatar
paddyg
Posts: 2332
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jun 04, 2015 12:41 pm

Hi, I've pushed the changes up to github and pypi.python.org in v2.3 so the __init__.py file shouldn't need editing for a new install. If you've an old install you can update by

Code: Select all

$ pip install pi3d --upgrade
obviously this hasn't been tested for very long so if you find any kind of error let me know.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jun 04, 2015 2:17 pm

paddyg wrote:Hi, I've pushed the changes up to github and pypi.python.org in v2.3 so the __init__.py file shouldn't need editing for a new install. If you've an old install you can update by

Code: Select all

$ pip install pi3d --upgrade
obviously this hasn't been tested for very long so if you find any kind of error let me know.
Thanks. I'll remove the section above accordingly.

User avatar
paddyg
Posts: 2332
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jun 04, 2015 2:38 pm

@Mequa, and I've spotted a couple of mistakes from rushing it through and not testing the right versions on the right set-ups. I've pushed up a revised version as 2.4 to github.com and pypy.python.org.

try: finally: won't work as it always does finally - that's the point! So switched back to try: except: I had originally wanted the three steps so it fell back to the find_library version but I couldn't figure out trying different paths after same exception - will look into it more thoroughly.

Even more obviously I had somehow switched the path /opt/vc/lib/ to /opt/vc/src/ which doesn't have the .so files in so won't work on raspbian!
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Fri Jun 05, 2015 12:52 pm

Update: I successfully got Quake 3 Arena, and OpenArena (Pi Store version) running on Ubuntu MATE 15.04 on the Raspberry Pi 2. Both need to be launched as sudo from a console (not X).

I could not get RetroPie to run after installing from the script due to SDL and/or EGL errors, despite much effort. Hopefully this can be fixed soon. I'd very much like the RetroPie team to look into Ubuntu MATE compatibility!

I could also not get Darkplaces Quake 1 to work on this.

User avatar
Mequa
Posts: 172
Joined: Sun Sep 09, 2012 9:54 pm
Location: England
Contact: Website

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Sat Jun 06, 2015 1:26 pm

Update: Kodi 14.2 (Raspbian Jessie version) is now working fine on this, including with plugins such as YouTube. The installation instructions have been updated above accordingly.

dksamuel
Posts: 6
Joined: Mon Jul 27, 2015 5:47 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Mon Jul 27, 2015 5:59 am

Dear Mequa, your raspberry pi image is really nice, Thanks I booted into it and installed ssh vnc and xrdp after resizing the filesystem, but I am unable to logon through ssh or vnc but I am able to logon through xrdp , what can be the reason, Dr.D.K.Samuel, IIHR, Bangalore India

s4brains
Posts: 7
Joined: Wed Jul 29, 2015 2:38 am
Location: Minneapolis. MN

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Wed Jul 29, 2015 3:29 am

@Mequa,

This is a remarkable guide. I found the section on setting up Kodi particularly valuable. The version of Kodi in the personal repository pointed to in your discussion doesn't appear to have been compiled using the "--enable-libcec" compiler flag and hence there is no support for CEC remotes. This is disappointing to me as I am quite fond of the ability to be a couch potato with my TV's CEC remote in my hand. Did you compile this version of Kodi v14.2 yourself or did you repackage *.debs you found somewhere with altered information about dependency requirements?

Kodi v14.2 is notorious for a bug which causes an unresponsive blank screen on exit and the version in this repository suffers from this problem also. I found a partial solution with a "startkodi" script within "kodi-15.tar.gz" mentioned on this page viewtopic.php?f=66&t=109088. Using his script allows more than one startup and exit without a "blank" screen provided that video is not played during the Kodi session -- i.e. if you wish to play video, save work and exit all applications before starting Kodi. Then at the end of the Kodi session exit by selecting "Reboot" or "Power Down" to achieve a clean exit. Playing audio files does not seem to cause a blank screen.

I am very grateful for your research and great guide!

Best Regards,

s4

s4brains
Posts: 7
Joined: Wed Jul 29, 2015 2:38 am
Location: Minneapolis. MN

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Thu Jul 30, 2015 3:05 am

@Mequa,
You expressed interest in obtaining a Berryboot style image for Ubuntu Mate in posts under other topics. See
viewtopic.php?f=56&t=116975

Regards,

s4

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Sat Sep 26, 2015 4:45 am

[deleted]
Last edited by ibrahimansari on Sun Oct 11, 2015 6:38 am, edited 1 time in total.
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Sat Sep 26, 2015 4:48 am

s4brains wrote:@Mequa,

This is a remarkable guide. I found the section on setting up Kodi particularly valuable. The version of Kodi in the personal repository pointed to in your discussion doesn't appear to have been compiled using the "--enable-libcec" compiler flag and hence there is no support for CEC remotes. This is disappointing to me as I am quite fond of the ability to be a couch potato with my TV's CEC remote in my hand. Did you compile this version of Kodi v14.2 yourself or did you repackage *.debs you found somewhere with altered information about dependency requirements?

Kodi v14.2 is notorious for a bug which causes an unresponsive blank screen on exit and the version in this repository suffers from this problem also. I found a partial solution with a "startkodi" script within "kodi-15.tar.gz" mentioned on this page viewtopic.php?f=66&t=109088. Using his script allows more than one startup and exit without a "blank" screen provided that video is not played during the Kodi session -- i.e. if you wish to play video, save work and exit all applications before starting Kodi. Then at the end of the Kodi session exit by selecting "Reboot" or "Power Down" to achieve a clean exit. Playing audio files does not seem to cause a blank screen.

I am very grateful for your research and great guide!

Best Regards,

s4
For me, when I click Exit, then I press Ctrl+Alt+F1 to switch to tty1 virtual console and then I press Ctrl+Alt+F7 to switch back to X session. Works for me, no script needed.

EDIT: I am using the unstable repository of the repository mentioned. To get it, add "unstable" at the end of the repository link. I got Kodi 15.1, no problems. CEC is working for me on Kodi 15.1... How come it isn't for you? When I installed 14.2 from the repository, it installed libcec2, which I didn't test, but it would have worked. 15.1 has libcec3 as a dependency, so it works for me too.
Last edited by ibrahimansari on Sun Oct 11, 2015 6:45 am, edited 1 time in total.
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Sat Oct 03, 2015 7:06 am

You might want to update the pepper flash. The link no longer exists. Use this link instead.
http://os.archlinuxarm.org/armv7h/alarm ... pkg.tar.xz
The instructions will need to change, but the flash works...
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

raspberrychimp
Posts: 1
Joined: Mon Dec 28, 2015 10:21 pm

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Mon Dec 28, 2015 10:34 pm

Thank you for this guide - it is really helpful! However, I am having some difficulty with the instructions for LXDE. I am running Unbuntu Mate 15.10 and have run the install command as instructed:

Code: Select all

sudo apt-get -y install lubuntu-desktop lxde
I do not see any error messages when performing this step but I do not see a menu choice for desktop when I log off. I do not know how to start using LXDE - I am using the log-off command in the Mate menu which logs off and leaves me a the gui login screen. I'm completely new to Pi and haven't really worked with *nix for about 15 years. Thanks again for all the help!

nomadewolf
Posts: 8
Joined: Tue May 06, 2014 5:13 pm

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Wed Dec 30, 2015 4:16 pm

Thanks for the guide.
Have you tested FullHD videos on youtube? How well does it work?

Cheers.

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Fri Feb 05, 2016 5:57 am

raspberrychimp wrote:Thank you for this guide - it is really helpful! However, I am having some difficulty with the instructions for LXDE. I am running Unbuntu Mate 15.10 and have run the install command as instructed:

Code: Select all

sudo apt-get -y install lubuntu-desktop lxde
I do not see any error messages when performing this step but I do not see a menu choice for desktop when I log off. I do not know how to start using LXDE - I am using the log-off command in the Mate menu which logs off and leaves me a the gui login screen. I'm completely new to Pi and haven't really worked with *nix for about 15 years. Thanks again for all the help!
There will be a logo of the MATE Desktop Environment (google it) somewhere in the top-right corner. Click on it and there will be options for the included MATE and then there will be options for Lubuntu, Lubuntu Netbook, and LXDE. Select Lubuntu and then login!
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Fri Feb 05, 2016 6:12 am

nomadewolf wrote:Thanks for the guide.
Have you tested FullHD videos on youtube? How well does it work?

Cheers.
720p is choppy and not very watchable, 1080p out of question. Even though the hardware supports 1080p video playback, the extra load added by Ubuntu MATE and the web browser makes the experience yuk. You can use Kodi, install it as per this guide, then open it and click the Addon button under Videos in the Home screen. Click "Get more" (or something like that) and scroll until you find YouTube. Select it and Install it. Then open it, go through the setup wizard, log in, and then go into the YouTube addon's settings and select 1080p as preferred quality. Enjoy YouTube in glorious 1080p!

P.S. Sorry for the lack of detail in my instructions, but I didn't need instructions to do this due to the user-friendliness of Kodi, so this is more than enough, but if you need help, I am here to help.
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

freakqnc
Posts: 9
Joined: Thu Feb 16, 2012 3:33 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Wed Feb 10, 2016 2:15 am

@ibrahimansari But if the solution is to install Kodi on top of Mate to get a video watching experience that won't suck, why not use Openelec, Raspbmc, OSMC or even install kodi on more lightweight distros like Raspbian (the official one by the way :))... I would have liked to love Mate, though as it stands now not only requires way too many hoops and loops hopping to be able to gain traction as an alternative distro that will be widely adopted, but it performs way too poorly given the better options avaialble to accomplish the same... maybe in future, if more powerful hardware will be available? Or perhaps could try using Odroid C1 which is almost 2x as fast as RPi2?

ibrahimansari
Posts: 82
Joined: Sat Aug 16, 2014 8:22 am

Re: Howto: setting up Pi 2 Ubuntu MATE with Raspbian softwar

Fri Mar 18, 2016 12:18 pm

freakqnc wrote:@ibrahimansari But if the solution is to install Kodi on top of Mate to get a video watching experience that won't suck, why not use Openelec, Raspbmc, OSMC or even install kodi on more lightweight distros like Raspbian (the official one by the way :))... I would have liked to love Mate, though as it stands now not only requires way too many hoops and loops hopping to be able to gain traction as an alternative distro that will be widely adopted, but it performs way too poorly given the better options avaialble to accomplish the same... maybe in future, if more powerful hardware will be available? Or perhaps could try using Odroid C1 which is almost 2x as fast as RPi2?
You got it. Use Kodi. But Lubuntu for Pi doesn't suck. I'm doing stuff that I do on my computer. Albeit laggy, works gr8. In fact, this post is from Lubuntu on a Pi. Go to Ubuntu Pi Flavor Maker. And yeah, even though their Ubuntu Server and Xubuntu versions aren't supported by Canonical and the Xubuntu team respectively, Lubuntu is. And their Ubuntu MATE is the same as the one on the Ubuntu MATE website. In fact, Ubuntu Pi Flavor Maker is made by Martin Wimpress, the same guy behind Ubuntu MATE and the Pi 2 version of it. But I'm waiting for my Pi 3. Yeah. No Odroid C1. Pi 3. Yep.
Edit: Chromium can't do 480p YouTube, even on Lubuntu. And ODROID C1 is not that fast over Pi 2. 1.1x at most. Because of the GPU it is faster. Pi 3 bro. Pi 3. But the GPUs are faster. Raspberry Pi Foundation needs to do something for this. I mean, CPU is fastest out there on Pi 3. But so crappy VideoCore IV??? I mean, yes it can do 1080p video playback but ODROID C1 is like 2 GPUs!!! And ODROID C2 3 GPUs????? Pi 4 with AMD Radeon R9 Nano pls.... :lol: :lol: :lol: Of course not R9 Nano (desktop class GPU really fast it's like 1.5 or 2x as big as Pi :lol: :lol: :lol: ) but at least a good GPU.
I is the master of Linux, Windows and the computer realms.
But always with a Pi(e). ;)

Return to “Other”