Aug 212013

Aka how to view YouTube videos on your Raspberry Pi from Midori or Chromium!


We have pulled together some software magic and are proud to announce an easy installation procedure for PiVid, the YouTube / HTML5 Video / VeeHD Raspberry Pi video enabler:


Open a shell – for instance LXTerminal, if you are working on the Raspberry Pi desktop, it can be opened by double-clicking the LXTerminal icon – and enter the following commands:

Step I: Please add our Repository

sudo wget -O /etc/apt/sources.list.d/
sudo wget -O - | sudo apt-key add -
sudo aptitude update

This will:

  • set up our repository as an additional package source on your Raspberry Pi (your main sources.list will not be modified in any way)
  • get our public key
  • fetch the available packages from our repository server

Step II: Install PiVid

sudo aptitude install pivid

This will:

  • install PiVid and dependencies (other packages which PiVid requires to work)

Please press “Enter” when asked whether you want to continue, and once again “Enter” during the installation process of the youtube-dl package, when asked to.

Step III: Activate PiVid

service pivid start

This will:

  • start the pivid service (it talks to your browser and to omxplayer to play your video)

If you want to stop the pivid service, simply use “service pivid stop” – this will save a small amount of computing resources.

Step IV: Install PiVid in your browser

Install PiVid in Midori:

To use the userscript in Midori (Raspbians default browser), you have to activate the “User addons” extension. Start Midori. Open the preferences dialog (Menu>Preferences), select the Extensions tab and tick “User addons”. (“User addons” is the very last entry, use the scroll bar to find it). Click “Close”.

Then simply open the script ( file:///usr/share/pivid/replace.user.js ) in your browser (copy & paste the link into your URL bar, and press enter) and click “Install user script” when asked.



Install PiVid in Chromium:

To install pivid in Chromium, please open a shell in the X desktop environment (e.g. LXTerminal), and start Chromium like this:

# chromium --enable-easy-off-store-extension-install /usr/share/pivid/replace.user.js


Please click “Continue”, and then click “Add” on the “Confirm New Extension” dialogue:


Chrome will confirm, that the extension has been added.


Please note: after every reboot, you need to start the pivid service, as described above. Open LXTerminal, and (as user pi), enter:

service pivid start

You can close LXTerminal after starting the service, if you want. If the service pivid is already running, it will tell you so – you don’t need to worry about entering it twice by accident.

Starting PiVid will open a web server on your Raspberry Pi’s port 3000. This will be accessible on your local network – and can be used to control video playback (of external URLs) on the Raspberry. This is by design, and we plan to release more documentation about this soon.



Navigate to a YouTube video (for example: Xcylin, shooting with a frickin’ laser). First, the browsers will display “Flash Player missing”, but after some seconds, the web site should reload, and display the PiVid play button, as seen above for Chromium.

Simply click this button, and the video should launch in a short while. This will be indicated by a “pause” button:


If you want to see the video again, please reload the page – PiVid currently can’t identify when the video has stopped playing.  The pause button currently has no function, but you can use omxplayer keyboard control (see below).


VeeHD is an alternative video hosting platform / community, sporting an interesting selection of movies, documentaries, etc.

PiVid supports playback on VeeHD. You may need to log in as a VeeHD user for some videos to work, and some videos are hosted on very slow servers – where streaming is impossible with PiVid. Please download the video and play it with omxplayer instead.

Usage: Search with the VeeHD search, and click on the video you would like to see. PiVid will show you the play button after a short while:


Omxplayer keyboard control

Space or p = Pause / Resume
– / + = Decrease / Increase Volume
q = Quit


Problem handling

YouTube play button not showing

If the PiVid play button does not show up on a YouTube video, instead of the warning about an incompatible browser, please try to simply reload the page – it should show up now.

Restarting the service

If you run into any unexpected problems using the software, try restarting the pivid service:

service pivid restart

If this does not help, try restarting your Raspberry, and starting the service after that. If still stuck, comment below. (Use “pivid” instead of “service pivid start” to see some advanced debugging output).


Please note, that update-rc.d can’t be used right now to install the service as autostart on boot – we are investigating the cause and will release an update soon. (pivid service will start, but without video playback.) Please use the manual starting method ( service pivid start ) in the meantime – thank you!


PiVid works as a server (written in the uber-cool Node.JS), which will display an IFRAME in your browser. Through a user script, the browser can submit the URL needed to retrieve and play the video. Once you click on the “play” button, PiVid will invoke some software incantations (sprinkle the equivalent of magic fairy dust – we’re building on the shoulders of giants – you guys know who you are :-) – and voilà – the video location will be passed to omxplayer, the trusty workhorse of Raspberry Pi video playback!

You can, of course, fork us on GitHUB.

By the way – we have also packaged a newer version of Node.JS to go along with PiVid on our repository – package name is “nodejs”. Stay tuned for more about this.

The idea for PiVid was taken from a very similar client-server approach, which was coded in Python, but seems to be abandoned now. Thank you for the inspiration!


Apr 272013

If you have a powerful primary machine (for instance a Dell notebook with an Intel Core i7 processor), it can easily run several Operating Systems and user sessions in / on them side by side – virtualisation is the magic of today’s computing.

The Raspberry Pi, whilst not having enough general purpose power to do really pleasant desktop computing, can very well serve as a “window” to Windows, Linux, MacOS and other more exotic systems running elsewhere. You could run several users off a powerful server machine – all you need is some networking gear, monitors, mice, keyboards, and of course Raspberry Pis.

Your users will enjoy an absolutely silent and energy-efficient client, while the noisy server is hidden away in the basement somewhere (or is in the admin’s room).

Access Windows from the Raspberry Pi

Today we will show you how to access a virtualised Windows desktop from the Raspberry Pi.


On the host computer which will run the Operating Systems and user sessions for the Raspberry Pi terminals, you should install Oracle’s VirtualBox. (If you are not a fan of Oracle, remember that this was not developed by them but by SUN, and rebranded later on).

The host computer ideally should have hardware virtualisation extensions in the processor, which will allow the guest systems to run much more fluently.

We assume that you run Windows 7+ on the host. VirtualBox also works on Linux, though.

Run VirtualBox, and set up a Windows virtual machine (how to do this is outside the scope of this document).

Networking setup

Here’s the important part to know: initially the virtual network adapters for your virtual machine are set up as “NAT” devices. To be able to access RDP and all other parts freely on your network, the network adapter should be set up as “Bridged Adapter”.


This will connect it directly to your network – the machine will be seen outside of the host computer. If you have a DHCP server running, Windows by default will fetch it’s IP address from the DHCP server (e.g. your router).

To be able to access the virtual machine without looking up it’s address first, we recommend to assign a static IP for it ( outside of the area your DHCP server uses to assign IPs).

This is done by right-clicking on the network adapter in Windows, bringing up it’s properties, and editing the IPv4 properties. Whilst being mostly outside of the scope of this short how-to, I’ll share a screenshot with you, which should help you:


adjust your settings accordingly.


The current IP address of your windows computer can be determined by hitting the Windows key, writing “cmd”, pressing Enter (to bring up the command line), and the following command:




RDP Setup

This part can also be applied to physical machines running Windows.

To allow remote connections to your Windows machine, you have to enable RDP connections first. This is done by hitting the Windows menu, right-clicking on “Computer”, selecting the entry “Properties”.

In Windows 7, you have to click on “Remote settings” in the sidebar of the window which you will see. The dialogue which comes up, will allow you to configure RDP settings.


Select “allow connections from computers running any version of Remote Desktop (less secure)”. Click “OK”.

Creating new user

If you do not have a password protected user in your virtual Windows installation yet, you should set one up. You can either create an admin user or a regular Windows user. Using these credentials you will be able to connect to the machine later on. Of course you can also create a new password for the user you already have, if you have decided not to use a password initially.

Raspberry Pi

Start an X session:


Launch the root shell (start menu > Other > X-Terminal as root (GKsu).

Update apt package cache (if you don’t have aptitude, use apt-get):

aptitude update

Install rdesktop package

aptitude install rdesktop

After rdesktop is installed, it is literally just one short command to connect to your virtual Windows desktop:


Just replace the IP address with the IP address of your Windows virtual box.

Rdesktop will start a window and allow you to log in to your Windows virtual box. You can click on “Other user” and insert your login credentials here. If another user is logged in at the main machine / via another terminal, Windows might request you to wait for 30 seconds so the other user might allow or disallow your connection.

If you want to launch a full-screen session, you can use the –f switch

rdesktop -f

Forwarding sound of the Windows machine to the Raspberry is also possible. Unfortunately it will sound horrible (choppy / barely understandable) – I am not sure what the reason is, as the Raspberry Pi processor is not maxed out (e.g. when streaming Web radio). The sound will sound the same over HDMI and analog output (tested today).

rdesktop -r sound=local

Some further options will improve your experience:

rdesktop -z -x lan -P

These switches have the following meaning:

-z: enable compression

-x lan: set experience to “LAN” (will show desktop wallpaper, windows while moving them etc.)

-P: enable caching to disk (i.e. the Raspberry Pi’s disk)

Some screenshots






YouTube will run, but very choppy – it will max out the Raspberry Pi’s processor. (This is a software problem – rdesktop is probably not using the efficient GPU of the Pi for processing). Sound quality is horrible, actually you can’t really understand it – it’s all chopped up. Sound quality will improve if you minimize YouTube (thereby limiting screen updates which are required, and lowering the load on the Raspberry processor). Sound will still sound choppy, though. All in all not good enough right now.


As mentioned above, sound quality (if forwarding sound) will be nearly unbearable. Maybe there are some better solutions (i.e. combining a sound streaming server which captures the sound and plays it back on the Pi).

The sound unfortunately will not improve if setting the Group Policy, and forcing sound quality to “high” on Windows. (use gpedit.msc)


The sound problems seem to occur from buffer underruns on the Raspberry Pi side. (see below, xfreerdp).

Desktop experience

Especially with the optimised parameters (-z –x lan –P) the experience is really smooth. For word processing, spreadsheets and web browsing, you will be pleasantly surprised by the reaction speed.

Drawing & photo manipulation will be doable, but in a test with Paint, there was some slugginess.

Actually I see a huge potential in classical desktop / web application workspaces – where you don’t need multimedia, i.e. in a call center where people use web forms and interfaces to access your account with the company.


xfreerdp is an alternative RDP client. You can install it using

aptitude install freerdp

And use it

xfreerdp -u Wanda -x l -z --plugin rdpsnd --data alsa --

Please note the “x” in front of freerdp here.

This will connect with the user “Wanda”, enable LAN experience, enable compression (-z), and activate sound forwarding through the rdpsnd plugin. The two double dashes after “alsa” and before the IP of the host virtual machine ARE necessary.

Sound will still sound horrible – it will spew out a lot of “underrun occurred” messages on the console. We have tested different options to decrease load, increase latency, use the tsmf option, etc – nothing changed the horrible quality. Right now, the verdict stays the same: great for desktop computing, but not at all for multimedia applications.

There may be some improvement with the current GIT version of freerdp. We have not tested it yet.

Jan 312013


This is actually a quite accurate prediction of what we have now. And all of it is possible with the Raspberry Pi minicomputer! You can have a look at the current news, the weather, your stocks – of course provided by the Internet, and free of charge to you. Printing websites is easy, you just attach a printer …

If you want to see someone while you are talking to them, you can use Skype.

Closed Circuit Television – also possible with webcams. One Pi drives a webcam, and the other can access it over the network. Or even the Internet via IPv6 … truly there are no limits!

The only thing this “office of the future” did not hit spot on: there’s only ONE device to do it all – and it can be small enough to fit into your pocket (smartphone). Yes, the world’s knowledge is at your fingertips!

Optimization WordPress Plugins & Solutions by W3 EDGE