Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu and presumably Debian install instructions. #956

Open
sudoxnym opened this issue May 21, 2024 · 0 comments
Open

Ubuntu and presumably Debian install instructions. #956

sudoxnym opened this issue May 21, 2024 · 0 comments

Comments

@sudoxnym
Copy link

sudoxnym commented May 21, 2024

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes. Linux instructions are incomplete.
When someone tries to run the

python -m pip install ledfx

(with proper python3 and pip3 if python and pip aren't found)
produces an error
If you try to install directly via pipx, it fails needing dependencies.

Describe the solution you'd like
A clear and concise description of what you want to happen.
Full clear instructions for installation

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I figured it out after 3 days

Additional context
Add any other context or screenshots about the feature request here.

Works on Ubuntu
Steps:
Install Dependencies

sudo apt-get install -y gcc \
            git \
            portaudio19-dev \
            pulseaudio \
            python3-pip \
            python3-venv \
            avahi-daemon \
            cmake

Install pipx

sudo apt install pipx

Install Ledfx

pipx install ledfx
pipx ensure path

Close your terminal and open a new one.

Run

ledfx

Launch ip:8888 in a browser to make sure the process started

Stop the process

ctrl c

Find service directory

which ledfx

Copy the output path

Create service

sudo nano /etc/systemd/system/ledfx.service

Add (CHANGE THE PATH to the which ledfx output keep the -v)

[Unit]
Description=LedFx Music Visualizer
After=network.target sound.target
Wants=sound.target
After=sound.target
Wants=network-online.target
After=network-online.target
StartLimitIntervalSec=0

[Service]
User=root
Type=simple
Restart=always
RestartSec=5
ExecStart=/path/to/ledfx -v

[Install]
WantedBy=default.target

Add root to pulseaudio group

sudo usermod -a -G pulse-access root

Enable pulseaudio as service for root

sudo nano /etc/systemd/system/pulseaudio.service

Add

[Unit]
Description=PulseAudio system server

[Service]
Type=notify
ExecStart=pulseaudio --daemonize=no --system --realtime --log-target=journal

[Install]
WantedBy=multi-user.target

Start pulseaudio and check status

sudo systemctl daemon-reload
sudo systemctl --system enable pulseaudio.service
sudo systemctl --system start pulseaudio.service
sudo systemctl --system status pulseaudio.service

Example output

● pulseaudio.service - PulseAudio system server
     Loaded: loaded (/etc/systemd/system/pulseaudio.service; enabled; preset: enabled)
     Active: active (running) since Tue 2024-05-21 10:57:59 MDT; 8min ago
   Main PID: 620 (pulseaudio)
      Tasks: 3 (limit: 4614)
     Memory: 31.6M (peak: 32.1M)
        CPU: 299ms
     CGroup: /system.slice/pulseaudio.service
             └─620 pulseaudio --daemonize=no --system --realtime `--log-target=journal

Start ledfx as service and check status

sudo systemctl --system enable ledfx.service
sudo systemctl --system start ledfx.service
sudo systemctl --system status ledfx.service

Inject the dependency for Hue Lights

pipx inject ledfx python-mbedtls

Reboot and test

sudo reboot

Open (host ip):8888
Make sure you have audio options in settings. If not, something wasn't done right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant