Salamek / chromium-kiosk

Chromium kiosk is simple package turning your Archlinux or Debian (and alike) based PC/Raspberry into simple web kiosk using chromium.
GNU General Public License v3.0
60 stars 10 forks source link

Not Working #56

Closed AdamsLab01 closed 2 years ago

AdamsLab01 commented 2 years ago

Hello,

Base install of Debian 11 with GNOME. Went though the regular Debian install which has you create a user account. After install I SSHd to the system and as root following the instructions, installed chromium-kiosk and rebooted. After rebooting the system was at the login screen asking for the password of the user I setup during install. I set the system to login as the chromium-kiosk user but only get the desktop, chromium-kiosk does not launch and the system times out to the login screen (also, don't know the password to the chromium-kiosk user).

Am I missing something to make this work?

Salamek commented 2 years ago

@AdamsLab01 You have to install this on barebone Debian (netinstall), in install setup just install SSH and base tools do not install any thing else...

AdamsLab01 commented 2 years ago

@AdamsLab01 You have to install this on barebone Debian (netinstall), in install setup just install SSH and base tools do not install any thing else...

Got it! Now installed and working...

Couple questions:

Is there a way to enable the address bar so a user can type and address?

The IDLE_TIME option seems to cause a crash/not load. If I set a time, I tried just 5 and 300 (for 5 minutes) but when set I just get a blinking cursor in the upper left. I installed qiosk and need the "resets to default settings when idle" feature for my application to work.

Thanks,

Adam

Salamek commented 2 years ago

Is there a way to enable the address bar so a user can type and address?

You need address bar to be visible? I can implement configurable (on/off) address bar into qiosk if this is really important feature to you...

The IDLE_TIME option seems to cause a crash/not load. If I set a time, I tried just 5 and 300 (for 5 minutes) but when set I just get a blinking cursor in the upper left. I installed qiosk and need the "resets to default settings when idle" feature for my application to work.

qiosk backend is in beta, so some "hiccups" are expected... ill test & fix it ASAP (give me a hour lol)

Salamek commented 2 years ago

@AdamsLab01 ok run.

apt update && apt upgrade

You should get update to chromium-kiosk:1.0.4 fixing crash when using IDLE_TIME

AdamsLab01 commented 2 years ago

Wow, you work fast! Really appreciate the response.

I updated and with IDLE_TIME set it does not crash but it also does not seem to do anything. Navigating away from the home page the it just stays on the page you navigated to (FYI, I tried to enter the time as both seconds and minutes).

And, yes, I'm intending to use this as a public access terminal so having the address bar is needed.

Thanks again.

Salamek commented 2 years ago

IDLE_TIME is in seconds, i just tested it and it works fine for me...

Are you sure that here is no input event? keyboard press, mouse move (Glitchy mouse moving cursor few PXs randomly)?

These events are considered as user activity:

QEvent::KeyPress
QEvent::MouseMove
QEvent::Wheel
QEvent::TouchUpdate

Ill ad that addressbar for you in meantime...

Salamek commented 2 years ago

@AdamsLab01 address bar like this is fine? Screenshot_2022-07-20_01-38-38

AdamsLab01 commented 2 years ago

@AdamsLab01 address bar like this is fine? Screenshot_2022-07-20_01-38-38

That's perfect

AdamsLab01 commented 2 years ago

IDLE_TIME is in seconds, i just tested it and it works fine for me...

Are you sure that here is no input event? keyboard press, mouse move (Glitchy mouse moving cursor few PXs randomly)?

These events are considered as user activity:

QEvent::KeyPress
QEvent::MouseMove
QEvent::Wheel
QEvent::TouchUpdate

Ill ad that addressbar for you in meantime...

As a test, I unplugged the keyboard and mouse and still not seeing any change with IDLE_TIME set. I have it set to 60 seconds to test. Also, I tried enabling SCREEN_SAVER and it didn't trigger either.

Salamek commented 2 years ago

IDLE_TIME is in seconds, i just tested it and it works fine for me... Are you sure that here is no input event? keyboard press, mouse move (Glitchy mouse moving cursor few PXs randomly)? These events are considered as user activity:

QEvent::KeyPress
QEvent::MouseMove
QEvent::Wheel
QEvent::TouchUpdate

Ill ad that addressbar for you in meantime...

As a test, I unplugged the keyboard and mouse and still not seeing any change with IDLE_TIME set. I have it set to 60 seconds to test. Also, I tried enabling SCREEN_SAVER and it didn't trigger either.

Can you post config.yml you are using? So i can upload it to my test rig in attempt to replicate your issue...

AdamsLab01 commented 2 years ago
FULL_SCREEN: true # Run in full screen mode, browser will use whole screen without any way for user to close it
TOUCHSCREEN: true # Enables support for touchscreen
HOME_PAGE: 'https://google.com'  # Url to load as homepage

# These works only with chromium-kiosk installed
IDLE_TIME: 60 # How log must be kiosk idle to redirect to HOME_PAGE, 0=disabled (Works only with chromium-kiosk extension installed)
WHITE_LIST:
  ENABLED: false  # is white list enabled
  URLS: []   # List of whitelisted urls, glob format is supported (eg,: *,google.*/news)
  IFRAME_ENABLED: true  # True to enable all iframes, list of urls to specify enabled iframes

NAV_BAR:
  ENABLED: true # is nav bar enabled
  ENABLED_BUTTONS: ['home', 'reload', 'back', 'forward'] # Enabled buttons on navbar, order matters
  HORIZONTAL_POSITION: 'center' # horizontal position on the screen
  VERTICAL_POSITION: 'bottom' # Vertical position on the screen
  WIDTH: 100 # Width of a bar in %
  HEIGHT: 5 # Height of a bar in % works only for qiosk

SCREEN_SAVER:
  ENABLED: false  # is screen saver enabled
  IDLE_TIME: 60
  TEXT: 'Touch me'

VIRTUAL_KEYBOARD:
  ENABLED: false

DISPLAY_ROTATION: 'normal' # normal|left|right|inverted
#SCREEN_ROTATION: 'normal'  #Rotates screen individually (do not rotate touchscreen) when X server starts options are (normal|left|right|inverted), remove DISPLAY_ROTATION for this to work
#TOUCHSCREEN_ROTATION: 'normal'  #Rotates touchscreen individually (do not rotate screen) when X server starts options are (normal|left|right|inverted), remove DISPLAY_ROTATION for this to work
#EXTRA_ARGUMENTS: # Pass extra arguments to used browser, in case of qiosk thse arguments are passed to chromium using QTWEBENGINE_CHROMIUM_FLAGS

# Allowed features in browser
# Uncomment feature you want to enable
#ALLOWED_FEATURES:
#  - desktop-audio-video-capture  # Allows recording desktop audio and video
#  - desktop-video-capture  # Allows recording desktop video
#  - geolocation  # Allows geolocation
#  - invalid-certificate  # Ignores invalid certificate
#  - media-audio-capture  # Allows recording audio from capture device (MIC)
#  - media-audio-video-capture  # Allows recording audio and video from capture device (Camera w/ MIC)
#  - media-video-capture  # Allows recording vide from capture device (Camera)
#  - mouse-lock  # Allows locking mouse inside browser full screen window
#  - notifications  # Allows notifications to be accepted from website
AdamsLab01 commented 2 years ago

When I was posting the config I noticed that TOUCHSCREEN was set to true (which IIRC is the default), so I tried setting it to false (I'm not using a touchscreen) and the IDLE_TIME seems to be working now.

Salamek commented 2 years ago

@AdamsLab01 That is weird TOUCHSCREEN option have effect only when using chromium as a backend... oh also you need to reboot or do killall -u chromium-kiosk (relogin) for changes in config.yml to take effect when using qiosk as backend, hot reload of config is not implemented yet in qiosk

Salamek commented 2 years ago

@AdamsLab01 also do

apt update && apt upgrade

Your address bar is waiting for you :smile:

New config option

ADDRESS_BAR:
    ENABLED: false  # Set to true to enable
AdamsLab01 commented 2 years ago

Yeah, I was rebooting after every config change. That being said, I changed TOUCHSCREEN back to true and IDLE_TIME is still working... so 🤷.

AdamsLab01 commented 2 years ago

Something I'm noticing is that when idle_time is set to 300 seconds (5 minutes) it's taking about 9 minuets before if resets. This may be why I thought it wasn't working.

Also, the address bar works great. Thanks for adding it!

Salamek commented 2 years ago

@AdamsLab01 you are right, there was a bug in qiosk idle reset that was noticeable only when using high timeouts that caused incorrect trigger time (tooooo late to trigger as much as 2xspecified time) should be fixed now in latest relase (1.1.1)

AdamsLab01 commented 2 years ago

Boom fixed, reset right on time.

Thanks for your help!

Salamek commented 2 years ago

@AdamsLab01 do you need anything else or can I close this issue?

AdamsLab01 commented 2 years ago

I think that's it. Thank you.