Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 47
  1. #1

    squeezelite start playing music on startup

    Is it possible to get squeezelite to start playing music on startup on ubuntu?

  2. #2
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    3,282
    I don't see why not; edit the squeezelite settings.sh accordingly

    If you want some help then provide details, some one with an Ubuntu install will maybe assist you.

    ronnie

  3. #3
    This is indeed possible, but on a regular Ubuntu/Debian installation you might run into hassles with the ownership of the sound device when running Squeezelite, especially when more users are active on the system. Even setting up the Pulseaudio version of Squeezelite is in that use case not always straight forward.

    Please provide some more info on your system, so we can help.
    Last edited by zordaz; 2020-04-20 at 11:26.
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

  4. #4
    It's my htpc so only one logon user. I've got it to start when i log on through startup application (path/squeezelite -o pulse start)
    The user auto logon on startup, but I use kodi to put it to sleep when not being used, so I have to write password to wake it up.
    Will control whats being played thru the duet remote or web gui.

    Anything else you need to know?

  5. #5
    Quote Originally Posted by teebee View Post
    Anything else you need to know?
    Yes, have you installed Squeezelite via the Ubuntu repositories or manually via an other source?
    In both cases: Which Ubuntu version and which Squeezelite version are you running?
    I expect some basic start/stop scripts will do in your setup, this info is just to be sure and for trouble shooting purposes.
    Last edited by zordaz; 2020-04-20 at 11:43.
    Living Room: HifiBerry DAC+ Pro & piCorePlayer
    Attic: HifiBerry DAC+ RCA & piCorePlayer
    Kitchen: SB Radio
    Other rooms: 4x SB Radio

  6. #6
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    3,282
    Quote Originally Posted by zordaz View Post
    I expect some basic start/stop scripts will do in your setup, this info is just to be sure and for trouble shooting purposes.

    I have, previously used these scripts by Gerrelt, they worked with a 32 bit Debian install.

    http://www.gerrelt.nl/RaspberryPi/wo...r-on-raspbian/

    I used .......squeezelite-1.9.2.1165-i686.tar.gz downloaded from Ralphy's repo

    and changed the file names from -armv6hf to -i686

    in two places

    Code:
    sudo nano /etc/init.d/squeezelite
    and

    Code:
    sudo nano /etc/systemd/system/squeezelite.service
    The squeezelite_settings.sh will allow the OP to play at start up

    Hope this helps (and is applicable)

    ronnie

  7. #7
    Quote Originally Posted by zordaz View Post
    Yes, have you installed Squeezelite via the Ubuntu repositories or manually via an other source?
    In both cases: Which Ubuntu version and which Squeezelite version are you running?
    I expect some basic start/stop scripts will do in your setup, this info is just to be sure and for trouble shooting purposes.
    I'm on Ubuntu 18.04.4 and lms reports squeezelite Firmware: v1.8 if that helps. installed it from ubuntus apt-get if i remember correctly.

    Quote Originally Posted by Man in a van View Post
    I have, previously used these scripts by Gerrelt, they worked with a 32 bit Debian install.

    http://www.gerrelt.nl/RaspberryPi/wo...r-on-raspbian/
    Tried this guide and I almost reinstalled ubuntu. The service wanted to start as root and wanted password. I never got squeezelite to work as root only as logged on user. I couldn't get it to call for that service even if I deleted the service file. Seems like one of the files calls for it somewhere. After removing all the files from that page and putting back the original I got it working again.


    A workaround might be installing squeezelite on a pc I have running 24/7 and then sync these players.

  8. #8
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    3,282
    @teebee

    I made a minimal install of ubuntu and on reboot squeezelite did not appear.

    Was this the message you got ?


    Code:
    login as: ronnie
    ronnie@192.168.1.41's password:
    Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 5.3.0-46-generic x86_64)
    
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    
    
     * Canonical Livepatch is available for installation.
       - Reduce system reboots and improve kernel security. Activate at:
         https://ubuntu.com/livepatch
    
    0 packages can be updated.
    0 updates are security updates.
    
    Your Hardware Enablement Stack (HWE) is supported until April 2023.
    Last login: Tue Apr 21 10:22:09 2020 from 192.168.1.6
    ronnie@shuttle:~$ sudo /etc/init.d/squeezelite status -l
    [sudo] password for ronnie:
    cat: /sys/class/net/wlan0/address: No such file or directory
    cat: /sys/class/net/eth0/address: No such file or directory
    ● squeezelite.service - Squeezelite LMS player
       Loaded: loaded (/etc/systemd/system/squeezelite.service; enabled; vendor preset: enabled)
       Active: inactive (dead) since Tue 2020-04-21 10:43:06 BST; 2min 30s ago
      Process: 714 ExecStop=/etc/init.d/squeezelite stop (code=exited, status=0/SUCCESS)
      Process: 650 ExecStart=/etc/init.d/squeezelite start (code=exited, status=0/SUCCESS)
     Main PID: 708 (code=exited, status=0/SUCCESS)
    
    Apr 21 10:43:05 shuttle sudo[665]: pam_unix(sudo:session): session opened for user root by (uid=0)
    Apr 21 10:43:05 shuttle sudo[665]: pam_unix(sudo:session): session closed for user root
    Apr 21 10:43:05 shuttle squeezelite[650]: Starting: /usr/bin/squeezelite-x86_64  -o hw:CARD=Control,DEV=0 -n shuttle -P /var/run/squeezelite-x86_64.pid -z
    Apr 21 10:43:05 shuttle squeezelite[650]: with pidfile: /var/run/squeezelite-x86_64.pid
    Apr 21 10:43:05 shuttle systemd[1]: Started Squeezelite LMS player.
    Apr 21 10:43:05 shuttle squeezelite[714]: cat: /sys/class/net/wlan0/address: No such file or directory
    Apr 21 10:43:05 shuttle squeezelite[714]: cat: /sys/class/net/eth0/address: No such file or directory
    Apr 21 10:43:05 shuttle sudo[722]:     root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/squeezelite-x86_64 -t
    Apr 21 10:43:05 shuttle sudo[722]: pam_unix(sudo:session): session opened for user root by (uid=0)
    Apr 21 10:43:05 shuttle sudo[722]: pam_unix(sudo:session): session closed for user root
    ronnie@shuttle:~$
    ronnie

  9. #9
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    18,558
    Could sharing audio would be part of this issue ?

    Logged on user may "own" the default audio device exclusively. A "root" application may not be able take it away and use it.

    Way to test this would be to have a second USB audio dongle not used by any process and see if root can output to it.

    You may be able to bypass this by using OSS (or maybe Pulseaudio) and not ALSA

  10. #10
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    3,282
    I installed alsa tools

    I have installed LMS on the Ubuntu

    stared Squeezelite

    Code:
    sudo /etc/init.d/squeezelite start


    Code:
    ronnie@shuttle:~$ ps -A |grep squeeze
     1847 ?        00:00:00 squeezeboxserve
     1849 ?        00:00:35 squeezeboxserve
     3659 ?        00:00:09 squeezelite-x86
    ronnie@shuttle:~$
    and it does work

    Name:  Screenshot from 2020-04-21 11-19-36.jpg
Views: 78
Size:  78.6 KB

    ronnie

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •