Clock display on UI?

You don’t need the install process on github, just folow my install guide.
But wait until v1.1 is released.

I think you missed step 2. of the install process, sudo su.
But let me check.

nope i used sudo su , but i heard from others that we better can’t use it because it could
screw up your (installation on ) sd i think it safer to create a real installer.

best regards,
dvo

Screw up sd card?! Lol, not really. :joy:
When you “think” it is better to create a “real” installer, so please do it :+1:
I tested the installer and it worked. The only thing was that some packages was missing. This will be fixed with v1.1. But i am very busy ATM.

Not was is meant by DVO.
Never run some random code in elevated mode with sudo su. Only do this for pieces where volumio hasn’t the proper rights, with sudo . Just blind performing tasks as sudo su might overwrite parts that blocks access for non SU account, which indeed can cause a installation to break down, not the SD card.

Source?
Edit:
New Version v1.2 with some additional checks and installing the missing packages:

Check the new Readme.txt for install instructions. Installation is now done with “sudo”.
Is it better this way?

I had not much time to test it. So please report if something is wrong.

ATM still only ARM (RaspberryPi) is supported. But of course supporting other platforms is also possible. Option 1 is to build “gluqlo” every time from source during installation. But this needs the whole build environment and waste a lot of space. Option 2 is to build precompiled versions of “gluqlo” for each arch and install them depending on the installed arch.

just some common knowledge. you can google it.

still doesn’t work like you discribe :

Installation:

  1. Extract the files from Volumio-Saver_vX.Y.zip to /tmp on the raspberry
  2. Log in to console
  3. Run the install script: sudo /tmp/install.sh i

Permission problem (you can see it when you do a “ls -l”). The zip file does not keep permissions. But i can not upload tar.gz (which keeps the permissions) here because it is not allowed. :crazy_face:
I will try to fix this with a work a round in v1.3.

flipboard is hanging some times… so you will see a half flipped digit.

i fixed your install got it working … added permissions chmod : 766 on all files in /tmp/.
and this as install.sh

install.sh
#!/bin/bash
# Volumio-Saver install script by The_Raven v1.2
# History:
# v1.0 Initial Version
# v1.1 Added missing Libs, added some checks (root, display plugin and arch)
# v1.2 Small cosmetic bug fixed

# Available switches
if [ "$1" = "" ]; then
echo -e "\033[1;36mNo action given. Please use:\033[0m"
echo -e "\a\033[1;37;37mTo install:\033[0m sudo /tmp/install.sh i"
echo -e "\a\033[1;37;37mTo remove:\033[0m sudo /tmp/install.sh r"
exit
fi

# Check if we have root permissions
if [[ "$EUID" != "0" ]]; then
  echo -e "\a\033[1;37;31mError: \a\033[1;37;37mWe are not root, please run with sudo. Aborting...\033[0m"
  exit
fi

# Check if Display-Plugin is installed
if [ ! -e "/opt/volumiokiosk.sh" ]; then
  echo -e "\a\033[1;37;31mError: \a\033[1;37;37mDisplay-Plugin not detected. Please install it first. Aborting...\033[0m"
  exit
fi

# Check CPU-Arch
ARCH=`uname -m|cut -c1-3`
if [ "$ARCH" != "arm" ]; then
  echo -e "\a\033[1;37;31mError: \a\033[1;37;37mSorry, ATM only ARM (RaspberryPi) is supported. Aborting...\033[0m"
  exit
fi

if [ "$1" == "i" ]
then
echo -e "\a\033[1;37;32mInstalling ScreenSaver...\033[0m"
# Install Libs
sudo apt install libsdl1.2debian libsdl-ttf2.0-0 libsdl-gfx1.2-5

# Copy needed files and directorys
mkdir /opt/vs
sudo cp /tmp/gluqlo /opt/vs/gluqlo
sudo cp /tmp/vs.sh /opt/vs/vs.sh
sudo cp /tmp/vs.service /etc/systemd/system/vs.service
sudo cp /tmp/LICENSE /opt/vs/LICENSE
sudo cp /tmp/gluqlo.ttf /usr/share/gluqlo/gluqlo.ttf
strip gluqlo
install -o root -m 0755 -D /tmp/gluqlo /opt/vs/gluqlo
install -o root -m 0755 -D /tmp/vs.sh /opt/vs/vs.sh
install -o root -m 0755 -D /tmp/vs.service /etc/systemd/system/vs.service
install -o root -m 0755 -D /tmp/LICENSE /opt/vs/LICENSE
install -o root -m 0644 -D /tmp/gluqlo.ttf /usr/share/gluqlo/gluqlo.ttf

# Enable Volumio-Saver
chmod +x /opt/vs/vs.sh;systemctl enable vs;systemctl start vs &

elif [ "$1" == "r" ]
then
echo -e "\a\033[1;37;33mUninstalling ScreenSaver...\033[0m"
# Disable Volumio-Saver
systemctl stop vs
systemctl disable vs

# Remove all files and directorys
rm -r /opt/vs
rm -r /usr/share/gluqlo
rm -f /etc/systemd/system/vs.service
fi

Yes this is what i described on this post (clock not draw correct sometimes):

I made v1.3, can you test it?
Please see the new “Readme.txt”. Install it now with “sudo bash /tmp/install.sh i” to avoid permission problems. Should work this way.

volumio@livingroom:~$ sudo bash /tmp/install.sh i
Installing ScreenSaver…
Reading package lists… Done
Building dependency tree
Reading state information… Done
libsdl-gfx1.2-5 is already the newest version (2.0.25-11).
libsdl-ttf2.0-0 is already the newest version (2.0.11-6).
libsdl1.2debian is already the newest version (1.2.15+dfsg2-4+rpt2).
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
cp: cannot create regular file ‘/usr/share/gluqlo/gluqlo.ttf’: No such file or directory
strip: ‘gluqlo’: No such file
Created symlink /etc/systemd/system/multi-user.target.wants/vs.service → /etc/systemd/system/vs.service.
volumio@livingroom:~$

but it works with the sudo bash sudo bash /tmp/install.sh i
remove is now bricked

and we have to restore brightness in uninstall

Before installing the required packages, please perform a sudo apt update. To make sure we’re inline with the online repositories.

Old:

if [ "$1" == "i" ]
then
echo -e "\a\033[1;37;32mInstalling ScreenSaver...\033[0m"
# Install Libs
sudo apt install libsdl1.2debian libsdl-ttf2.0-0 libsdl-gfx1.2-5

New:

if [ "$1" == "i" ]
then
echo -e "\a\033[1;37;32mInstalling ScreenSaver...\033[0m"
# Install Libs
sudo apt update && sudo apt install libsdl1.2debian libsdl-ttf2.0-0 libsdl-gfx1.2-5

Make sure the involved directories are there to avoid these erros:
cp: cannot create regular file ‘/usr/share/gluqlo/gluqlo.ttf’: No such file or directory

if [ ! -d /usr/share/gluqlo ]; then
    mkdir -p /usr/share/gluqlo;
fi;

if [ ! -d /opt/vs ]; then
    mkdir -p /opt/vs;
fi;

Good suggestion, on the todo list for v1.4 :+1:
And yes you are right, there is a “mkdir /usr/share/gluqlo” needed to create the directory first!
Updated:

BTW: I ask me if we need all the sudo commands during the install when we start the script with sudo? Looks like a “sudo sudo” not? :thinking:

Edit: The suggestion from wheaten is better, creating directory only if it does not exist. But i think the ; are not needed. Removed v1.4 and recreate it.

we can check if it’s working without… :slight_smile: your bashing sudo so cp should be enough

If you execute a script as sudo it should remain sudo the entire script., this is something you can simply check.
if it wasn’t the command rm -f /etc/systemd/system/vs.service would fail.

So we can remove all the sudo commands from the script right?

Yes you can, just tested it with only:

#!/bin/bash
apt update && apt install libsdl1.2debian libsdl-ttf2.0-0 libsdl-gfx1.2-5

Here is v1.5 with removed sudo and (hopefully) all fixes:

volumio@livingroom:~$ sudo bash /tmp/install.sh i
Installing ScreenSaver...
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:2 http://archive.raspberrypi.org/debian buster InRelease [32.6 kB]
Get:3 https://deb.nodesource.com/node_14.x buster InRelease [4584 B]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Get:5 http://archive.raspberrypi.org/debian buster/main armhf Packages [393 kB]
Get:6 https://deb.nodesource.com/node_14.x buster/main armhf Packages [780 B]
Fetched 13.5 MB in 6s (2230 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
42 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsdl-gfx1.2-5 is already the newest version (2.0.25-11).
libsdl-ttf2.0-0 is already the newest version (2.0.11-6).
The following packages will be upgraded:
  libsdl1.2debian
1 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.
Need to get 162 kB of archives.
After this operation, 32.8 kB disk space will be freed.
Do you want to continue? [Y/n] Y
Get:1 http://mirror.serverius.net/raspbian/raspbian buster/main armhf libsdl1.2debian armhf 1.2.15+dfsg2-6~deb10u1 [162 kB]
Fetched 162 kB in 0s (358 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 54300 files and directories currently installed.)
Preparing to unpack .../libsdl1.2debian_1.2.15+dfsg2-6~deb10u1_armhf.deb ...
Unpacking libsdl1.2debian:armhf (1.2.15+dfsg2-6~deb10u1) over (1.2.15+dfsg2-4+rpt2) ...
Setting up libsdl1.2debian:armhf (1.2.15+dfsg2-6~deb10u1) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1) ...
/tmp/install.sh: line 51: [!: command not found
/tmp/install.sh: line 54: [!: command not found
cp: cannot create regular file '/opt/vs/gluqlo': No such file or directory
cp: cannot create regular file '/opt/vs/vs.sh': No such file or directory
cp: cannot create regular file '/opt/vs/LICENSE': No such file or directory
cp: cannot create regular file '/usr/share/gluqlo/gluqlo.ttf': No such file or directory
strip: 'gluqlo': No such file
Created symlink /etc/systemd/system/multi-user.target.wants/vs.service → /etc/systemd/system/vs.service.
volumio@livingroom:~$ 


it seems that cp needs sudo.

yup as bash sudo

did a upgrade so i hope my volumio still will boot…