Hi eyeryone
and first of all: I am very sorry for grubbing out this oooooold thread. i came here years ago when i prepared the RuneUI for party. i just did a few manipulations on the css files, mostly
display:none
and now i am about to prepare the UI once again. So i can make a few suggestions on this topic, but if i am right, we need a complete different build as my changes to the configurations are really not the majorities choice i guess.
Now I am working with a RaspPi3 - and because the device comes with WiFi onboard, i thought about using the RaspPi as an WiFi Access Point that provided all network services (DHCP and DNS) and that redirects every request to the
http://runeaudio.
OK, lets get started with an update of the software lists, assuming you found out how to connect via SSH. (btw: if you dont know what i am writing about, you should not continue here.)
Connect the Pi via LAN to your network - we will work on the configuration of the wlan interface.
Install the Software
pacman -Sy
pacman -S dnsmasq
pacman -S hostapd
configure hostapd
nano /etc/hostapd/hostapd.conf
with the following lines
ssid=Party
# wpa_passphrase=12345678
interface=wlan0
driver=nl80211
channel=7
echo "DAEMON_CONF="/etc/hostapd/hostapd.conf" > /etc/default/hostapd
systemctl enable hostapd
configure dnsmasq
In the file
nano /etc/dnsmasq.conf
you have to edit several lines:
interface=wlan0
dhcp-range=10.1.0.50,10.1.0.200,12h
address=/#/10.1.0.1
(
source, thx!)
activate the service with
systemctl enable dnsmasq
now the DNS server returns the IP of the device only, but this wont have an effect on the URL. we need some redirects to be done by
ngix
nano /etc/ngix/ngix.conf
[…]
# DISPLAY section [/]
server {
listen 80;
server_name *.de *.com *.net *.org *.at *.uk ;
return 301 http://runeaudio;
}
# server {
# listen 80;
# server_name *.*.*;
# return 301 http://runeaudio;
# }
server {
listen 80 default;
add_header X-UA-Compatible "IE=Edge,chrome=1";
server_name runeaudio;
access_log /var/log/runeaudio/runeui_access.log;
[…]
at last we have to set up an IP for wlan0 with
ifconfig wlan0 10.1.0.1
. there must be a config file for this, but i am to lazy to look it up, so i set up an autostart script for the systemd:
[root@runeaudio ~]# cat /etc/systemd/system/ifconfig.service
[Unit]
Description=Set IP of interface wlan0
[Service]
Type=oneshot
ExecStart=/root/autostart-ifconfig.sh
[Install]
WantedBy=multi-user.target
and the corresponding .sh
#!/bin/sh
# just set an IP for interface wlan0
ifconfig wlan0 10.1.0.1
dont forget to
chmod +x /root/autostart-ifconfig.sh
and to
systemctl enable ifconfig.service
may be there are some better ideas how to get this work, feel free to share your thoughts!
OK, now we can use the WiFi AP and all requests will be redirected to runeaudio. now we have to "secure" our RuneUI:
CSS
I added a few lines to /srv/http/assets/css/runeui.css
/* Party customization */
li a[href="#poweroff-modal"] {
display: none;
}
li a[href="/credits/"] {
display: none;
}
li a[href="/debug/"] {
display: none;
}
/* disable the menu */
#menu-settings {
display: none;
}
/* disable all playback options on folders */
.db-folder > i {
display: none !important;
}
a[data-cmd="lastfmaddreplaceplay"]{
display: none;
}
a[data-cmd="addreplaceplay"]{
display: none;
}
a[data-cmd="addplay"]{
display: none;
}
#context-menu-file > ul:nth-child(1) > li:nth-child(2){
display: none;
}
#context-menu-file > ul:nth-child(1) > li:nth-child(3){
display: none;
}
#context-menu-file > ul:nth-child(1) > li:nth-child(4){
display: none;
}
to disable some buttons and menus.
JS
I dont want the "add and play" feature on double clicks or double taps, so i changed it to simple "add":
// double click on Library list entry
db.on('dblclick', 'li', function(e) {
var el = $(this);
if (!$(e.target).hasClass('db-action')) {
$('li.active', '#database-entries').removeClass('active');
el.addClass('active');
var path = el.data('path');
// console.log('doubleclicked path = ', path);
if (el.hasClass('db-spotify')) {
path = el.attr('data-plid') + '-' + el.attr('data-path');
getDB({
cmd: 'spadd',
path: path,
querytype: 'spotify-track'
});
} else {
path = (el.hasClass('db-dirble')) ? path.split(' | ')[1] : path;
getDB({
cmd: 'add',
path: path
});
}
}
});
so far so good! these are my suggestions. within the css there are some more things we can do, e.g. removing the "remove from queue" button or the "delete queue" one. but all in all these steps make it a really cool jukebox device for your party!
but you should not forget that this is not a secure solution. via the URL /settings/ all your guests can change the options there and i always recommend to use passwd after the first login or - better - the usage of ssh keys.
I dont see any chance to include these settings into RuneOS. But we can write an installation script for all of this…
So - at the end of this posting i like to say:
Thanks to the Rune team - what you provide here is outstanding!