Home of the Squeezebox™ & Transporter® network music players.
Page 17 of 22 FirstFirst ... 71516171819 ... LastLast
Results 161 to 170 of 217
  1. #161
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    I reorganised things a bit, and finally managed to get the squeezelite applet working as I think it should. It detects whether squeezelite is running on either interface when it starts up, and sets Enabled/Disabled accordingly. I moved the external device selection off to a sub menu to make it easier to prevent access if squeezelite is already running.





    And I managed to get a working popup menu that disappears after the specified number of milliseconds, so I can now give a warning if squeezelite couldn't start on the selected USB interface.



    I've had this Joggler running with both the internal and external players enabled, synchronised, for a couple of hours, and the playback has been faultless, so evidently the Joggler is up to supporting two squeezelite instances.

    I think that'll do now. Which means I can't put off fixing the screensaver 'bug' (or at least 'unwanted behaviour') any longer. I loaded Sqeezeplay OS onto another Joggler this evening, and realised that the screensaver works exactly the same way - the 'whenOff' screensaver continues to respond to the power state of the previous player even after a different player is selected. So I guess I could live with this if I can't find out how to fix it, but it would be much better in my opinion if the screensavers always refer to the status of the currently selected player.

  2. #162
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    Had a bit of a rethink about running two instances of Squeezelite on the Joggler, and decided there was no situation where both a player on the internal speaker/3.5mm socket AND a player on the USB output would be needed. So that simplified the applet a bit, especially around the whole issue of matching the player's MAC address to the Jivelite MAC address so as to enable visualisations. It's also easier to understand from a user's perspective I think.





    There's also an internal digital interface, which I understand can be utilised by soldering a coaxial socket to the PCB, so it would be easy to add that output device to the list.

  3. #163
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    I had a go at tweaking the screensaver applet this evening. The issue was that the screensaver was responding to the power state of the previous player, rather than the current one - i.e. if I switched to a player that was off, but the previous player was still on, I'd get the 'whenStopped' screensaver rather than the 'whenOff' screensaver (and vice versa). This could be fixed by power cycling the current player.

    I've made a tweak that seems to fix this. I commented out the line that has my initials (CJH) and replaced it with the line below it.
    Code:
    function _getMode(self)
    	local player = appletManager:callService("getCurrentPlayer")
    	
    --CJH	if not self:isSoftPowerOn() and System:hasSoftPower() then
    	if not player:isPowerOn() and System:hasSoftPower() then
    		return 'whenOff'
    	else
    		if player and player:getPlayMode() == "play" then
    			return 'whenPlaying'
    		end
    	end
    	return 'whenStopped'
    end
    I must admit I don't understand what 'self' is referring to in this function, but evidently 'self:isSoftPowerOn()' does not reflect the power state of the current player after a change of player, whereas 'player:isPowerOn()' does. I also don't know what 'System:hasSoftPower()' does - what is the 'System' here?

    If there's a better way, such as updating 'self' somehow, I'm all ears.
    Last edited by chill; 2019-02-18 at 16:13.

  4. #164
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    I'm now at the stage where my Jivelite/Squeezelite installation on my Joggler is fully functional, based on Ubuntu 18, with an applet to control squeezelite, screensavers that work more intuitively, and a network applet that works with Netplan. I'm hoping to post a trial image soon. At the moment, however, everything runs as the root user, and I realise that there may be security risks with this. So some 'best practice' tips for this Linux novice would be appreciated.

    If I create a normal user, 'joggler' say, and add it to the sudo group, the user will be able to execute all the scripts that are used in the installation, but will often be prompted, even within those scripts, for a password. I believe I can set up the user such that it is never prompted for a password when 'sudoing', but if I do that is there any practical difference, security-wise, between this user and the root user?

    So I'm after advice. What's the best way to configure the Joggler? What exactly are the risks involved in running a networked 'kiosk'-type device as the root user?

  5. #165
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    Quote Originally Posted by chill View Post
    I believe I can set up the user such that it is never prompted for a password when 'sudoing'......
    I hadn't spotted that I can limit the scope of the NOPASSWD option. So in fact it looks like I can edit /etc/sudoers to give my 'joggler' user 'NOPASSWD' access to just the Jivelite/Squeezelite-related scripts and commands, by referencing specific scripts....

    joggler ALL=(ALL) NOPASSWD: /root/squeezelite/bin/j4j_squeezelite.sh

    ...or specific directories

    joggler ALL=(ALL) NOPASSWD: /root/jivelite/bin/

    ...or a combination of both.

    Is this the best way to approach this? I'll have a user, who is not root, who is logged in automatically at boot, who is a member of the sudo group, but who can run only the Jivelite/Squeezelite stuff without a password. I'll give it a try this evening, with a view to posting a trial image for download.

  6. #166
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    I gave up trying to make a 'joggler' user - giving 'NOPASSWD' sudo access to specific directories seemed to prevent the 'sudo -E' option (to pass environment variables) from working, so the only option seemed to be to give 'NOPASSWD' access to every command, and that didn't seem any more secure than running as root. So for now I'm sticking with running everything as root. But I did move all the executables and scripts out of the /root folder into the /opt folder, with a view to having another go at creating a 'joggler' user in the future.

    I've made a test image that can be loaded into the internal flash storage of the Joggler. It's available at www.cjh.me.uk/joggler. You can flash this to your Joggler using the reflash system available from Andy Davison's 'Birdslikewires' website. Make a USB stick from his reflash image, then copy the two files (the compressed image and the MD5 file) into the 'reflash' directory of the USB sick, and boot the Joggler with this USB stick inserted. The password for 'root' is 'joggler'. If you're worried about security you can SSH into the Joggler and use the 'passwd' command to change the password.

    I've tested the image on a fresh Joggler and it all seems to function. I'm reasonably confident that I've managed to erase any traces of my wifi credentials, but if you find them I'd appreciate a PM rather than a forum post!

    Hopefully you'll find the build fairly intuitive. When it starts up you need to select the language, then it will show you the home menu. There won't be much on that home menu until it connects to your network and finds your LMS. So go straight for the 'Settings' > 'Network' menu and choose your interface/enter your credentials etc, then 'apply and reboot'. The menus will populate when you then select a player from the 'Choose Player' menu.

    Squeezelite will be disabled initially - if you want to enable it go to 'Settings' > 'Squeezelite'. If you have a USB DAC plugged in, select one of the output devices that it offers, if not, just go with the 'sysdefault:CARD=MID' option, which is the built-in analog device. Squeezelite will initially be named 'Joggler', but if you select it as the current player with the 'Choose Player' menu, you can then use 'Settings' > 'Squeezebox Name' to rename it, and the new name will be written to /boot/JogglerPlayerName the next time the player is stopped (not paused).

    Any personal wallpapers need to go into /opt/jivelite/share/jive/applets/SetupWallpaper/wallpaper

    I'd welcome any feedback.

  7. #167
    Senior Member
    Join Date
    Feb 2008
    Posts
    4,542
    Quote Originally Posted by chill View Post
    I gave up trying to make a 'joggler' user - giving 'NOPASSWD' sudo access to specific directories seemed to prevent the 'sudo -E' option (to pass environment variables) from working, so the only option seemed to be to give 'NOPASSWD' access to every command, and that didn't seem any more secure than running as root. So for now I'm sticking with running everything as root. But I did move all the executables and scripts out of the /root folder into the /opt folder, with a view to having another go at creating a 'joggler' user in the future.

    I've made a test image that can be loaded into the internal flash storage of the Joggler. It's available at www.cjh.me.uk/joggler. You can flash this to your Joggler using the reflash system available from Andy Davison's 'Birdslikewires' website. Make a USB stick from his reflash image, then copy the two files (the compressed image and the MD5 file) into the 'reflash' directory of the USB sick, and boot the Joggler with this USB stick inserted. The password for 'root' is 'joggler'. If you're worried about security you can SSH into the Joggler and use the 'passwd' command to change the password.

    I've tested the image on a fresh Joggler and it all seems to function. I'm reasonably confident that I've managed to erase any traces of my wifi credentials, but if you find them I'd appreciate a PM rather than a forum post!

    Hopefully you'll find the build fairly intuitive. When it starts up you need to select the language, then it will show you the home menu. There won't be much on that home menu until it connects to your network and finds your LMS. So go straight for the 'Settings' > 'Network' menu and choose your interface/enter your credentials etc, then 'apply and reboot'. The menus will populate when you then select a player from the 'Choose Player' menu.

    Squeezelite will be disabled initially - if you want to enable it go to 'Settings' > 'Squeezelite'. If you have a USB DAC plugged in, select one of the output devices that it offers, if not, just go with the 'sysdefault:CARD=MID' option, which is the built-in analog device. Squeezelite will initially be named 'Joggler', but if you select it as the current player with the 'Choose Player' menu, you can then use 'Settings' > 'Squeezebox Name' to rename it, and the new name will be written to /boot/JogglerPlayerName the next time the player is stopped (not paused).

    Any personal wallpapers need to go into /opt/jivelite/share/jive/applets/SetupWallpaper/wallpaper

    I'd welcome any feedback.
    Congrats! I'd like to try this, but not too happy about the flash route. How about a usb boot image?
    LMS server: Pi Zero

    Amp: Denon PMA-50

    Players/Speakers: Touch, Logitech Radios, Sonos Play 1s & Beam, Libratone Zipp, GGMM E2 & E3, Yamaha WXAD-010, Loewe Airspeaker, Google Home Mini, Pioneer WX-SMA1, Roberts S1, O2 Joggler, Cisco Joggler

    Brexit = ∞ stupidity


    ------------------------------------------------------------------------------------

  8. #168
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,061
    Quote Originally Posted by castalla View Post
    Congrats! I'd like to try this, but not too happy about the flash route. How about a usb boot image?
    Yeah, I was thinking of having a go at that next. A job for tomorrow.

  9. #169
    Senior Member
    Join Date
    Feb 2008
    Posts
    4,542
    Quote Originally Posted by chill View Post
    Yeah, I was thinking of having a go at that next. A job for tomorrow.
    Great! Thanks.
    LMS server: Pi Zero

    Amp: Denon PMA-50

    Players/Speakers: Touch, Logitech Radios, Sonos Play 1s & Beam, Libratone Zipp, GGMM E2 & E3, Yamaha WXAD-010, Loewe Airspeaker, Google Home Mini, Pioneer WX-SMA1, Roberts S1, O2 Joggler, Cisco Joggler

    Brexit = ∞ stupidity


    ------------------------------------------------------------------------------------

  10. #170
    Junior Member
    Join Date
    Oct 2011
    Posts
    22
    It installed with no problems for me. Running great so far. I'm running with squeezelite on, but the volume off. I only want the vu meters and spectrum analyzer
    We're you working on a way to have the meters without squeezelite, or am I mistaken?
    Is there any chance of the grid skin from the jivelite on picoreplayer? I much prefer the bigger buttons.
    I'm loving the improvements to the meters and analyzer though. Thank you so much for all your efforts getting this out there

    Edit: I can't seem to find a setting to turn the screen off. Blank screen still has the backlight on.
    Last edited by Bogg; 2019-02-23 at 18:12.

Posting Permissions

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