Page 14 of 23
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Wed Mar 19, 2014 8:30 pm
by Andi
roobarb! wrote:This will always be the same - unless you've got root privileges, you can't mess with the system files. Only things in your user area.
But why is an auto-mounted external FAT32 drive mounted to root. Surely it would make more sense to be owned by the user "joggler"?
Just curious

Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 10:58 am
by gegs
Linux is very security conscious and network aware, that's one of the reasons it is so robust and an excellent choice for multi-user environments. Windows has become more like that with UAC because, even though the "are you absolutely sure you'd like to do this" messages are a tad annoying, it does make for a safer system and only admins are allowed to do certain things.
In a single-user linux system we are only one user in a theoretical local network and only the admin (root) account is allowed to do certain things, like change read/write/execute permissions on system directories, which your FAT32 drive is; it's system storage. The root account has to enable ordinary user rights to system folders because users typically only have full RWX permissions on files in their 'home' directory. The root account can grant privileges to ordinary users if it trusts them (e.g. not to fill system storage with family holiday videos or virus-riddled freeware).
In short, a FAT32 drive isn't mounted to root, it is mounted as system storage with safety in mind. The root account can change this behaviour on a per-user basis or grant permissions on a global basis by editing the etc/fstab file.
That's my understanding anyway but I'm sure others may have a more accurate and elegant explanation.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 11:37 am
by Andi
Perhaps I should have said "mounted as root", apologies.
I'm aware of Linux's security in mind, however, security is pointless if you have to constantly override it (and get an elevated power that you shouldn't use frequently) in order to perform a task of little to no risk.
This is a custom setup of Linux server. We're quite capable of controlling the default behaviour of the actions to make it an easier user experience. The majority of users will probably keep the user 'joggler' as the main account.
Forcing someone to have to sudo root in order to copy some MP3s is far more dangerous for the rest of the file system than mounting the FAT32 drive to a non-root user, and therefore allowing access without any risk to root-copy c0ck-ups.
Making people use root to edit fstab, again, is more dangerous than pre-configuring the auto-mount to the default user. Surely?
We should be making this build as user-friendly to the Joggler user. Not the Ubuntu community. Not to linux experts.
But without compromising security by forcing user of lower linux experience to overuse the root privileges. Root is disabled as a login for a reason!
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 12:50 pm
by gegs
Andi wrote:This is a custom setup of Linux server. We're quite capable of controlling the default behaviour of the actions to make it an easier user experience.
Can this be made to work by default for all filesystems on a USB hard drive? Or would we need to specify that a drive will automount with mode 0777 (RWX) only if NTFS or FAT32 filesystems are used?
TBH I gave up on automount permissions ages ago because I couldn't get it to work properly when I used a Joggler/USB hard drive setup as a NAS. I haven't looked into it much since then. I ended up running the necessary mount command in console every time I re-attached my drive or rebooted, which wasn't very often.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 12:55 pm
by Andi
Probably a question for Andy, the author, rather than me.
But I suspect so.
My NTFS drive didn't auto-mount, so I had to use fstab.
But it's permanently attached, and I knew all the settings from my previous server, which was a Raspberry Pi (which my Joggler has replaced).
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 1:13 pm
by roobarb!
gegs wrote:Andi wrote:This is a custom setup of Linux server. We're quite capable of controlling the default behaviour of the actions to make it an easier user experience.
Can this be made to work by default for all filesystems on a USB hard drive? Or would we need to specify that a drive will automount with mode 0777 (RWX) only if NTFS or FAT32 filesystems are used?
We use usbmount to deal with, surprisingly, mounting USB devices. However, there's a little hiccup here, in that the root filesystem is often on USB as well. It gets mounted by usbmount alongside any other filesystem on USB. This really needs to be prevented, but currently isn't - so if someone can answer how to do that, or an alternative to usbmount, that would be lovely.
Bearing the above in mind, you could
give this a try. It will tell usbmount to mount with the privs of the joggler (1000) use, but this will also apply to the root filesystem mounted by usbmount.
Re: SqueezeOS (Version 2) for OpenFrame/O2: USBIP
Posted: Thu Mar 20, 2014 10:03 pm
by roobarb!
roobarb! wrote:palindrom wrote:The Ubuntu Kernel Team's config policy is to disable experimental options until it is requested they be enabled. Based on the information requested in this bug, I have enabled the following in the Precise 12.04 kernel:
CONFIG_USBIP_CORE=m
CONFIG_USBIP_HOST=m
CONFIG_USBIP_VHCI_HCD=m
Did anyone of you succeed installing USBIPD?
@roobarb!: Is there any chance to have those parameters enables in some future release of SqueezeOS?
Sure, sounds like fun to me!

I should have a USB/IP-ready kernel for you tomorrow to apply to SQPOS v2. It'll be 3.10.33, so some twiddling in the boot files will be needed, but it should work just fine. It'll appear
here as
3.10.33op1_lucid when it's done.
NB. And you'll likely need to reinstall
rt2870sta-dkms afterwards too.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Thu Mar 20, 2014 11:17 pm
by Man in a van
For those using the nightlys;
you may be interested in this:
mherger
mherger is online now
Babelfish's Best Boy mherger's Avatar
Join Date
Apr 2005
Location
Switzerland
Posts
19,089
Help us achieve an official 7.8.0 communityrelease
I think it's about time to move on. Here's the link to the 7.8.0 release
candidates:
http://downloads.slimdevices.com/Logite ... _v7.8.0rc/
Please give them some testing. Unless some serious problem crops up,
I'll declare that build in-officially released in a few days

.
--
Michael
atb
Ronnie.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Fri Mar 21, 2014 12:52 am
by JimbobVFR400
Funnily enough just installed about an hour ago.
I have to say 7.8 has been running like a dream on my Joggler, I'd even go as far to say it's far more stable than 7.7 was before.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Fri Mar 21, 2014 12:04 pm
by gegs
I'd have to agree. I'm not using the latest nightly but 7.8 is really good; I upgraded to 7.8 at the same time as switching to Ethernet, using one of the ex-betting shop Jogglers as my primary server. Not sure how much of the improvement has been due to the new LMS and how much to being wired, but my setup is really superb. It doesn't feel or respond like a system hack, it feels like a professional proprietary networked sound system.
I've set up 7.8 on a Joggler for my brother-in-law and it is an amazing server to his 3 real Squeezeboxes. He has a high-end hi-fi system and the Qobuz addon playing FLAC has to be heard to be believed, so good in fact that he's taken out the £20 a month FLAC stream subscription.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sat Mar 22, 2014 11:16 am
by gegs
Before I fiddle around too much with my server setup or hassle Triode, has anyone had trouble with BBC radio streams? I can't get any BBC streams to play, either live or on demand. I also can't get BBC streams to play on the Radiofeeds UK & Ireland addon.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sat Mar 22, 2014 12:58 pm
by gegs
Never mind! I uninstalled the Triode iPlayer addon, restarted the server, reinstalled iPlayer, restarted the server and now all is well.
SqueezePlay OS Version 1.56
Posted: Sat Mar 22, 2014 4:10 pm
by palindrom
After updating to SqueezePlay Version 1.56 (SqueezeOS 2.06) my DACs, I tried several brands, are not playing any sound.
I assume I am missing some configuration:
Should I use Internal or External Interface (Interface Configuration); seems to make no difference any longer.
Playing around with the USB-Audio configuration is not doing the trick although it seems to recognize if I am exchanging the DAC.
Anny idea?
Edit:
Reset to defaults and enabling External Interface did the trick on one DAC.
The other one (USB PnP Sound Device) seems to miss the PCM Menu item.
Code: Select all
#/proc/asound/card1
USB Mixer: usb_id=0x0ccd0077, ctrlif=0, ctlerr=0
Card: C-Media Electronics Inc. USB PnP Sound Device at usb-0000:00:1d.1-2, full speed
Unit: 9
Control: name="Speaker Playback Volume", index=0
Info: id=9, control=2, cmask=0x3, channels=2, type="S16"
Volume: min=-7264, max=-16, dBmin=-2837, dBmax=-6
Unit: 9
Control: name="Speaker Playback Switch", index=0
Info: id=9, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 10
Control: name="Auto Gain Control", index=0
Info: id=10, control=7, cmask=0x0, channels=1, type="BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 10
Control: name="Mic Capture Volume", index=0
Info: id=10, control=2, cmask=0x0, channels=1, type="S16"
Volume: min=0, max=6096, dBmin=0, dBmax=2381
Unit: 10
Control: name="Mic Capture Switch", index=0
Info: id=10, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Unit: 13
Control: name="Mic Playback Volume", index=0
Info: id=13, control=2, cmask=0x0, channels=1, type="S16"
Volume: min=0, max=6096, dBmin=0, dBmax=2381
Unit: 13
Control: name="Mic Playback Switch", index=0
Info: id=13, control=1, cmask=0x0, channels=1, type="INV_BOOLEAN"
Volume: min=0, max=1, dBmin=0, dBmax=0
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sun Mar 23, 2014 3:08 pm
by robinmarlow
I have very happily had 2 jogglers running SPOS1. After upgrading one to SPOS2 I found it took quite a while to get all the menus back the way I had set them up. However this slightly puts me off doing the second! This is pure laziness but are the app settings transferable across versions? If so I could easily scp them across to my linux box to store them prior to updating. Or is this asking for trouble.
Thanks for the wonderful work you're doing on this - I find it even better than my SB3 that sadly died.
Robin
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sun Mar 23, 2014 4:01 pm
by gegs
Assuming you are running SqpOS v2 from a USB stick, would all the menus be the same if you took your SqpOS version 2 stick, made an image of it then wrote the image to a new stick? I've never done this before but can't think why it wouldn't work.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sun Mar 23, 2014 5:22 pm
by JimbobVFR400
gegs wrote:Assuming you are running SqpOS v2 from a USB stick, would all the menus be the same if you took your SqpOS version 2 stick, made an image of it then wrote the image to a new stick? I've never done this before but can't think why it wouldn't work.
There's a couple of things that could be an issue but possible to solve.
The Joggler gets a random MAC address at first boot which is then stored in a text file for subsequent boots. 2 devices with the same MAC is gong to confuse both your router and LMS.
The player name will be the same so will also need changing to avoid confusion.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sun Mar 23, 2014 7:26 pm
by palindrom
see next
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Sun Mar 23, 2014 11:14 pm
by gegs
I'd thought about the Squeezebox name problem but that's really simple to change. I never thought about the MAC address issue but should have.
Good info about where the user settings are; I think I'll back mine up to save time in future.
Re: SqueezePlay OS (Version 2) for OpenFrame
Posted: Mon Mar 24, 2014 4:58 pm
by palindrom
Hi All,
unfortunately the Joggler has no MAC address stored for eth0. Therefore a random MAC is generated during first start-up (after flashing).
But wlan0 has a MAC address.
To avoid a random MAC (=new DHCP IP) after any JogglerPlayOS reflash I recomend using the wlan MAC for ethernet adapter.
To maintain the same MAC address for WLAN and ETH is as well an need if you want to keep your settings (e.x. "DeskTop") after switch between WLAN and ETH.
just replace
/opt/squeezeplay/bin/sqp_JogglerNetwork.sh
Code: Select all
#!/bin/bash
# sqpnetapply v1.04 (21st June 2012) by Andy Davison
# Executed by JogglerNetwork - only used on SqueezePlay OS
DEBUG=0
readnetsettings() {
SETTINGS=`cat ~/.squeezeplay/userpath/settings/JogglerNetwork.lua 2>/dev/null`
LOOPVAR=${SETTINGS}
if [ "$SETTINGS" != "" ]; then
while echo $LOOPVAR | grep \, >/dev/null
do
LOOPTEMP=${LOOPVAR%%\,*}
LOOPVAR=${LOOPVAR#*\,}
VAR=`echo $LOOPTEMP | awk -F\= '{print $1}'`
VAL=`echo $LOOPTEMP | awk -F\" '{print $2}'`
[[ "$VAR" =~ "settings" ]] && NIC="$VAL"
[[ "$VAR" == "ssid" ]] && SSID="$VAL"
[[ "$VAR" == "psk" ]] && PSK="$VAL"
[ $DEBUG -eq 1 ] && echo "This is the VAR = $VAR"
[ $DEBUG -eq 1 ] && echo "This is the VAL = $VAL"
done
else
NIC="lo"
fi
[ $DEBUG -eq 1 ] && echo
[ $DEBUG -eq 1 ] && echo "The NIC is $NIC"
[ $DEBUG -eq 1 ] && echo "The SSID is $SSID"
[ $DEBUG -eq 1 ] && echo "The PSK is $PSK"
}
applynetsettings() {
# Build the interfaces file
echo "auto lo" > /tmp/interfaces.tmp
echo "iface lo inet loopback" >> /tmp/interfaces.tmp
echo >> /tmp/interfaces.tmp
echo "auto $NIC" >> /tmp/interfaces.tmp
echo "iface $NIC inet dhcp" >> /tmp/interfaces.tmp
if [ "$NIC" == "wlan0" ]; then
[ "$SSID" != "" ] && echo "wpa-ssid \"$SSID\"" >> /tmp/interfaces.tmp
[ "$SSID" != "" ] && echo "wpa-psk \"$PSK\"" >> /tmp/interfaces.tmp
fi
if [ "$NIC" == "eth0" ]; then
wlanmac=`ifconfig -a | grep "wlan" 2>&1`
if [ $? == 0 ]; then
wlanmac=`echo -n $wlanmac | awk -F\addr {'print $2'} | awk -F\ {'print $1'}`
ethmac=`ifconfig -a | grep "eth" | awk -F\addr {'print $2'} | awk -F\ {'print $1'}`
sed "s/$ethmac/$wlanmac/I" -i ~/.squeezeplay/userpath/settings/*.lua
echo "hwaddress ether $wlanmac" >> /tmp/interfaces.tmp
fi
echo >> /tmp/interfaces.tmp
echo "auto wlan0" >> /tmp/interfaces.tmp
echo "iface wlan0 inet dhcp" >> /tmp/interfaces.tmp
fi
# Overwrite the previous interfaces file
sudo mv /tmp/interfaces.tmp /etc/network/interfaces
sudo chown root:root /etc/network/interfaces
if [[ "$NIC" == "wlan0" ]] && [[ "$PSK" != "" ]]; then
sudo chmod 600 /etc/network/interfaces
else
sudo chmod 644 /etc/network/interfaces
fi
}
if [ "$1" == "apply" ]; then
readnetsettings
sleep 1
applynetsettings
sleep 1
sudo reboot
exit 0
elif [ "$1" == "reset" ]; then
rm ~/.squeezeplay/userpath/settings/JogglerNetwork.lua &>/dev/null
rm ~/.squeezeplay/userpath/settings/DesktopJive.lua &>/dev/null
rm ~/.squeezeplay/userpath/settings/SlimDiscovery.lua &>/dev/null
sudo rm /etc/network/joggler-eth
sudo rm /etc/udev/rules.d/70-persistent-net.rules
sudo touch /etc/udev/rules.d/70-persistent-net.rules
NIC="eth0"
applynetsettings
sudo chmod 644 /etc/network/interfaces
exit 0
elif [ "$1" == "mac" ]; then
readnetsettings
mac=`ifconfig -a | grep "$NIC" 2>&1`
if [ $? == 0 ]; then
mac=`echo -n $mac | awk -F\addr {'print $2'} | awk -F\ {'print $1'}`
echo -n "$mac"
else
echo -n "n/a"
fi
exit 0
elif [ "$1" == "ip" ]; then
readnetsettings
if [[ "$NIC" =~ "wlan" ]]; then
INTERFACE="Wireless"
elif [[ "$NIC" =~ "eth" ]]; then
INTERFACE="Ethernet"
else
INTERFACE=""
fi
IP=`ifconfig $NIC | grep 'inet addr' | awk -F\addr: {'print $2'} | awk -F\ {'print $1'}`
# Be really careful with this output. For any network fail the return MUST begin 'No network' for SetupWelcome applet.
if [ "$INTERFACE" != "" ] && [ "$IP" != "" ]; then
echo -n "$INTERFACE interface is active. Current IP: $IP"
elif [ "$INTERFACE" != "" ]; then
echo -n "No network address has been assigned to the $INTERFACE interface ($NIC)."
else
echo -n "No network has been configured or it is inaccessible."
fi
exit 0
else
echo "I've got nothing to do."
exit 0
fi
If wlan0 is no present the MAC settings are ignored. Otherwise this will force eth0 to use the wlan0 MAC after 'reset'
Re: SqueezeOS (Version 2) for OpenFrame/O2: USBIP
Posted: Sat Apr 05, 2014 11:02 am
by palindrom
roobarb! wrote:
I should have a USB/IP-ready kernel for you tomorrow to apply to SQPOS v2. It'll be 3.10.33, so some twiddling in the boot files will be needed, but it should work just fine. It'll appear
here as
3.10.33op1_lucid when it's done.
NB. And you'll likely need to reinstall
rt2870sta-dkms afterwards too.
@roobarb: THX!
Unfortunately I have not been successful exchanging the kernel. I should wait for the next (internal) flash image.
If you have some instructions on how to exchange it I'll give it another try.