From 540f912c62e078ddf66c8c78ef41cca992976d18 Mon Sep 17 00:00:00 2001 From: dbarzin Date: Thu, 30 Jun 2022 10:32:30 +0200 Subject: [PATCH] work in progress --- INSTALL.md | 7 ++++++- install.sh | 8 +++++++- tests/mouse-click.py | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index d9754b1..27aaa0e 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -116,9 +116,14 @@ ExecStart= ExecStart=-su - didier -c ./pandora-box/pandora-box.py StandardInput=tty StandardOutput=tty +Type=idle -https://wiki.archlinux.org/title/Getty#Automatic_login_to_virtual_console +Restert getty1 + +sudo systemctl daemon-reload; sudo systemctl restart getty@tty1.service + +src: https://wiki.archlinux.org/title/Getty#Automatic_login_to_virtual_console The option Type=idle found in the default getty@.service will delay the service startup until all jobs are completed in order to avoid polluting the login prompt with boot-up messages. diff --git a/install.sh b/install.sh index a076bd6..95e5ffd 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,6 @@ #/usr/bin/bash -e +# Install procedure for Pandora-Box + set -e cd .. @@ -83,7 +85,7 @@ sudo mkdir /var/quarantine sudo chown $USER /var/quarantine # Mouse terminal -sudo apt install gpm imagemagick pmount +sudo apt install imagemagick pmount # Suppress all messages from the kernel (and its drivers) except panic messages from appearing on the console. echo "kernel.printk = 3 4 1 3" | sudo tee -a /etc/sysctl.conf @@ -91,6 +93,10 @@ echo "kernel.printk = 3 4 1 3" | sudo tee -a /etc/sysctl.conf # allow write to /dev/fb0 sudo usermod -a -G video $USER +# allow read mouse input +sudo usermod -a -G input $USER + + # Start Poetry echo "cd /home/$USER/pandora" >> /etc/rc.local echo "poetry run update --yes" >> /etc/rc.local diff --git a/tests/mouse-click.py b/tests/mouse-click.py index d1c1902..a321009 100755 --- a/tests/mouse-click.py +++ b/tests/mouse-click.py @@ -1,12 +1,12 @@ #!/usr/bin/python3 -mouse = open( "/dev/input/mice", "rb" ) - def waitMouseClick(): + mouse = open( "/dev/input/mice", "rb" ) while True: buf = mouse.read(3) if ((buf[0] & 0x1)==1): break; + close(mouse) waitMouseClick()