Page 1 of 1

Joggler with Ubuntu 18.04 LTS with Desktop

Posted: Fri Jul 10, 2020 10:05 am
by nytram
Hi

I have successfully been using ubuntu 18.04 LTS with Chromium Kiosk to show my Home Assistant webpage.

I wasnt keen on the screensaver that I got working on the command line but seen a user on Home Assistant that is now using LXDE with Chromium and the Chrome Extension Phot Screen Saver successfully.

I have only managed once out of 3 attempts to get LXDE to work.

My original install had

ubuntu 18.04 LTS
XServer

I have tried adding

sudo apt-get update
sudo apt-get install lubuntu-core
sudo apt install matchbox-keyboard
sudo apt install chromium-browser
sudo of-settings autostartx of

but when I reboot I get just a black screen and it wont go back into the desktop.

Is there a simpler way to do this as I have also tried the lbuntu 14.04 with full mashings and it was very slow compared. So lighter the better

The end result I would like is to kiosk it to open my webpage for Home Assistant with a screensaver after 5 or 10 minutes with the chrome extension which shows temperature and time on a screen saver with images

A bonus would be to make it a media player so Home Assistant can see it to play commands to or listen to the radio but not as sophisticated as Squeezebox

Thanks

Martyn

Re: Joggler with Ubuntu 18.04 LTS with Desktop

Posted: Thu Aug 27, 2020 5:09 pm
by urbatecte
Hi Martin,

Same need ;o)
I first try with Lubuntu trying to get the on screen keyboard but as I fail, I went back to only openbox window manager.
Here is my step by step guide after @roobarb! ubuntu setup
after power-on joggler, all command are made through ssh (except the ones mention).

Code: Select all

passwd
=> set your personnal password

Code: Select all

sudo of-expand
=> let the joggler reboot

Code: Select all

sudo apt update

Code: Select all

sudo apt upgrade
=> answer Y to the multi choice question Configuration file '/etc/issue'

Code: Select all

sudo reboot
after that I followed this guide : https://projects-42.nl/index.php/2018/u ... web-or-rdp

Code: Select all

sudo apt-get install --no-install-recommends chromium-browser

Code: Select all

sudo systemctl edit getty@tty1
Then fill the new file with (for "of" user):

Code: Select all

[Service]
ExecStart=
ExecStart=-/sbin/agetty -a of --noclear %I $TERM
Then continue the guide...

Code: Select all

sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox -y
I also install some screen saver, and try onboard, match-keyboard and xvkbd as on screen keyboard but fail with all of them...

Code: Select all

sudo apt install xscreensaver xscreensaver-gl-extra xscreensaver-data-extra -y

Code: Select all

sudo reboot

Code: Select all

sudo nano /etc/xdg/openbox/autostart
Then append the file with

Code: Select all

# Disable any form of screen saver / screen blanking / power management
# I leave the 3 followings line commented because I've setup the behavior in the screensaver
#xset s off
#xset s noblank
#xset -dpms
# start the screensaver don't forget the & at the end of any software launch, otherwise the script will stop
xscreensaver -nosplash &

# Start Chromium in kiosk mode
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/' ~/.config/chromium/'Local State'
sed -i 's/"exited_cleanly":false/"exited_cleanly":true/; s/"exit_type":"[^"]\+"/"exit_type":"Normal"/' ~/.config/chromium/Default/Preferences
chromium-browser --noerordialogs --disable-session-crashed-bubble --disable-infobars --kiosk 'https://your_homeassistant_url:8123'

Don't forget the & at the end of any software launch, otherwise the script will stop. I lose a lot of time due to that :x

Then the last magic line ;o)

Code: Select all

cd
sudo nano .bash_profile
Then fill the new file with:

Code: Select all

startx
I didn't succeed with original command of the guide but only startx works well !
You can check that after a reboot chromium is lauched in kiosk mode pointing on the expected url.

Launched the browser may interact with some functionnality, for HomeAssistant you can deleted --kiosk in the autostrart and add the card fullscreen-card in HACS in HA, you will then hace a big button card that allow you to switch to fullscreen or revert to normal mode.
I've tested it with chromium and may use it with xvkbd or onboard (just in case I really need to type something on the screen), the issue is that the keyboard do not appear automatically when the cursor is on a editing area, so you need to have it running in backgroung and quit the fullscreen mode to access it.

At this step I had to fill my HomeAssistant credentials through wired keyboard...
This should fullfill your initial need but I add a few step to get a nice HomeAssistant tablet...
So, I've added samba management in order to add pictures for the screen saver !

If you don't know it yet, check the joggler IP with :

Code: Select all

hostname -I
Install all samba packages

Code: Select all

sudo apt install samba -y
Set a password for samba access for "of" user

Code: Select all

sudo smbpasswd -a of
Then you need to configure samba

Code: Select all

sudo nano /etc/samba/smb.conf
In the file, find # Authentification # and add the following line:

Code: Select all

security = user
An at the end of the file tell where you want your access to point at login. I've seleted the upper one level of home for "of" user.

Code: Select all

[Joggler]
    path = /home/of
    writeable = yes
;    browseable = yes
    valid users = of
Then reboot
You should now be able to access the joggler through your windows explorer by adding a network access pointing on the joggler IP with the credential you've selected.
Copy the pictures you want the screen saver use then configure the screen saver itself by launching the configuration menu (still through ssh):

Code: Select all

xscreensaver-demo
You should see the xscreensaver menu on the joggler screen.
You then have to setup the screen Standby/Suspend/Off duration in the "Advanced tab" and selecte the directory for screensaver images as well.
Go back to the Display Modes tab and select either Only One screen saver or random (select and configure the ones that please you).
Be sure to let the lock screen unticked becauce onboard keyboard doesn't work ;o)

Close the xscreensaver menu and that's it. It should work ;o)
On some menu you may miss some button at the end of the window, to access it, I need to reduce the font used in the desktop thanks to lxappearance package.

Code: Select all

sudo apt install lxappearance -y
Then launch it through SSH

Code: Select all

lxappearance
Now, on the joggler screen, you should see the lxappearance menu.
In the default tab "widget", select font 6 (8 may be ok as well).

Hope I do not miss any step because I try many different package for the keyboard and the screensaver, so do not hesitate if something do not behave as expected.

If you or any other reader find out a way to activate an onscreen keyboard when you point to an editing area and when browser is in fullscreen I'll take it !

Enjoy HA.
urbatecte

Re: Joggler with Ubuntu 18.04 LTS with Desktop

Posted: Mon Aug 31, 2020 3:55 pm
by AndyC
I've managed to get LXDE, Xubuntu and Mate running by installing using tasksel. After doing

Code: Select all

of-expand
and rebooting, enter these commands:

Code: Select all

sudo of-install xserver

Code: Select all

sudo apt install tasksel

Code: Select all

sudo tasksel install lubuntu-core
Or:

Code: Select all

sudo tasksel install xubuntu-core
Or:

Code: Select all

sudo tasksel install ubuntu-mate-core
Both Xubuntu and Mate required editing /boot/grub.cfg and changing

Code: Select all

ro
to

Code: Select all

rw
.
Hope that helps someone.

Re: Joggler with Ubuntu 18.04 LTS with Desktop

Posted: Thu Nov 19, 2020 5:28 pm
by nytram
Hi

Sorry, I never got notified to say you replied. I parked this project for a while but I have started again and forgot some stuff.

Which OS did you use and are you still using ?

Does it work in Home Assistant and do you use a screensaver that sees the weather and time ?

Thanks

Martyn