SqueezePlay OS Recipes

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

SqueezePlay OS Recipes

Post by guidows »

First of all: Sorry for my bad English, I'm from Chile so my mother language is Spanish, and even that I do not speak well ;-)
and also, this is possible only because roobarb has made this fantastic option of having a minimal ubuntu lucid with squeezplay, from Chile: Thanks Dude!, and also to everyone of this forum members: I enjoyed lots playing with the Joggler.

Ok, first of the recipes:
How to install in the internal flash drive:

From Linux:
Boot from a Linux distro in a pendrive with enough space to download from http://birdslikewires.co.uk/articles/squeezeplay-os and uncompress the SqueezePlayOS.
as root in a linux console (that can be done using ssh)

dd if=./squeezeplayos.img of=/dev/mmcblk0
then reboot and is done.

From Windows:
If you don know so much about how to use Linux, this can be a easier option.
Boot from Mevi's XP SP3 distro.
http://www.jogglerwiki.com/forum/viewto ... ?f=2&t=305
You have to have enough space (at least 1.3 gigs). Is possible to resize the distro using PartitionMagic
Download and uncompress squeezeplayos
Download https://launchpad.net/win32-image-writer/0.1/0.1
Using win32imagewriter, write the .img file in the internal disk of the joggler. That is all.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

SqueezePlayOS first Steps
1)deprecated.

2) Ssh to the joggler user: joggler passwd:joggler

3) Change root passwd
sudo passwd

4) #login as root
su -

5) update apt-get
apt-get update

6) if you live outside uk, reconfigure the timezone
dpkg-reconfigure tzdata

7) Install some useful packages (if you don't know what screen is, I recommend you to learn about it)
localpurge: to remove unused locales (other languages)
ntfs-3g: to mount in readwrite mode ntfs disks
cifs-utils: to mount windows shares
screen: linux console multitasking
locate: to find things. To fill the database, is necesary to do a updatedb
links: console web browser

apt-get install cifs-utils screen

(with all)
apt-get install localepurge ntfs-3g cifs-utils screen locate links transmission-daemon lighttpd php5-cgi mysql-server mysql-client php5-mysql php5-gd unzip sdparm samba


sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http://cl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner

###### Ubuntu Extras Repo
deb http://extras.ubuntu.com/ubuntu trusty main

#------------------------------------------------------------------------------#
# UNOFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#


###### 3rd Party Binary Repos

#### Daniil's Bash Video Download - http://daniil.it
## Run this command: wget -q -O - http://dano.cu.cc/1Aci9Qp | sudo apt-key add - && sudo apt-get update
deb http://repo.daniil.it lenny main

#### Dropbox - http://dropbox.com
## Run this command: sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
deb http://linux.dropbox.com/ubuntu/ trusty main

#### exFAT PPA - https://launchpad.net/~relan/+archive/exfat
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A252A784
deb http://ppa.launchpad.net/relan/exfat/ubuntu trusty main

#### GetDeb - http://www.getdeb.net
## Run this command: wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
deb http://archive.getdeb.net/ubuntu trusty-getdeb apps

#### JDownloader PPA - https://launchpad.net/~jd-team
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A68F637
deb http://ppa.launchpad.net/jd-team/jdownloader/ubuntu trusty main

#### MKVToolnix - http://www.bunkus.org/videotools/mkvtoolnix/
## Run this command: wget -q http://www.bunkus.org/gpg-pub-moritzbunkus.txt -O- | sudo apt-key add -
deb http://www.bunkus.org/ubuntu/trusty/ ./

#### ownCloud Desktop Client - http://owncloud.org/
## Run this command: wget -q http://download.opensuse.org/repositori ... elease.key -O- | sudo apt-key add -
deb http://download.opensuse.org/repositori ... ntu_14.04/ /

#### Paissad's PS3 Media Server - http://deb.paissad.net
## Run this command: wget -q -O - http://deb.paissad.net/public-key.asc | sudo apt-key add -
deb http://deb.paissad.net unstable main contrib non-free personal

#### Webmin - http://www.webmin.com
## Run this command: wget http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
deb http://download.webmin.com/download/repository sarge contrib




--------
wget -q -O - http://dano.cu.cc/1Aci9Qp | sudo apt-key add - && sudo apt-get update
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A252A784
wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6A68F637
wget -q http://www.bunkus.org/gpg-pub-moritzbunkus.txt -O- | sudo apt-key add -
wget -q http://download.opensuse.org/repositori ... elease.key -O- | sudo apt-key add -
wget -q -O - http://deb.paissad.net/public-key.asc | sudo apt-key add -
wget http://www.webmin.com/jcameron-key.asc -O- | sudo apt-key add -
Last edited by guidows on Sat Jan 21, 2017 9:07 pm, edited 9 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

PROBABLY NOT STILL NECESSARY AS IN THE LAST SQUEEZEPLAY OS ARE THOSE THINGS DELETED

Making space in the Joggler

This part can be dangerous, a try and error process and a little bit dirty, but I have not have problems in a couple of weeks using it.

#remove unused packages, mainly developing packages. Remember, most of the software you can download using binary packages within of apt sources and if some program need a uninstalled program, it will be installed again.

apt-get remove libpango1.0-0 libpangoxft-1.0-0 libxft2 nano rsync x11-utils xbitmaps xterm zlibc

apt-get autoremove


#Remove other thing that are almost never used.
rm -rf /usr/src /usr/share/doc /usr/share/man /usr/share/doc-base

rm /usr/share/sounds/alsa/* /var/cache/apt/*.bin

rm -rf /var/lib/dkms/*


note that /apt/*bin is regenerated every time you do an apt-get update. If you don't plan to install any other thing, you can delete safely, and created it again when is necessary. Don't forget to do an apt-get clean to clean the apt cache folder


With this thing you can recover more than 360M.


OTHER

rm /usr/share/squeezeboxserver/Firmware/*
rm -rf /usr/share/squeezeboxserver/CPAN/arch/5.12/i386-linux-thread-multi-64int
rm -rf /usr/share/squeezeboxserver/CPAN/arch/5.14/i386-linux-thread-multi-64int
Last edited by guidows on Fri Feb 27, 2015 3:34 am, edited 9 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

NO MORE NECESSARY as you can install it directly from Squeezeplay in the advance options.


How to Install Squeezeboxserver

Is possible to install SqueezeboxServer or the latest Logitec Media Server. The main difference among both is that LMS serves the files in the Squeeze protocol and in the DLNA protocol, but its size is almost double. I prefer to install only the SqueezeboxServer to serve the SqueezePlay in the joggler and the other squeeze devices that I have in my home, and to install minidlna to server files to dlna compatible devices.

Is possible that you don't have enough space to download and install the file. Try to download the .deb installer in other filesystem like a network share or even a pendrive in the usb port of the joggler.

To install, simply download the .deb package and install it with dpkg -i. The package is a multi architecture package so you can save lots of space dropping other architectures but i386

wget http://downloads.slimdevices.com/Squeez ... 93_all.deb
dpkg -i squeezeboxserver_7.6.2~33593_all.deb


#deleting other architectures
cd /usr/share/squeezeboxserver/CPAN/arch/
ls
cd 5.10
rm -rf arm-linux-gnueabi-thread-multi/ powerpc-linux-thread-multi/ x86_64-linux-thread-multi/
cd ../5.12
rm -rf arm-linux-gnueabi-thread-multi/ powerpc-linux-thread-multi/ x86_64-linux-thread-multi/
cd ../5.8
rm -rf arm-linux-gnueabi-thread-multi/ powerpc-linux-thread-multi/ x86_64-linux-thread-multi/


Check if squeezeplay and server are working (http://joggler_ip:9000), if all is ok, also is possible to delete the folder /var/lib/squeezeboxserver/cache/updates/*
Last edited by guidows on Fri Apr 12, 2013 12:55 am, edited 1 time in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

NOT NECESSARY IF YOU INSTALL SQUEEZEBOXSERVER (IT DOES HAS A DLNA SERVER ITSELF)

How to install miniDLNA

apt-get install gnupg gnupg-curl

add the folowing lines to /etc/apt/sources.list

Code: Select all

deb http://ppa.launchpad.net/stedy6/stedy-minidna/ubuntu lucid main 
deb-src http://ppa.launchpad.net/stedy6/stedy-minidna/ubuntu lucid main 
Install minidlna (19.5MB)

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 661F5D0B
apt-get update
apt-get install minidlna
apt-get remove gnupg gnupg-curl


I don't know why, but is necessary to do a little dirty trick to start minidlna in each reboot. Edit the /etc/init.d/minidlna file and search for do_start() and add a "sleep 5"

Code: Select all

#
# Function that starts the daemon/service
#
do_start()
{
# Return
#   0 if daemon has been started
#   1 if daemon was already running
#   2 if daemon could not be started
touch $LOGFILE && chown $USER:$GROUP $LOGFILE || return 2
if [ ! -d $PIDDIR ]; then
mkdir $PIDDIR || return 2
fi
chown $USER:$GROUP $PIDDIR || return 2

#  ******  ADD HERE THIS LINE***********
  sleep 5     
start-stop-daemon –start –quiet –pidfile $PIDFILE \
–chuid $USER:$GROUP –exec $DAEMON –test > /dev/null \
|| return 1
start-stop-daemon –start –quiet –pidfile $PIDFILE \
–chuid $USER:$GROUP –exec $DAEMON — \
$DAEMON_ARGS \
|| return 2
}
Finally you can define where to search for the media editing the /etc/minidlna.conf file and then doing a
minidlna -R
to force a rescan


Evidently is hard to have many audio files in the joggler disk, so I recommend to have your music in a network share or external disk. In my case I have my files in a Apple TimeCapsule disk. If someone have one, this are the magical lines.

To mount the timecapsule share in SMB/CIFS protocol (windows) in the folder /media/capsule (previously created)

mount.cifs //SERVER_IP/FolderName /media/capsule -o pass=time_capsule_passwd

To add it "forever", edit the /etc/fstab file and add this line (using SERVER IP 10.0.1.1 and folder data)
//10.0.1.1/capsule /media/capsule cifs password=MY_PASSWD,sec=ntlm,iocharset=utf8,file_mode=0777,dir_mode=0777,rw,mand 0 0
the iocharset=utf8,file_mode=0777,dir_mode=0777 options are very important if you want to use the files with SqueezeServer.
Last edited by guidows on Fri Oct 27, 2017 10:11 pm, edited 3 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

How to install a Epson L110 printer

add to sources.list this line

deb http://us.archive.ubuntu.com/ubuntu/ trusty main

then http://askubuntu.com/questions/461506/d ... tion-stuck


driver epson-inkjet-printer-201207w


to have remote access to admin web

cupsctl --remote-admin
and

sudo usermod -aG lpadmin joggler

or check this webpage

http://injustfiveminutes.com/2013/11/07 ... min-inter/

for the cups admin password. Add the root or joggler user to the lpadmin group.

sudo usermod -aG lpadmin joggler

then use the joggler password to admin cups


airprint with:

apt-get install avahi-discover
Last edited by guidows on Tue Nov 28, 2017 4:12 pm, edited 7 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

How to install a Torrent Server

do an apt-get update and install the deamon

apt-get install transmission-daemon
edit /var/lib/transmission-daemon/info/settings.json and change the following lines (obviously in "mypass", put your torrent password)
"rpc-whitelist-enabled": false,
"rpc-password": "mypass",
edit /etc/init.d/transmission-daemon
this is another dirty and probably not safe trick, but is necessary if you want (as me) to download your torrent in a network share. Probably there are a better way, but for me it works.
#USER=debian-transmission
USER=root
finally, reload (NO RESTART, or you will lose the changes) the daemon:

/etc/init.d/transmission-daemon reload

The server can be access in http://joggler_ip:9091

Si el disco externo esta en ntfs. agregar a fstab
/dev/sda1 /media/disco ntfs-3g defauls 0 0
Last edited by guidows on Fri Feb 27, 2015 3:36 am, edited 3 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

Other programs can be installed as is usual in a Linux distro with little space, but even is possible to install all this things and a Lamp Server and still have 100MB free. Not bad to have a Safe Little Server. Do someone have other "recipes"?
User avatar
offbeatdave
Posts: 1046
Joined: Wed Mar 09, 2011 10:43 pm

Re: SqueezePlay OS Recipes

Post by offbeatdave »

Thanks for all these suggestions. I'll be having a look at them when I get a moment!
"EVERY DAY I'M JOGGLERING!"
Jogglering since Dec '09;
Tinkering with Jogglers since Feb '10 thanks to PMJ, Jogtools, PnP & sqpOS;
Gave something back Feb '12 to Apr '14 with PnP Mk II & PnP III;
Finally 'completed' PnP III Apr '15!
wywywywy
Posts: 19
Joined: Fri Apr 15, 2011 11:46 am

Re: SqueezePlay OS Recipes

Post by wywywywy »

I've got another one - to change the font!

Useful if you need another Unicode font with more languages (e.g. Chinese/Japanese/Korean) in.

- Find a normal font and a bold font (e.g. Arial Unicode and Arial Bold Unicode from Win 7), rename them to FreeSans.ttf and FreeSansBold.ttf
- Install SSH
- SFTP to it
- Go to /opt/squeezeplay/share/jive/fonts
- Replace the two fonts there
- Reboot
- Profit!
amjadkhan0988
Posts: 1
Joined: Thu Sep 27, 2012 11:21 am

Re: SqueezePlay OS Recipes

Post by amjadkhan0988 »

offbeatdave wrote:Thanks for all these suggestions. I'll be having a look at them when I get a moment!
yeah the suggetion is really nice... :ugeek:
james
Posts: 39
Joined: Mon Oct 10, 2011 7:42 pm

Re: SqueezePlay OS Recipes

Post by james »

This is very helpful. Thanks guidows
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

Installing a Photo Gallery with iOS compatibility

apt-get install lighttpd php5-cgi mysql-server mysql-client php5-mysql

configure php+mysql+lighttpd

vi /etc/php5/cgi/php.ini
add the line:
cgi.fix_pathinfo = 1

then
ln -s /etc/lighttpd/conf-available/10-fastcgi.conf /etc/lighttpd/conf-enabled/
ln -s /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/

download and install Gallery3 http://codex.galleryproject.org/Main_Page

cd /var/www
wget http://downloads.sourceforge.net/galler ... -3.0.5.zip

unzip gallery-3.0.5.zip
mv gallery3 photos

ok, I will use an usb drive as my web gallery folder. Also I will have all my pictures in the /media/usb0/www/fotos folder

mv photos /media/usb0/www

configure lighttpd with the /media/usb0/www/photos folder.

vi /etc/lighttpd/lighttpd.conf

add at the end

alias.url = ( "/picts/" => "/media/usb0/www/photos/" )

install gallery 3 going to http://joggler_ip/picts/installer

choose the image toolkit (can be graphicsmagick (28.5M) or php5-gd (1.2M).

apt-get install php5-gd

add your picts folder to gallery.
step 1: Administration > Settings > Modules > Server Add
step 2: put your pictures folders path in Settings > Server Add
step 3: add your pictures from the folder in Add > Server Add
your thumbs and re-sized pictures will be created in /media/usb0/www/gallery/var

Also, if you want to have videos in your server, you have to read this http://codex.galleryproject.org/Gallery3:Modules:ffmpeg


Finally, download the iMobile theme for compatibility with iOS fromhttp://galleryproject.org/node/101768 and install it.

cd /media/usb0/www/gallery/themes
wget http://galleryproject.org/files/imobile-v2.6.zip
unzip imobile-v2.6.zip


Admin > Appearance > Theme Choice

Also can be useful to read about http://codex.galleryproject.org/Gallery ... dispatcher

config is always in /index.php/admin





---LISTING

Open lighttpd configuration file:
# vi /etc/lighttpd/lighttpd.conf

Append / modify
server.dir-listing = "enable"

OR
dir-listing.activate = "enable"

Save and close the file. Restart lighttpd:
# /etc/init.d/lighttpd restart

To disable directory listing, use:
dir-listing.activate = "disable"
Last edited by guidows on Wed Jan 25, 2017 12:53 am, edited 8 times in total.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

minimal (and insecure) /etc/samba/smb.conf

cd /etc/samba
mv smb.conf smb.conf.bak

vi smb.conf


add the following lines

[global]
workgroup = joggler
server string = Joggler Server
netbios name = joggler
security = share
local master = no
preferred master = no

[usbdisk]
comment = Main USB External Disk
path = /media/usb0
public = yes
writable = yes
browseable = yes
guest ok = yes
force user = root

[other]
comment = other folder
path = /other_folder/
public = yes
writable = yes
browseable = yes
guest ok = yes
force user = root
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

static ip adress, for wifi interface.

vi /etc/network/interfaces
______

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-ssid "SSID"
wpa-psk "password"


new one, change de address and gateway for yours
______
auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 10.0.1.10
gateway 10.0.1.1
netmask 255.255.255.0
network 10.0.1.0
broadcast 10.0.1.255
wpa-ssid "SSID"
wpa-psk "password"
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

Automatic spindown of usb hard drive connected to the joggler.

(asuming that the usb drive is using the /dev/sda device)

vi /etc/cron.hourly/spin.sh
_________________
# !/bin/sh

# Get new state from diskstats
NEWstate=$(cat /proc/diskstats | grep sda)
echo $NEWstate > NEWstate.txt

# compare md5 sums
md5new=$(md5sum NEWstate.txt | sed 's/ .*//')
md5old=$(md5sum OLDstate.txt | sed 's/ .*//')

# if no changes, power down
if [ "$md5new" = "$md5old" ]; then
sdparm --flexible --command=stop /dev/sda &>/dev/null
fi

# Write current state to file
echo $NEWstate > OLDstate.txt
__________________________


chmod 777 spin.sh
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay OS Recipes

Post by johnnygal »

Hi guidows,

Thanks for your guides. I am trying to follow this one and have a few queries as I work through it, see below...
guidows wrote:Installing a Photo Gallery with iOS compatibility

apt-get install lighttpd php5-cgi mysql-server mysql-client php5-mysql

configure php+mysql+lighttpd

vi /etc/php5/cgi/php.ini
add the line:
cgi.fix_pathinfo = 1

cd /etc/lighttpd/conf-enabled
ln -s ../conf-available/10-fastcgi.conf .



download and install Gallery3 http://codex.galleryproject.org/Main_Page

cd /var/www
wget http://downloads.sourceforge.net/galler ... -3.0.5.zip

unzip gallery-3.0.5.zip
mv gallery-3.0.5 photos
Is this last line correct? I do not have a directory/file called gallery-3.0.5. I have a directory called "gallery3" that came in the zipfile. Do you mean this?
guidows wrote:
ok, I will use an usb drive as my web gallery folder. Also I will have all my pictures in the /media/usb0/www/fotos folder

mv photos /media/usb0/www

configure lighttpd with the /media/usb0/www/photos folder.

vi /etc/lighttpd/lighttpd.conf

add at the end

alias.url = ( "/picts/" => "/media/usb0/www/gallery/" )

install gallery 3 going to http://joggler_ip/picts/installer
How do I do install gallery3?
Is the alias correct? Has not the gallery directory been renamed to photos above?
guidows wrote:
choose the image toolkit (can be graphicsmagick (28.5M) or php5-gd (1.2M).

apt-get install php5-gd

add your picts folder to gallery.
step 1: Administration > Settings > Modules > Server Add
Where are these menus? I am working from the command line so far?
guidows wrote: step 2: put your pictures folders path in Settings > Server Add
step 3: add your pictures from the folder in Add > Server Add
your thumbs and re-sized pictures will be created in /media/usb0/www/gallery/var

Also, if you want to have videos in your server, you have to read this http://codex.galleryproject.org/Gallery3:Modules:ffmpeg


Finally, download the iMobile theme for compatibility with iOS fromhttp://galleryproject.org/node/101768 and install it.

cd /media/usb0/www/gallery/themes
wget http://galleryproject.org/files/imobile-v2.6.zip
unzip imobile-v2.6.zip


Admin > Appearance > Theme Choice

Also can be useful to read about http://codex.galleryproject.org/Gallery ... dispatcher

config is always in /index.php/admin
User avatar
johnnygal
Posts: 148
Joined: Tue Oct 11, 2011 1:07 am
Location: Stockport, UK

Re: SqueezePlay OS Recipes

Post by johnnygal »

OK, I think I have it now. http://joggler_ip/picts/installer is how to install it (I read it that this was the target directory for the installation rather than the installer).

And the Admin menu options are accessible from the gallery3 when viewed via the browser.


Thanks for your guides.
guidows
Posts: 52
Joined: Sat Jun 18, 2011 7:07 am

Re: SqueezePlay OS Recipes

Post by guidows »

:-)
pashuchen
Posts: 5
Joined: Thu Apr 25, 2013 4:40 am

Re: SqueezePlay OS Recipes

Post by pashuchen »

Thanks for your share。
Post Reply