fix: Force OSK to launch with user service
This commit is contained in:
committed by
Hunter Halloran
parent
2162cbbf72
commit
633d217b93
42
sw-kiosk.nix
42
sw-kiosk.nix
@@ -1,15 +1,6 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
services.cage = {
|
|
||||||
enable = false;
|
|
||||||
user = "engr-ugaif";
|
|
||||||
program = "${(pkgs.writeShellScriptBin "chromium-kiosk" ''
|
|
||||||
sleep 5
|
|
||||||
${pkgs.chromium}/bin/chromium --kiosk "https://ha.factory.uga.edu"
|
|
||||||
'')}/bin/chromium-kiosk";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
desktopManager.phosh = {
|
desktopManager.phosh = {
|
||||||
@@ -84,21 +75,21 @@
|
|||||||
"/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
"/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}/glib-2.0/schemas";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.udev.extraRules = ''
|
systemd.user.services."force-osk" = {
|
||||||
# These shouldn't be counted as keyboards, but should still produce events
|
description = "Force the OSK to Enable";
|
||||||
ACTION=="add|change", KERNEL=="event*", ATTRS{name}=="Video Bus", \
|
wantedBy = [ "chromium-kiosk.service" ];
|
||||||
ENV{ID_INPUT_KEYBOARD}="", ENV{ID_INPUT_KEY}=""
|
partOf = [ "chromium-kiosk.service" ];
|
||||||
ACTION=="add|change", KERNEL=="event*", ATTRS{name}=="Power Button", \
|
|
||||||
ENV{ID_INPUT_KEYBOARD}="", ENV{ID_INPUT_KEY}=""
|
serviceConfig = {
|
||||||
ACTION=="add|change", KERNEL=="event*", ATTRS{name}=="Intel HID events", \
|
ExecStartPre = ''
|
||||||
ENV{ID_INPUT_KEYBOARD}="", ENV{ID_INPUT_KEY}=""
|
/run/current-system/sw/bin/sleep 5
|
||||||
ACTION=="add|change", KERNEL=="event*", ATTRS{name}=="Intel HID 5 button array", \
|
'';
|
||||||
ENV{ID_INPUT_KEYBOARD}="", ENV{ID_INPUT_KEY}=""
|
ExecStart = ''
|
||||||
ACTION=="change", SUBSYSTEM=="switch", ATTRS{name}=="Intel HID switches", \
|
/run/current-system/sw/bin/dconf reset /org/gnome/desktop/a11y/applications/screen-keyboard-enabled
|
||||||
ENV{SW_TABLET_MODE}="1"
|
'';
|
||||||
ACTION=="add|change", KERNEL=="event*", ATTRS{name}=="AT Translated Set 2 keyboard", \
|
Type = "simple";
|
||||||
ENV{ID_INPUT_KEY}="", ENV{ID_INPUT_KEYBOARD}=""
|
};
|
||||||
'';
|
};
|
||||||
|
|
||||||
systemd.user.services."chromium-kiosk" = {
|
systemd.user.services."chromium-kiosk" = {
|
||||||
description = "Chromium kiosk";
|
description = "Chromium kiosk";
|
||||||
@@ -107,9 +98,8 @@
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
/run/current-system/sw/bin/dconf reset /org/gnome/desktop/a11y/applications/screen-keyboard-enabled
|
|
||||||
${pkgs.chromium}/bin/chromium \
|
${pkgs.chromium}/bin/chromium \
|
||||||
--enable-features=UseOzonePlatform,WebRTCLibcamera,TouchpadOverscrollHistoryNavigation \
|
--enable-features=UseOzonePlatform,TouchpadOverscrollHistoryNavigation \
|
||||||
--ozone-platform=wayland \
|
--ozone-platform=wayland \
|
||||||
--kiosk \
|
--kiosk \
|
||||||
--start-fullscreen \
|
--start-fullscreen \
|
||||||
|
|||||||
Reference in New Issue
Block a user