Running PulseAudio without X11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 > Is it possible to run PulseAudio without X11 (but not in system mode)?
 > I want to run Pulse on a headless server to do network sound, and
 > while system mode works, it's not supported (e.g. pacmd doesn't work).

There are two approaches:
 1)The simplest is to run:
       dbus-launch screen
   This uses screen as your CLI session manager with unlimited (pretty much)
   terminals, all of them under one dbus instance. Then run:
       pulseaudio --start
   in any of the terminals screen has open. pacmd will then work on the same
   or another screen terminal. I was able to start pulseaudio in one
   terminal, jack_control start in a second, pacmd and set the default
   sink to jack in another and finally run paplay to send audio from a
   wave file, though pulseaudio to jack and out the device. No I am not
   saying you should use jackdbus as well, paplay to pulse to speakers
   worked fine too.

 2)If you don't want to use screen for some reason (??!!??), I ran a script
   from /etc/rc.local as my audio user, that started dbus and saved the
   two environment variables to a file in the home directory. Then in
   ~/.profile I put (added):

   ------------------8<------------------
    if [ -f "$HOME/.bin/setsession" ]; then
        . "$HOME/.bin/setsession"
    fi

    export DBUS_SESSION_BUS_ADDRESS
    export DBUS_SESSION_BUS_PID
   ------------------8<------------------

   Then any VT or ssh login would use the same instance of dbus.

I did this before I had discovered screen. And it did work just fine,
however there is not much difference from ctl-a 0-9 and altF1 - altF9 and
screen will let you start it from one remote computer and then continue on
another with all the same set of terminals.

-- 
Len Ovens
www.OvenWerks.net



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux