Jivelite on Joggler

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Jivelite on Joggler

Post by Man in a van » Thu Jan 17, 2019 10:35 am

Over here,

https://forums.slimdevices.com/showthre ... -a-Joggler

a couple of us are playing.

Any help would be appreciated.

I'm wondering if it would be able to utilise the internal version of SPOS, remove Squeezeplay and build Jivelite in its place.

A lot of people now use a raspberrypi as their LMS holder and just use the Joggler as a controller, this means that Squeezeplay shows as a player.

I realise that this is a minor annoyance in the scheme of things but it would be nice to disable the player function if possible and just retain the control part.

Any suggestions?

ronnie

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Thu Jan 24, 2019 4:28 pm

Hey folks,

Just been on a DM with Chill about all this - here's something that might help:

https://dl.birdslikewires.net/openframe/base/

Use the reflash system to write that to an OpenFrame1/Joggler internal memory and see if you can build a system based on that image. It's an up-to-date Ubuntu Bionic base image, the thing I've been SLOWLY working on for forever and a day. Network settings for wifi can be configured on the boot partition, it's reasonably self-explanatory.

BEWARE! It's very untested and also a bit bloated right now - there's only 200MB left on the internal memory to play with. If you're not compiling anything you could remove the linux-headers package, saving you about 40MB. Let me know if you find other things that can be easily removed, I've not had chance to go through and clean it.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

Chill
Posts: 14
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Thu Jan 24, 2019 10:35 pm

This is marvellous, thank you. It should be very useful in making bespoke builds.

I've been having a play this evening, but have hit some snags. Not surprising really, as I'm very new to the Linux world.

I do need to build a couple things, and the commands that have worked when booting from the base/server Ext4 Trusty image here are as follows:

Code: Select all

sudo apt-get install  git-core libluajit-5.1-dev libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libsdl-image1.2-dev libexpat1-dev

cd
mkdir luajit
cd luajit
git clone http://luajit.org/git/luajit-2.0.git
cd luajit-2.0
make
sudo make install
sudo ldconfig

cd
git clone https://github.com/ralph-irving/jivelite.git
cd jivelite
sudo make PREFIX=/usr/local
In no particular order, my snags so far :)
  • The 'apt-get install' line tells me it's going to fetch 453MB of files - yikes! That would obviously blow the available space. On my USB Trusty version, I ended up using xinit to launch jivelite, so I guess I might be able to do without the SDL libraries. No idea what expat1-dev is. I don't think xinit exists on this Bionic build, so that may eat up anything I save by not installing the SDL libraries.
  • When the joggler starts up, there are no users other than root. I've googled how to make a user, but is it necessary? Is there anything wrong in having a 'single-purpose' kiosk-type device running as root?
  • Strangely, some of the basic tools to carry out those steps aren't available, even though I can see that they're part of the image. For instance, 'make' doesn't seem to be available - I had to do a 'sudo apt-get install --reinstall make' to get that to work. Then it seems that gcc isn't available, and even though I can see a /usr/lib/gcc folder, I was unable to get it to work, even after adding that to the path.
  • I guess I could build Luajit and jivelite elsewhere - not sure what I'd have to do to install them on the bionic version though - and then I could do without the headers, to save some space. Could I also do without the libraries, or are they needed at run time as well as at build time? (I told you I was new to this!). If I install the versions that I built on the Trusty USB stick, would they work under Bionic?
I'm sure I'll be back with more questions, but if someone could get me past these first few issues I'd be very grateful.

Chill
Posts: 14
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Thu Jan 24, 2019 11:09 pm

I did some testing, by copying over my built version of Jivelite to the new Bionic install. It baulked instantly because it couldn't find libSDL-1.2.so.0. So unfortunately I've learned that the libraries are needed at run time, and Jivelite can't do without SDL. Shame. Space is going to be an issue.

User avatar
hawsey
Posts: 1918
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Jivelite on Joggler

Post by hawsey » Fri Jan 25, 2019 12:28 am

What about booting external from a tiny USB stick ?

Sent from my Moto G (4) using Tapatalk

Happy Joggling

User avatar
hawsey
Posts: 1918
Joined: Sun May 22, 2011 11:23 pm
Location: Northumberland

Re: Jivelite on Joggler

Post by hawsey » Fri Jan 25, 2019 12:34 am


roobarb! wrote:Hey folks,

Just been on a DM with Chill about all this - here's something that might help:

https://dl.birdslikewires.net/openframe/base/

Use the reflash system to write that to an OpenFrame1/Joggler internal memory and see if you can build a system based on that image. It's an up-to-date Ubuntu Bionic base image, the thing I've been SLOWLY working on for forever and a day. Network settings for wifi can be configured on the boot partition,
Many thanks for your hard work :-)
Any chance this base build will boot off external with a basic desktop at some point ?

Sent from my Moto G (4) using Tapatalk


Happy Joggling

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Fri Jan 25, 2019 8:49 am

roobarb! wrote:
Thu Jan 24, 2019 4:28 pm
Hey folks,

https://dl.birdslikewires.net/openframe/base/

Use the reflash system to write that to an OpenFrame1/Joggler internal memory and see if you can build a system based on that image. It's an up-to-date Ubuntu Bionic base image, the thing I've been SLOWLY working on for forever and a day. Network settings for wifi can be configured on the boot partition, it's reasonably self-explanatory.
Thanks roobarb!

Can I just pop it into an Openpeak2 Cisco Joggler?

ronnie

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Fri Jan 25, 2019 11:27 am

Chill wrote:
Thu Jan 24, 2019 10:35 pm
  • The 'apt-get install' line tells me it's going to fetch 453MB of files - yikes! That would obviously blow the available space. On my USB Trusty version, I ended up using xinit to launch jivelite, so I guess I might be able to do without the SDL libraries. No idea what expat1-dev is. I don't think xinit exists on this Bionic build, so that may eat up anything I save by not installing the SDL libraries.
Yeah, you're basically making a build environment - required to compile the software, not ultimately required to run it once complete. I'll roll another image you can pop on an external USB stick - this isn't the kind of thing to be done from the internal memory.
Chill wrote:
Thu Jan 24, 2019 10:35 pm
  • When the joggler starts up, there are no users other than root. I've googled how to make a user, but is it necessary? Is there anything wrong in having a 'single-purpose' kiosk-type device running as root?
Oh, you could debate that one for days. ;)

The proper answer is that you should create a standard non-sudo-privileged user and run your application as that user. That's best practice. However, you are right, this is a single-use device... but who's to say there's not code in something you're running that would read your wifi password and send it to a third party? You've read all the source code, right? :lol:

Go down the route of doing it properly, at least until you come unstuck. Just:

Code: Select all

adduser joggler
and then:

Code: Select all

su joggler
Use CTRL-D to back out to root.
Chill wrote:
Thu Jan 24, 2019 10:35 pm
  • Strangely, some of the basic tools to carry out those steps aren't available, even though I can see that they're part of the image. For instance, 'make' doesn't seem to be available - I had to do a 'sudo apt-get install --reinstall make' to get that to work. Then it seems that gcc isn't available, and even though I can see a /usr/lib/gcc folder, I was unable to get it to work, even after adding that to the path.
No, make won't be on there - just checked, it's not. Do a:

Code: Select all

apt install build-essential
for a working build environment with the basics.
Chill wrote:
Thu Jan 24, 2019 10:35 pm
  • I guess I could build Luajit and jivelite elsewhere - not sure what I'd have to do to install them on the bionic version though - and then I could do without the headers, to save some space. Could I also do without the libraries, or are they needed at run time as well as at build time? (I told you I was new to this!). If I install the versions that I built on the Trusty USB stick, would they work under Bionic?
Good questions!

Yeah, I'll put together a 4 or 8 GB version of the image so you can create a build environment on a USB stick. I'll upload it to the same place when it's done. Once you've built everything it should be a case of moving those binaries off the build system and on to the production unit - you'll then just need the non-development versions of those libraries installed on the production unit (assuming they've not been entirely built-in to the binary blob - a lot of the time they're linked, not copied in).
Chill wrote:
Thu Jan 24, 2019 10:35 pm
I'm sure I'll be back with more questions, but if someone could get me past these first few issues I'd be very grateful.
Only way to learn. Can't guarantee I'll be quick, but I'll try to keep bobbing in, see how things are going!
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Fri Jan 25, 2019 11:31 am

hawsey wrote:
Fri Jan 25, 2019 12:34 am
Any chance this base build will boot off external with a basic desktop at some point ?
Every chance, with any luck an 8GB image file should be appearing soon for tinkering. Install a desktop environment with apt and do startx or xinit and you should be off to the races. You can even use something tiny like matchbox-window-manager if you're after a single-use environment.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Fri Jan 25, 2019 11:32 am

Man in a van wrote:
Fri Jan 25, 2019 8:49 am
Can I just pop it into an Openpeak2 Cisco Joggler?
I... think so. The code for identifying an OF1 and OF2 is in there, I've just not done any testing. That image will be limited to 1GB unless you extend the root partition though.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Fri Jan 25, 2019 11:40 am

roobarb! wrote:
Fri Jan 25, 2019 11:31 am
hawsey wrote:
Fri Jan 25, 2019 12:34 am
Any chance this base build will boot off external with a basic desktop at some point ?
Every chance, with any luck an 8GB image file should be appearing soon for tinkering. Install a desktop environment with apt and do startx or xinit and you should be off to the races. You can even use something tiny like matchbox-window-manager if you're after a single-use environment.
I've just remembered, I built a script to install xorg which is on there already. Just:

Code: Select all

of-xorg-installer
should do a lot of it. It'll be sizeable though - and, once again, largely untested!
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Fri Jan 25, 2019 12:32 pm

Thanks for all the info an' stuff roobarb!

I had already found how to do the user bit

https://www.digitalocean.com/community/ ... quickstart

User avatar
roobarb!
Posts: 1492
Joined: Sat Mar 05, 2011 1:30 pm
Location: Manchester, UK
Contact:

Re: Jivelite on Joggler

Post by roobarb! » Fri Jan 25, 2019 1:57 pm

Man in a van wrote:
Fri Jan 25, 2019 12:32 pm
I had already found how to do the user bit
Good stuff. Those Digital Ocean tutorials are really good, they've got lots - all of which is just as applicable to Ubuntu Bionic on this platform as to a server.
birdslikewires.net - home of the Reflash System, SqueezePlay (OS) and various tools for the Joggler!

Chill
Posts: 14
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Fri Jan 25, 2019 2:53 pm

roobarb! wrote:
Fri Jan 25, 2019 11:27 am

Only way to learn. Can't guarantee I'll be quick, but I'll try to keep bobbing in, see how things are going!
Thank you, for your support and your builds. On the Squeezebox forum Ralphy has given some pointers on compiling Jivelite too, and has offered to help, so if we can't do it with all this support there's no hope for us!

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Fri Jan 25, 2019 6:28 pm

Got the new build apt-getting at the mo, thanks roobarb!

Just doing a quickie before the rugger ;)

ronnie

Chill
Posts: 14
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Sat Jan 26, 2019 10:55 am

Chill wrote:
Thu Jan 24, 2019 10:35 pm
I'm sure I'll be back with more questions, but if someone could get me past these first few issues I'd be very grateful.
As promised - some more basic questions.

Firstly, thanks for the 8GB USB version. I've got this working as a build environment, and have managed to build and run Jivelite, so I can now start to think about the build options (with Ralphy's help), and transferring the binary and its dependencies to the emmc version. But a couple of steps are eluding me at the moment.

1) In the Trusty versions I'd been playing with before, the terminal always started up with user 'joggler'. I've made that user in the new Bionic version, but the terminal always starts up with the root user. How do I change this behaviour?

2) In the Trusty version, I could autostart Jivelite at boot up by making a small script and adding a line to call that script at the end of /etc/rc.local. In the Bionic version, /etc/rc.local was missing (I think), and even though I created it and placed a call to my script, it doesn't work. So what's the best method of autostarting Jivelite under this Bionic version?

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 11:39 am

number two first

is this helpful?

https://linuxconfig.org/how-to-automati ... temd-linux


In my limited p[laying yestreday I installed xorg (what is already there) and on reboot I could log in as joggler (on the joggler) I'm going to try the desktop gui mentioned by roobarb! earlier in the thread.

ronnie

Other replies are most welcome ;) :)

Chill
Posts: 14
Joined: Mon Jan 21, 2019 10:05 am

Re: Jivelite on Joggler

Post by Chill » Sat Jan 26, 2019 12:49 pm

Thanks, yes, that seems to be the way to do it in Bionic. I'm nearly there - my standalone 'startjivelite.sh' script works from the command line, and I've made a 'startjivelite.service' that calls that script, and it seems to be trying to run it at boot - I can see the screen go blank for a moment as though xinit is trying - but it drops back out to a terminal screen.

Here's what I've got.

/home/joggler/startjivelite.sh:

Code: Select all

export JIVE_NOCURSOR=1
sudo -E xinit /home/joggler/jivelite/bin/jivelite

I've made this executable, and I can now execute it from the command line.

Code: Select all

chmod 744 /home/joggler/startjivelite.sh.sh
My service is in/etc/systemd/system/startjivelite.service

Code: Select all

[Unit]
#After=mysql.servic
Description = Starting JiveLite

[Service]
ExecStart=/home/joggler/startjivelite.sh

[Install]
WantedBy=default.target
I've installed and enabled this service:

Code: Select all

chmod 664 /etc/systemd/system/startjivelite.service
systemctl daemon-reload
systemctl enable startjivelite.service
I wondered whether the 'After=' line was important, but I don't know what order the services are started, so I don't know what the last one is. And anyway, if I try to start the service after the boot has completed, I get the same result.

What have I missed?

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 1:33 pm

Here is an example that I was given by a user on the wam when I was doing something on a pi.

I think it follows the sort of standard text for this type of script. Note, I only think, don't know!! :oops: :) :?

Hi Ronnie,

Superb progress! Well done. Here is how to (elegantly) running it as service (and enable boot start-up):

 - Create the file "/lib/systemd/system/spotify-connect-web.service" with the following content:

Description=Spotify Connect Web
After=network.target

[Service]
ExecStart=/home/pi/spotify-connect-web/spotify-connect-web.run
User=pi
Restart=always
RestartSec=10
StartLimitInterval=30
StartLimitBurst=20

[Install]
WantedBy=multi-user.target

Of course, spotify-connect-web.run file is the proposed start-up script, as you mentioned. Now, issue command "sudo systemctl daemon-reload" to reload systemd configuration.

- Enable the service during the startup with the command: "sudo systemctl enable spotify-connect-web.service"

- In order to start spotify-connect-web service use this command: "sudo systemctl start spotify-connect-web.service" to stop "sudo systemctl stop spotify-connect-web.service" or check the status "sudo systemctl status spotify-connect-web.service"

That should do it! and you will be all set to use the service as part of the system.

Man in a van
Posts: 284
Joined: Sun Aug 25, 2013 2:39 pm
Location: Staffordshire. UK

Re: Jivelite on Joggler

Post by Man in a van » Sat Jan 26, 2019 1:57 pm

Chill wrote:
Sat Jan 26, 2019 12:49 pm

Here's what I've got.

/home/joggler/startjivelite.sh:

Code: Select all

export JIVE_NOCURSOR=1
sudo -E xinit /home/joggler/jivelite/bin/jivelite
have you put the first line shebang in the script?

Post Reply