PDA

View Full Version : Here's how to get Pandora.com and other Flash 9 websites on your PS3 (sort of)



xaoslaad
7th December 2007, 04:47 AM
Follow the steps here and get pulseaudio working properly on your PS3.
http://forums.fedoraforum.org/showthread.php?t=174716

FOLLOW THESE STEPS IF YOUR DESKTOP IS RUNNING LINUX (x86) (see below for windows desktop)
This will work for other PPC systems as well. Say you have an old PPC Mac laptop you wish to use around the house and you want to access these websites, and have an x86 or x86_64 desktop, then you can take advantage of this guide to access Flash on the PPC laptop so that you aren't stuck at your desktop.

From here on in there will be steps carried out on the 'PS3' and on the 'Desktop'. Desktop will need to be a system running a Linux distribution making use of pulseaudio and has Firefox set up with a properly working Adobe Flash 9 browser plugin. In the case of my instructions Fedora 8 will be assumed for both. My desktop system is an x86 system, although an x86_64 system could probably work too.

1.) The first thing we will do is create a new user on Desktop. The purpose of this account is to login only from your PS3. This is not strictly necessary, however if you have a Firefox browser open on your Desktop as bob, then walk to your TV and try to start another Firefox session from your PS3 as user bob it will fail to start, telling you that "Firefox is already running, but is not responding..."

As root run the following commands on Desktop:


useradd pandora
passwd pandora


2.) On PS3 login as you normally would and run the following command to generate an ssh key.
When prompted for the file name keep the default.
When prompted for the passphrase hit return.
When prompted for the passphrase confirmation hit return.
Note it is probably not a wise idea in terms of security, however for the sake of automating this script leave the passphrase for the key blank. (If someone has some input for keeping this automated with a passworded key I'm all ears)


ssh-keygen -t dsa


3.) Copy the SSH public key to Desktop. Replace <desktop-ip-address> with the IP address of your desktop in the following command. You will be prompted for pandora's password on your desktop. Enter it, and the file should copy.


scp ~/.ssh/id_dsa.pub pandora@<desktop-ip-address>:/home/pandora/.ssh/authorized_keys2



4.) Now attempt to SSH into your desktop from your PS3. If your SSH keys are properly setup you should have logged in automatically without being prompted for a password.


ssh -l pandora <desktop-ip-address>


5.) If you were successful continue on, otherwise go back and check your work.

6.) Next copy your .pulse-cookie to Desktop so that it can connect to the sound server on your PS3. Run this command as root on your PS3:


scp ~/.pulse-cookie pandora@<desktop-ip-address>:/home/pandora/pulse-cookie


7.) On Desktop mv pulse-cookie to /etc and set the appropriate permissions. As root run the following commands.


mv /home/pandora/pulse-cookie /etc/pulse-cookie
chown pulse:pulse-access /etc/pulse-cookie
chmod 640 /etc/pulse-cookie


8.) Edit your /etc/pulse/client.conf so that it see the pulse-cookie file. Uncomment the line that reads 'cookie-file = /etc/pulse-cookie' and it should now read like the one below.
Example client.conf:


# $Id: client.conf.in 1285 2006-08-19 01:18:57Z lennart $
#
# This file is part of PulseAudio.
#
# PulseAudio is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# PulseAudio is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

## Configuration file for pulseaudio clients. Default values are
## commented out. Use either ; or # for commenting

## Path to the pulseaudio daemon to run when autospawning.
; daemon-binary = /usr/bin/pulseaudio

## Extra arguments to pass to the pulseaudio daemon
; extra-arguments = --log-target=syslog --exit-idle-time=5

## The default sink to connect to
; default-sink =

## The default source to connect to
; default-source =

## The default sever to connect to
; default-server =

## Autospawn daemons?
; autospawn = 0

### Cookie file
cookie-file = /etc/pulse-cookie

### Disable shared memory data transfer
; disable-shm = 0


9.) On Desktop add pandora to the pulse-access group so that it can properly access pulse-cookie. Change the line in /etc/group that reads:
pulse-access:x:495:root
to:
pulse-access:x:495:root,pandora

My GID is 495. Yours may be different, and you should leave it. You may also have other users in the pulse-access group and you should leave them. For instance if you have:
pulse-access:x:495:root,bob
simply append ',pandora' and change it to:
pulse-access:x:495:root,bob,pandora

10.) On Desktop, create a small script to set the environment and execute firefox. Create the file /home/pandora/pandora and make the contents:


export PULSE_SERVER=192.168.1.102
firefox


11.) Make it executable:


chmod +x /home/pandora/pandora


12.) Attempt to execute it from PS3


ssh -l pandora <desktop-ip-address> /home/pandora/pandora


Ideally Firefox should execute from your Desktop, Flash 9 websites should be accessible, and audio should play via your PS3/Television speakers rather than from your desktops.

You can save this command in a file, make it executable, and create a Launcher on your Desktop to access it. In this way, if everything works, you should be able to run Firefox from your Desktop on your PS3 and be virtually unaware that it is not running locally.

13.) If you are still having problems at this point I would suggest changing /etc/pulse/default.pa on your PS3 by making the line that reads:
load-module module-native-protocol-tcp
to:
load-module module-native-protocol-tcp auth-anonymous=1

I had a lot of trouble getting non-anonymous access working. My best advice if this last step works is to double check all your permissions and group settings, and try again with non-anonymous access. You can run it in anonymous mode, but potentially any system that can connect to your PS3 will be able to play audio through its speakers...


IF YOUR DESKTOP IS RUNNING WINDOWS
You have two possibilities. Use something like VMware Server, which is free, to install and run Fedora 8, and then use these steps. Or, you can use Windows XP/Vista and rdesktop to access your desktop and forward your audio to your PS3.

It's a bit less elegant because of the fact that you will have Windows running in a window on your Linux desktop, from which you can access pandora.com, but at the same time also works very well. You may be able to use seamlessrdp (www.cendio.com/seamlessrdp/) to open a browser window only similar to the Linux guide above, however I have never been able to get it working properly.

Note that there is a bug in rdesktop that causes in to hang anytime audio stops playing, especially in cases when you pause pandora.com or close the browser window. I have suggested a patch for this problem at https://bugzilla.redhat.com/show_bug.cgi?id=251084 however at this time it has not been applied to the package.

You can either download the patch available on bugzilla.redhat.com, apply it to the package, and rebuild it, or if you are unfamiliar with the process you may download the executable from me. Note that this is a PPC binary and will not work on an x86 Linux system.
http://www.montleon.com/rdesktop

Make sure desktop sharing is enabled on your Windows computer and that the appropriate firewall entries are made.

On your PS3 you can run rdesktop in this fashion in order to get audio to play on your PS3.


rdesktop <desktop-ip-address> -g 1280x900 -u <username> -p <password> -r sound:local


1280x900 is a pretty good resolution for Linux running at 1080i/1080p. Users running at 480i/480p/720p will probably want to shrink the resolution...

And finally...

This is a first draft guide so probably contains omissions and errors. Input is always appreciated. Same goes for my attempt at a pulseaudio guide for Fedora 8 on PS3 here:
http://forums.fedoraforum.org/showthread.php?t=174716

Both are very much works in progress.

Zero-Override
7th December 2007, 10:39 AM
i don't have a ps3 but i do care ;) any bit of information is worth something :)

xaoslaad
9th December 2007, 06:26 PM
Here it is for a Linux Desktop...