Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36
  1. #21
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,427
    That would make sense.

    Try putting the quotes into etc/init.d/squeezelite
    I expect the same could apply to the device specification (although in your case there are no spaces).
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  2. #22
    Senior Member
    Join Date
    Jan 2011
    Location
    Staffordshire. UK
    Posts
    4,426
    I have been playing with this, this morning

    I think that changing the name at SL_NAME is not the correct way. I tried it and had problems with restarting squeezelite

    I googled the argument and got a man page I did not understand , but think this line is referenced to the name of the actual device (eg raspberry) and it is the device name that should be changed (eg in raspi-config).

    I added this line to SB_EXTRA_ARGS (note, no gaps) and everything is fine

    Code:
     The name for the squeezelite player:
    SL_NAME="$(hostname -s)"
    
    # Defaults for squeezelite initscript
    # sourced by /etc/init.d/squeezelite
    # installed at /etc/default/squeezelite by the maintainer scripts
    
    # The name for the squeezelite player:
    SL_NAME="$(hostname -s)"
    
    # ALSA output device:
    SL_SOUNDCARD="default:CARD=Headphones"
    
    # Squeezebox server (Logitech Media Server):
    # Uncomment the next line if you want to point squeezelite at the IP address of
    # your squeezebox server. This is usually unnecessary as the server is
    # automatically discovered.
    #SB_SERVER_IP="192.168.x.y"
    
    # Additional options to pass to squeezelite:
    # Please do not include -z to make squeezelite daemonise itself.
    SB_EXTRA_ARGS="-a :::0 -n The_Player -r 44100"
    Name:  the_player.png
Views: 46
Size:  80.7 KB


    I could, of course, be completely wrong (not the first time )

    Just a thought, really

    ronnie

  3. #23
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    @ronnie, I think the player name defaults to the device name (hostname) but you can override it with either specifying it in the SL_NAME parameter or by using -n argument (as you have done) in the SB_EXTRA_ARGS parameter.

    I think the problem is with the parsing of the /etc/defaults/squeezelite file. It's either the space that's not liked, or perhaps the quote marks. Short of substituting (as you have with the underscore) or removing the space, I don't think there's any way around it. It wouldn't surprise me if embedding quotes in the additional arguments parameter...

    Code:
    SB_EXTRA_ARGS="-a :::0 -n "The Player" -r 44100"
    ...would equally lead to problems.
    Last edited by pantomnesia; 2021-06-16 at 07:28.

  4. #24
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,427
    If you post the entire contents of /etc/init.d/squeezelite (put inside code tags) then we can see what it does with it.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  5. #25
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,629
    Quote Originally Posted by Paul Webster View Post
    If you post the entire contents of /etc/init.d/squeezelite (put inside code tags) then we can see what it does with it.
    From the debian package
    Code:
    	# add squeezelite name if set
    	if [ -n "$SL_NAME" ]; then
    		DAEMON_ARGS="${DAEMON_ARGS} -n ${SL_NAME}"
    	fi
    The SL_NAME needs to have qutotation marks escaped if a name with spaces is to be used with squeezelite probably something like
    SL_NAME='"The Player"'
    or
    SL_NAME="\"The Player\""
    Last edited by bpa; 2021-06-16 at 07:43.

  6. #26
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    Quote Originally Posted by Paul Webster View Post
    If you post the entire contents of /etc/init.d/squeezelite (put inside code tags) then we can see what it does with it.
    This my working one...

    Code:
    # Defaults for squeezelite initscript
    # sourced by /etc/init.d/squeezelite
    # installed at /etc/default/squeezelite by the maintainer scripts
    
    # The name for the squeezelite player:
    #SL_NAME="$(hostname -s)"
    SL_NAME=Player
    
    # ALSA output device:
    #SL_SOUNDCARD="default:CARD=Set"
    SL_SOUNDCARD="sysdefault:CARD=Headphones"
    
    # Squeezebox server (Logitech Media Server):
    # Uncomment the next line if you want to point squeezelite at the IP address of
    # your squeezebox server. This is usually unnecessary as the server is
    # automatically discovered.
    #SB_SERVER_IP=""
    
    # Additional options to pass to squeezelite:
    # Please do not include -z to make squeezelite daemonise itself.
    SB_EXTRA_ARGS="-r 44100 -a :::0"

    Edit: the version that didn't work had

    Code:
    SL_NAME="The Player"

  7. #27
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,629
    Quote Originally Posted by pantomnesia View Post
    Edit: the version that didn't work had

    Code:
    SL_NAME="The Player"
    Not exactly sure of shell syntax fo escaping but your quotation marks are not escaped - either enclose by single quotes (my 1st example - hard to see) or use double quotes and escape the inner ones using backslashes \

  8. #28
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    Quote Originally Posted by bpa View Post
    The SL_NAME needs to have qutotation marks escaped if a name with spaces is to be used with squeezelite probably something like
    SL_NAME='"The Player"'
    or
    SL_NAME="\"The Player\""
    I can see what we're trying to achieve here. Sadly neither of these works and squeezelite doesn't start. I also tried...

    SL_NAME="\"The Player"\"
    and

    SL_NAME=`"The Player"`
    ...but no joy there either. I'll have a search and play around with the various ways of escaping the string.
    Last edited by pantomnesia; 2021-06-16 at 22:25.

  9. #29
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    20,629
    Quote Originally Posted by pantomnesia View Post
    SL_NAME=`"The Player"`
    ...but no joy there either. I'll have a search and play around with the various ways of escaping the string.
    The escaping mechanism can be picky - your 2nd example show you used character back tick ` and not single quote ' - single quote. Backtick is special character in shell scripts.

    Your backslash example also has an error
    SL_NAME="\"The Player"\"
    It shoudl be escaping the inner quotes

    Code:
    SL_NAME="\"The Player\""

  10. #30
    Junior Member
    Join Date
    Nov 2020
    Posts
    19
    Quote Originally Posted by bpa View Post
    The escaping mechanism can be picky - your 2nd example show you used character back tick ` and not single quote ' - single quote. Backtick is special character in shell scripts.
    I'm trying different things out, trial and error, simply because - as you say - it's picky.

    As I said earlier...

    Code:
    SL_NAME="\"The Player\""
    ...didn't work either.

Tags for this Thread

Posting Permissions

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