[SOLVED] Video screensaver isn't started after browser reset

Post bug reports related to either the kiosk ISO or the kiosk wizard here.
Post Reply
pi0tr
White ninja
White ninja
Posts: 6
Joined: 12 Dec 2015, 21:52
Distribution: Porteus Kiosk
Location: Netherlands

[SOLVED] Video screensaver isn't started after browser reset

Post#1 by pi0tr » 12 Dec 2015, 22:09

Hi,

First of all thank you very much for Porteus Kiosk! I love it, especially the latest 3.6.0 release.

However, I'm encountering 2 small problems with this release:

1) I'm planning on using the video screensaver, but it seems the screensaver isn't started after the browser is restarted when the idle timeout runs out. It does work if the browser has been used by someone, but once the browser is restarted the screensaver won't come up. (Probably the same problem as viewtopic.php?f=103&t=5215 but now with the video screensaver?)

2) It seems like the prefs.js file is ignored in Firefox, since opening a new tab shows you the annoying search bar and recently visited sites page. I tried to disable it with the prefs.js in /home/guest/.mozilla[..] but it doesn't seem to work. Likewise, the setting for disabling the restore of tabs is ignored causing the kiosk to sometimes start with a "recovered tab", i.e. a blank screen....

Thank you very much in advance!
Last edited by pi0tr on 17 Dec 2015, 19:53, edited 1 time in total.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Video screensaver isn't started after browser idle timeo

Post#2 by fanthom » 13 Dec 2015, 08:08

Hello pi0tr,

"it seems the screensaver isn't started after the browser is restarted when the idle timeout runs out."
Will check this

"It seems like the prefs.js file is ignored in Firefox, since opening a new tab shows you the annoying search bar and recently visited sites page. I tried to disable it with the prefs.js in /home/guest/.mozilla[..] but it doesn't seem to work."
I remember i was fighting with this problem for a custom build with full persistence enabled. Nothing worked so i ended up with closing the Firefox properly (ctrl+q) before ending the session.

Please post your kiosk config (remove passwords, etc..) and custom firefox preferences which you used.

Thank you.
Please add [Solved] to your thread title if the solution was found.

pi0tr
White ninja
White ninja
Posts: 6
Joined: 12 Dec 2015, 21:52
Distribution: Porteus Kiosk
Location: Netherlands

Re: Video screensaver isn't started after browser idle timeo

Post#3 by pi0tr » 14 Dec 2015, 09:27

Hi,

thanks for your response.

When I deleted these two settings from my config file the prefs do seem to get enforced:
- persistence=session
- disable_private_mode=yes

Both of these I use for not making the kiosk download some large files every time again when the browser is restarted.

One of the preferences I'm talking about is for example:
- user_prefs("browser.newtab.URL", "about:blank")

As I see now these setting is already enforced in Porteus Kiosk by default, but with persistence enabled it seems like this setting is ignored and put back to "about:newtab".

Thank you.

PS: here's my config file. PLEASE NOTE: last entry (file:///tmp/)of the whitelist preference is needed to make the video screensaver work at all. Without it an access denied page shows up. Enabling file services won't fix it.

Code: Select all

connection=wired
network_interface=eth0
dhcp=yes
browser=firefox
disable_address_bar=no
homepage=http://porteus.kiosk
browser_idle=2
kiosk_config=http://porteus.kiosk/remote_config/config.txt
persistence=session
allow_popup_windows=yes
disable_private_mode=yes
screensaver_idle=1
screensaver_video=http://porteus.kiosk/screensaver.mp4
wallpaper=http://porteus.kiosk/wallpaper/wallpaper.jpg
whitelist=porteus.kiosk youtube.com/embed/ file:///tmp/ 

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Video screensaver isn't started after browser idle timeo

Post#4 by fanthom » 15 Dec 2015, 14:10

When I deleted these two settings from my config file the prefs do seem to get enforced
Is 'browser_preferences=' parameter an option for you?
http://porteus-kiosk.org/parameters.htm ... references
it overrides kiosk defaults so should work.

PLEASE NOTE: last entry (file:///tmp/)of the whitelist preference is needed to make the video screensaver work at all. Without it an access denied page shows up. Enabling file services won't fix it.
I'll add 'file:///tmp' to whitelist by default when screensaver video is used. Thanks for pointing.

I'm still working on resolving the "browser restart covering the screensaver video" issue. Its not that easy comparing to slideshow as video is also played in the browser. I think i cant use 'always on top' attribute as it would be matching both browsers .... - will check that today.

We also cant use 'ctrl+q' to restart the browser gently (avoid 'restore tabs' message appearing when 'persistence=session' is used) when screensaver is playing (it would catch this combination and quit) so i must find a way to send 'close' signal to specific application directly. I'm hoping that SIGQUIT will work.

Updates to come.

EDIT:
Resolved 1) with wmctlr: https://forum.xfce.org/viewtopic.php?pid=30414#p30414
Resolved 2) with firefox parameter: https://support.mozilla.org/en-US/questions/1019654

3.6.0 ISO has been updated - please download once again and let me know if you experience other issues.

Thank you
Please add [Solved] to your thread title if the solution was found.

pi0tr
White ninja
White ninja
Posts: 6
Joined: 12 Dec 2015, 21:52
Distribution: Porteus Kiosk
Location: Netherlands

Re: Video screensaver isn't started after browser idle timeo

Post#5 by pi0tr » 15 Dec 2015, 20:48

Thank you for your reply.

1) As for the video screensaver related issues, it works perfect now! Even if the browser is reset it won't reset or hide the screensaver. Thanx!
2) One (very small) remark about the screensaver though: there is a small 2 pixel white line on the right side of the screensaver. For now I will cut these pixels off with the monitor settings, but maybe there's an easy fix for that?
3) As for the Firefox prefs,I haven't seen any browser restore pages. So it seems like that works as well! However, it seems like I don't understand the 'browser_preferences=' parameter. I linked to the file below (user.js) in the main config file (config.txt), which are both located in the same folder on a server in ANSI format:

Code: Select all

# Mozilla User Preferences
user_pref("browser.newtab.url", "http://192.168.1.8");
I use this in order to start a new tab with my own homepage. But it doesn't work :( It still shows the default blank screen. However, when I change prefs.js in /home/guest/.mozilla etc. manually it does work. What am I doing wrong?

Thank you.

EDIT: Hmm, just had a 'restore page'-tab ... Seems like as soon as I disable private mode (disable_private_mode=yes), the prefs.js file in /home/guest/.mozilla etc. is simply ignored, because a new tab will also open in a 'recently visited sites' tab instead of a blank page or my own homepage. Btw, this all is in a clean install, so no manual image customization from my side.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Video screensaver isn't started after browser idle timeo

Post#6 by fanthom » 15 Dec 2015, 22:29

I cant recreate your issue - everything works here with or without private mode.

Please use vanilla ISO and enable 'browser_preferences=' parameter. Boot kiosk, login to it through ssh and run following command:

Code: Select all

cat $profile/user.js
If output returns your custom browser settings then everything is ok. If this file does not exist then for some reason kiosk could not access the preferences file on your server (probably wrong URL was provided).
Please add [Solved] to your thread title if the solution was found.

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: Video screensaver isn't started after browser idle timeo

Post#7 by fanthom » 16 Dec 2015, 08:25

2) One (very small) remark about the screensaver though: there is a small 2 pixel white line on the right side of the screensaver. For now I will cut these pixels off with the monitor settings, but maybe there's an easy fix for that?
Screen width and height is discovered automatically and video size is based on these calculations. Please unpack installation ISO and have a look on 003/opt/porteus-scripts/files/videoshow script. maybe there are better ways of handling this. If you find improvements then please share.

Thank you.
Please add [Solved] to your thread title if the solution was found.

pi0tr
White ninja
White ninja
Posts: 6
Joined: 12 Dec 2015, 21:52
Distribution: Porteus Kiosk
Location: Netherlands

Re: Video screensaver isn't started after browser idle timeo

Post#8 by pi0tr » 17 Dec 2015, 19:49

Alright, haven't been able to solve the 'browser_preferences=' problem... The kiosk can access it (when typing the url in the browser itself), but

Code: Select all

cat $profile/user.js
can't find the file. For now edited the prefs.js in the ISO itself manually and that works fine.

I have found some issues though:
1) The problem with the recovered pages in combination with persistance setting can be fixed by changing the following in prefs.js:

Code: Select all

user_prefs("browser.sessionstore.max_resumed_crashes", "0");
to

Code: Select all

user_pref("browser.sessionstore.resume_from_crash", false);
2) The problem with new tabs opening with the searchbar page instead of a blank screen in combination with persistance setting can be fixed by changing the prefs.js file from

Code: Select all

user_pref("browser.newtab.url", "about:blank");
to anything else but about:blank, for example:

Code: Select all

user_pref("browser.newtab.url", "http://porteus-kiosk.org");
3) The problem with a white row of 2 pixels wide on the right side when the video screensaver is shown can be fixed by changing the value -14 to -16 in the videoshow script in /opt/porteus-scripts/files/:

Code: Select all

    cp -a /opt/porteus-scripts/guest/.mozilla /root
    echo '#content browser { margin-right:-14px !important; overflow-y: hidden; overflow-x: hidden; }' >> $profile/chrome/userChrome.css
to

Code: Select all

    cp -a /opt/porteus-scripts/guest/.mozilla /root
    echo '#content browser { margin-right:-16px !important; overflow-y: hidden; overflow-x: hidden; }' >> $profile/chrome/userChrome.css
After changing some more settings manually (for example removing the content-prefs.sqlite file at each restart of the browser so zoom settings are reset to 100%) the kiosk works perfectly. Thanx for your help! :Yahoo!:

User avatar
fanthom
Site Admin
Site Admin
Posts: 4623
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland, currently - Cork, IE
Contact:

Re: [SOLVED] Video screensaver isn't started after browser r

Post#9 by fanthom » 17 Dec 2015, 20:35

I have pulled 1) and 3) fixes to the main branch.

Thanks a lot for you input.
Please add [Solved] to your thread title if the solution was found.

Post Reply