| 59 | |
| 60 | == Full Setup == |
| 61 | Finally, we may want an xpra session to use a dedicated pulseaudio server. |
| 62 | This is more difficult and at present, unless you really know what you are doing and are prepared to pickup the pieces, you should not attempt to do this as a user which already has an existing dbus session and pulseaudio server. Simply clearing the environment and trying to start a new pulseaudio instance will not work without some serious hacks to the environment variable that pulseaudio uses to find existing instances. [http://winswitch.org/about/ winswitch] will do this for you. |
| 63 | [[BR]] |
| 64 | Now, assuming that you have a dedicated user, '''without''' any form of dbus or pulseaudio server running. You should be able to setup a sound-capable environment by using a command line similar to this one: |
| 65 | {{{ |
| 66 | dbus-launch xpra start :10 --no-pulseaudio \ |
| 67 | --start-child="pulseaudio --start --daemonize=false --system=false \ |
| 68 | --exit-idle-time=-1 -n --load=module-suspend-on-idle \ |
| 69 | --load=module-null-sink --load=module-native-protocol-unix \ |
| 70 | --log-level=4 --log-target=stderr" |
| 71 | }}} |
| 72 | Notes: |
| 73 | * the {{{--no-pulseaudio}}} flag is there to prevent old support code from firing - this may get removed in the future. |
| 74 | * you will need to use a tcp socket ({{{--bind-tcp=}}} or ssh forwarding to connect to this account - out of scope here. |
| 75 | * we may well introduce new xpra command line options to simplify this setup process |
| 76 | |
| 77 | You should then see these messages in the server log: |
| 78 | {{{ |
| 79 | (..) |
| 80 | D: [pulseaudio] main.c: Got org.PulseAudio1! |
| 81 | D: [pulseaudio] main.c: Got org.pulseaudio.Server! |
| 82 | I: [pulseaudio] main.c: Daemon startup complete. |
| 83 | 2013-01-07 17:42:55,732 xpra is ready. |
| 84 | }}} |
| 85 | And when connecting a sound capable client: |
| 86 | {{{ |
| 87 | I: [pulseaudio] client.c: Created 0 "Native client (UNIX socket client)" |
| 88 | (...) |
| 89 | 2013-01-07 17:44:32,205 will send sound using mp3 codec |
| 90 | (...) |
| 91 | 2013-01-07 17:44:32,309 starting sound using null.monitor |
| 92 | D: [pulseaudio] module-suspend-on-idle.c: Sink null becomes busy. |
| 93 | }}} |
| 94 | |
| 95 | And yet more log messages as your start a sound application in this xpra session. |