Restart Session - No Whitelist

Post bug reports related to either the kiosk ISO or the kiosk wizard here.
Forum rules
Porteus Kiosk section of the forum is unmaintained now. Its kept in a 'read only' mode for archival purposes.
Please use the kiosk contact page for directing your queries: https://porteus-kiosk.org/contact.html
philzy127
Ronin
Ronin
Posts: 2
Joined: 08 Mar 2016, 14:19
Distribution: Porteus Kiosk & Server
Location: New York

Restart Session - No Whitelist

Post#1 by philzy127 » 15 Jun 2016, 15:42

We have several computers using Porteus Kiosk, and we have noticed that when you hit "restart session" it comes back up with only select information from the config files utilized, and it isn’t consistent. We have tried this with Chrome & Firefox on multiple configurations. Sometimes I can restart the session successfully, sometimes I can VNC back in and I’ll see a screen asking to make Chrome the default browser, most of the time I lose access via VNC and the whitelist ceases to function as well.

Most functions still work even once the problems occur: SSH, Mount Filesystem, Restart, Shutdown, debug log etc. But the whitelist and VNC not working is my primary concern. They are essential to us for these systems.

Here are some of the steps I have taken to narrow down the problem(s), tried this on 3 different systems with different hardware, both wired and wireless:
•Disabled browser config files - same sporadic results.
•Minimalist config file – Only necessary settings, same sporadic results.
•For 1 system I even reinstalled and used a separate config file so there was no need for local/global configurations, again with just the essential settings – same sporadic results.

I have 3 debug logs I can send:
1) Everything working as it should
2) VNC Still working, but browser settings not working
3) VNC and browser settings not working

I currently have ‘shutdown_combination=no’ to avoid the issue, but it comes in handy to have it working. Just let me know what I need to do next. :wall:

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Restart Session - No Whitelist

Post#2 by fanthom » 15 Jun 2016, 16:20

Hello Pete,

"We have several computers using Porteus Kiosk, and we have noticed that when you hit "restart session" it comes back up with only select information from the config files utilized, and it isn’t consistent. We have tried this with Chrome & Firefox on multiple configurations. Sometimes I can restart the session successfully, sometimes I can VNC back in and I’ll see a screen asking to make Chrome the default browser, most of the time I lose access via VNC and the whitelist ceases to function as well."
Do you have 'persistence=session' enabled in your kiosk config? If yes then this may be the core of the problem.
Please send me you kiosk config and ill try to recreate your issue.

"I currently have ‘shutdown_combination=no’ to avoid the issue, but it comes in handy to have it working."
Maybe i could create a custom build with shutdown menu without 'Restart Session' feature? Users would have to reboot kiosk which is fast anyway.

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

philzy127
Ronin
Ronin
Posts: 2
Joined: 08 Mar 2016, 14:19
Distribution: Porteus Kiosk & Server
Location: New York

Re: Restart Session - No Whitelist

Post#3 by philzy127 » 15 Jun 2016, 17:46

Do you have 'persistence=session' enabled in your kiosk config? If yes then this may be the core of the problem.
I do not.
Please send me you kiosk config and ill try to recreate your issue.
I would like to do that, but not on here. I didn't see a PM or an email address, so I'm not sure where to send it. Would the logs help at all?

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Restart Session - No Whitelist

Post#4 by fanthom » 15 Jun 2016, 20:29

" I didn't see a PM or an email address, so I'm not sure where to send it."
Please send it to support@porteus-kiosk.org

"Would the logs help at all?"
Once i have the config i can fully recreate your scenario. Logs are not needed.

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

davidb
White ninja
White ninja
Posts: 8
Joined: 10 Jun 2016, 20:09
Distribution: Porteus Kiosk
Location: California

Re: Restart Session - No Whitelist

Post#5 by davidb » 15 Jun 2016, 21:42

The set chrome as default browser window started showing up after i added a "browser_preferences" parameter to my config file today, removing it from the file fixed the "set as default" window, but does not restore vnc access after restarting the session.
I also tried using the chrome policy option "DefaultBrowserSettingEnabled": false, to stop it from coming up but it did not work.

FYI I am using remote config file with nested configurations.

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Restart Session - No Whitelist

Post#6 by fanthom » 19 Jun 2016, 12:17

Hello guys,

After some thinking i have decided to remove 'restart session' option from shutdown menu and Kiosk Server completely. Restarting the browser clears the session which should be enough in 99% of cases. If you experience Xorg issues then its better to reboot whole system anyway.

Please reinstall your kiosks with updated 4.0.0 ISO:
http://porteus-kiosk.org/public/4.0/Por ... x86_64.iso

Server will be updated automatically when new version is pushed to the automatic updates channel.

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

davidb
White ninja
White ninja
Posts: 8
Joined: 10 Jun 2016, 20:09
Distribution: Porteus Kiosk
Location: California

Re: Restart Session - No Whitelist

Post#7 by davidb » 20 Jun 2016, 21:57

Thanks for the update, seems like a solid decision in light of these issues. Just to clarify, it sounds like only the 4.x version is being updated with this change?

The hardware I am using with porteus kiosk is all 32-bit, so its stuck with the latest 3.7.0 version. (older machines that have found second life thanks to this OS, many thanks!)
I modified the exit-kiosk script to execute a couple lines of code to kill the browser and allow it to restart in lieu of restarting the session.
/usr/bin/browser-restart

Code: Select all

#!/bin/sh
#
# browser-restart

# kill browser
# line copied from /opt/porteus-scripts/browser-idle-watcher
kill `ps | grep "guest.*$browser" | tr -s ' ' | sed -e 's/^ //g' | cut -d' ' -f1`

# kill exit menu
# line copied from /opt/porteus-scripts/exit-kiosk
#kill -9 `ps | grep EXIT_MENU | grep -v grep | cut -d" " -f2 | tr "\n" " "` 2>/dev/null
# new command
kill -9 `ps | grep EXIT_MENU | grep -v grep | tr -s " " | sed -e "s/^ //g" | cut -d" " -f1 | tr "\n" " "` 2>/dev/null
and modified in /opt/porteus-scripts/exit-kiosk

Code: Select all

...
<button image-position="2" tooltip-text="Restart Browser">
    <input file icon="system-log-out"></input>
    <label>Restart Browser</label>
    <action>browser-restart</action>
</button>
...
@philzy127 i don't know if restarting the browser is sufficient for what you need, but it gives a clean slate to work with and refreshes the browser homepages.

EDIT:
I started messing with this and found that the ps |grep EXIT_MENU... command was not always returning the correct PID; after a fresh boot the -f2 works to kill the EXIT_MENU process, but after a while it no longer worked (it was returning the user value instead, i.e. "root"). Running the grep command with -f1 would then return the PID. I ended up leaving both lines in my script to cover both cases. If anyone knows why the behavior of ps changes, i'd love to hear why, or if there is a better way to handle this.

EDIT2: The reason it was working the way described above, is because as the PIDs got longer the command 'ps' was changing its output, padding shorter PIDs with leading spaces so the numbers lined up nicely in display output. adding the "tr" and "sed" commands (as they were in the kill browser command) strips the leading spaces and leaves you with just the PID so it can kill the process correctly. I also replaced the original line in the exit-kiosk script so it will work after the PIDs grow too.

Locked