moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Pi's for Math education in South Africa - only need Flash!

Mon Oct 22, 2012 5:21 am

Hey,

Working on a project to try bring many pi's to over 80 disadvantaged/rural schools in South Africa with no access to computers. Pretty far a long on this project and then we run into flash...

I know it's meant to be impossible to get flash to run on it, though I have managed to get Youtube to work well. Also, following instructions on http://blog.christosoft.de/2012/08/flas ... pberry-pi/ I can get some basic flash web content to run..though very slowly. So it gives me some hope.

I just need to get http://www.mathsonline.com.au/students/ ... ountryId=7 to work. I don't understand why it just shows 'debug mode' on Iceweasel from my pi. We've also got literacy software which is also unfortunately Flash.

If there is absolutely any tiny chance that I can get the above flash to work from my Pi - no matter the cost, time or difficulty . please let me know..

These pi's can be so huge for education! It's such a shame so much of existing educational software (especially written specifically for South Africa) is Flash..

User avatar
teh_orph
Posts: 346
Joined: Mon Jan 30, 2012 2:09 pm
Location: London
Contact: Website

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 9:31 am

You could always use the Pi as a dumb terminal that is used for remote desktop. You could have each machine remote in to a single, more capable PC that's able to run Flash?

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 11:13 am

Quite why educational software written in closed source proprietary systems has ever been taken in to use is quite beyond me. FLASH is a classic example. It is inevitable that this kind of scenario would pan out eventually. Besides, closed anything is the antithesis of educational.

Also not that Adobe itself has announced that FLASH will no longer be supported on mobile devices. The Raspi is exactly such a mobile device.
Memory in C++ is a leaky abstraction .

User avatar
RaTTuS
Posts: 10613
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 11:15 am

Heater wrote:Quite why educational software written in closed source proprietary systems has ever been taken in to use is quite beyond me. FLASH is a classic example. It is inevitable that this kind of scenario would pan out eventually. Besides, closed anything is the antithesis of educational.

Also not that Adobe itself has announced that FLASH will no longer be supported on mobile devices. The Raspi is exactly such a mobile device.
not only that they have stopped flash development on any platform.
flash is a horrible ungodly mess and you should never have anything to do with it... IMO
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 11:43 am

I'm sure I'm missing some point in your narrative, but if you are really interested in only one Flash Video file, couldn't you convert it to some other format (that will play on the Pi)?

For example, when I want to play a YouTube vid on a system that doesn't play Flash, I use tools to:
1) D/l the file from YouTube as a .FLV
2) Convert the .FLV to .MP4

Could you do that with your file?
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 12:05 pm

Yep, I have downloaded youtube vids with a Python utility youtube-dl.py.

That gets me a .flv file which I then play with omxplayer like:

$ omxplayer -d -o hdmi 8HgejSCHRi8.flv
Memory in C++ is a leaky abstraction .

khulat
Posts: 105
Joined: Sun Feb 12, 2012 9:43 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 12:12 pm

Sadly those are Flash Websites and not simple Flash Videos.

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 2:21 pm

Hi, thanks for the responses.

Yes unfortunately they are not just flash videos, they are flash websites or large flash packages (I can get individual swf files to play).

I'm really interested in the fact that http://www.flashbynight.com/drench/ works on the pi but really slowly. I feel that with more power it could work. Can someone point me towards a guide on how to add more power through another bigger PSU?

teh_orph - that's something we'd really like to try because the pi's would be in a lab connected by LAN cables and it would be possible to have a more powerful pc in there. How powerful would the other PC need to be to have 20 pi's remote desktoping into it? Is that not possible? Won't the flash playback still be extremely slow since the pi has to process it?

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 2:57 pm

moolriaz,

You could set up a linux PC to run Firefox or Chrome that will handle your FLASH processing.
On your 20 or so Pi you use SSH to connect to the PC and forward X Windows graphics to the Pi.
on the Pi use the command:

Code: Select all

$ ssh  -X username@servername
Then on the Pi you can simply start Chrome or Firefox on the main PC and have it export it's window to the Pi.

Code: Select all

$ firefox
Or whatever command is required to get firefox running from the command line.

End result is that Chrom/Firefox runs on the PC which in turn runs FLASH, but their window is displayed on the Pi via the network.

Google for SSH and X Windows forwarding for further info.

It may be best if all of your students had their own user accounts on the Linux box and logged into them with ssh from the Pi.
Last edited by Heater on Mon Oct 22, 2012 2:59 pm, edited 1 time in total.
Memory in C++ is a leaky abstraction .

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 2:59 pm

The Pis computing power is not directly related to the power supply
used , especially if you do not overclock.

The Remote Desktop Server should better be a lightweight Linux distro
which supports the last Linux Flash player that was released by Adobe.
Then you should use Nomachine NX/FreeNX because that protocol is very lightweight.
Perhaps a Intel Core i3 with 4 GB RAM ? This is only my opinion , perhaps others
have better solutions.

The Flash content would be processed on the Server , and should not put any load
on the Pis.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:10 pm

Wow great! I am going to try the windows x forwarding now.
I have an ubuntu laptop , how can I get the ssh username@ip to work from the pi? What software do I need to install on the Ubuntu laptop?

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:25 pm

No need to install anything, open a terminal in Ubuntu:
ssh -X user@host (a big X not a small x)
Then start a program, for example the taskmanager:
lxtask &

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:38 pm

...

I can't believe how easy that was! It works. So all I need is the pi and other pc on the internet and their ip addresses?

Are you saying I could have 20 pi's in a room in South Africa and 1 PC in the US and have all the pi's sshing into the pc in the US and running their flash from there - with just the internet?

User avatar
PIstolero
Posts: 101
Joined: Mon Jul 23, 2012 6:28 am
Location: paradise city, where the grass is green and the girls are pretty

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:43 pm

Sorry, I didn´t understand right. I meant from RPi to a PC (forward a X11 program from raspbian to a PC) but you want to forward a X11 application from a Ubuntu server with the RPi as clients.
For this you have to install a ssh server on Ubuntu, Xauth and configure it with X11 forwarding, I don´t think that it will work out of the box, you will probably have to install & configure something.
Maybe the Ubuntu wiki is helpfull: https://help.ubuntu.com/community/SSH

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:54 pm

moolriaz,
Are you saying I could have 20 pi's in a room in South Africa and 1 PC in the US and have all the pi's sshing into the pc in the US and running their flash from there - with just the internet?
In theory yes.

In practice I wonder what happens.

You will need to have enough RAM on the server PC to be able to cope with that many connections each running a browser and the FLASH. You will have to have enough CPU power on the PC to crunch the browser and FLASH for all those connections. You will need to have enough bandwidth from PC to Pis to handle the X Windows forwarding.

Sounds like this calls for an experiment. I look forward to hearing your results.
Memory in C++ is a leaky abstraction .

W. H. Heydt
Posts: 13627
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 4:59 pm

There is another solution: gnash.

It handles flash content and runs on a Pi. It runs pretty slowly, but it runs. I suspect it will get considerably better--how much better would be an open question--when X acceleration using the GPU is ready for prime time.

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 5:00 pm

@moolriaz
Yes , this also works over the internet. You have to configure the
network of the server though (perhaps its just a router of your ISP , they're easy !).
If you don't rent a server from a hosting company , you might have do deal with
the fact that the IP address of your server changes. There are also security concerns
using SSH without some configuration.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 5:16 pm

@W. H. Heydt . I have tried Gnash and it is horribly slow. It simply it not useable.

@ghans. If I had the server or computer in the same room as the pi's in some sort of computer lab - it would be faster and more stable to ssh over a LAN right? That's possible?

@PIstolero : I'm not sure of the distinction. I have an ubuntu laptop, a windows laptop and a raspberry pi on my desk now. I found the IP address of my ubuntu laptop and of my pi. From the pi I simply ssh -X usernameOfUbuntuLaptop@ipAddressOfUbuntu run firefox and it works like a charm! Are you saying I could for example create an amazon EC2 ubuntu instance, have pi's ssh in there and have an automatic redirect from the ec2 page to the mathsbuddy webpage and that would also work? That sounds pretty fun.

Remember that the flash content the pi's are viewing are streamed from a webpage (mathsbuddy). So I would hope this takes less processing power....

Thanks for your help guys. I've also been able to run flash literacy software with this method.

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 5:21 pm

Of course working locally over your LAN will be more stable and have less latency thatn operating over the internet across the world. Give them both a try.
From the pi I simply ssh -X usernameOfUbuntuLaptop@ipAddressOfUbuntu run firefox and it works like a charm!
Excellent, you have it working already.
Are you saying I could for example create an amazon EC2 ubuntu instance, have pi's ssh in there and have an automatic redirect from the ec2 page to the mathsbuddy webpage and that would also work?
If your EC2 ubuntu instance is configured like your laptop for sure it will work. Not sure what you mean by the redirect or why you would need one. The browser on the EC2 instance would be surfing whatever page with FLASH you want. It's display will be forwarded over ssh to your Pi. Just as it is with your laptop set up now.
Memory in C++ is a leaky abstraction .

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 9:39 pm

Sorry got confused there...yeah I set up an ec2 and it ssh's in fine and runs the flash from firefox on there running from the US (fast net).

I tried to test it from South Africa also on another pi but my guy there only has a 44 inch screen and I think that's really slowing it down. So we'll be able to test it when he gets a new screen.

So the maths software is working - will try out the literacy one now which looks more flash intensive.

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Mon Oct 22, 2012 10:37 pm

moolriaz,

Fantastic, glad it worked so easily for you. I have had headscratching set up issues with this in the past.

Now you are going to see how heavily you can load this. Given that youo have Amazon cloud services at the source end that should not be a problem to scale up as needed. Then you just need to be sure of the bandwidth into the schools.

I think I have to try this for myself. I have only exported X from the Pi to a PC before, not the other way around.

I'd love to see some pics or a video of this working live when you have a class room full of kids some time.
Memory in C++ is a leaky abstraction .

moolriaz
Posts: 12
Joined: Wed Sep 19, 2012 8:04 pm

Re: Pi's for Math education in South Africa - only need Flas

Tue Oct 23, 2012 5:03 am

I got the flash literacy software to run off my ubuntu laptop through Wine.

When I ssh in and try run wine from the pi I get this error:


fixme:dwmapi:DwmIsCompositionEnabled 0x79cae0
err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL, expect problems
Direct3D9 is not available without OpenGL.
fixme:ddraw:DirectDrawEnumerateExA flags 0x00000001 not handled
err:ddraw:ddraw_create_swapchain Failed to create swapchain, hr 0x8876086c.
err:ddraw:ddraw7_SetCooperativeLevel Failed to create swapchain, hr 0x8876086c.
wine: Unhandled page fault on read access to 0x00000030 at address 0x7d1b456e (thread 0009), starting debugger...

Any hope of fixing this?

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Tue Oct 23, 2012 5:34 am

Oh boy, you are asking a lot there.

FLASH on Wine on Ubuntu through X Windows through SSH to the Pi. I fear that is asking to much.

From your error messages we see that your wine on Ubuntu does not have OpenGL support. So it looks like your FLASH thing is trying to use hardware accelerated graphics through Direct3D9 which implimented using OpenGL in wine. Without that everything stop right there.

I suspect getting that to work on your Ubuntu, let alone though SSH may be hardwork and it may require a specific graphics card. Have a Google for OpenGL and wine to try and find out if it is even possible.

Even if it did work I guess it would not get through the ssh X forwarding. After all an SSH tunnel is not a graphics card. No idea if or how that might ever work. Actually thinking about it maybe the fact that the SSH tunnel does not support OpenGL is what is causing the errro message and failure.

Finally, at the end of the day I suspect that if it did work at all it would be very slow.
Memory in C++ is a leaky abstraction .

ghans
Posts: 7883
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Pi's for Math education in South Africa - only need Flas

Tue Oct 23, 2012 12:15 pm

Flash is available as non-free package for Ubuntu AFAIK.
Why jump through hoops and use WINE ?

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Heater
Posts: 16864
Joined: Tue Jul 17, 2012 3:02 pm

Re: Pi's for Math education in South Africa - only need Flas

Tue Oct 23, 2012 12:18 pm

moolriaz,

Actually what do you mean by "I got the flash literacy software to run off my ubuntu laptop through Wine."

Is that FLASH in a browser running under wine or is it some FLASH player application that normally runs directly on Windows?

Not sure why you would want to do the former and the later seems pretty unlikely to work.
Memory in C++ is a leaky abstraction .

Return to “General discussion”