some fixes

This commit is contained in:
2026-02-26 17:48:15 -05:00
parent b9ac998fb4
commit 28bd9bfa13
6 changed files with 34 additions and 98 deletions

View File

@ -9,16 +9,32 @@ if [ "$EUID" -ne 0 ]; then
exit 1
fi
# Auto-detect the right desktop session from what's installed
if [ -f /usr/share/wayland-sessions/gnome-wayland.desktop ]; then
SESSION="gnome-wayland"
elif [ -f /usr/share/wayland-sessions/ubuntu-wayland.desktop ]; then
SESSION="ubuntu-wayland"
elif [ -f /usr/share/xsessions/gnome.desktop ]; then
SESSION="gnome"
elif [ -f /usr/share/xsessions/ubuntu.desktop ]; then
SESSION="ubuntu"
else
echo "Error: No supported desktop session found!"
exit 1
fi
# Stop the kiosk script service first
sudo -u trav XDG_RUNTIME_DIR=/run/user/$(id -u trav) systemctl --user stop org.gnome.Kiosk.Script.service 2>/dev/null
sudo -u trav XDG_RUNTIME_DIR=/run/user/$(id -u trav) systemctl --user mask org.gnome.Kiosk.Script.service 2>/dev/null
# Update AccountsService to use GNOME desktop
# Update AccountsService to use detected desktop session
cat > "$ACCOUNTS_FILE" << EOF
[User]
Session=gnome-wayland
Session=$SESSION
SystemAccount=false
EOF
echo "Detected session: $SESSION"
echo "Switched to desktop mode."
echo "Run 'sudo systemctl restart gdm3' to apply, or log out and back in."

View File

@ -95,7 +95,7 @@ class Screen3(tk.Frame):
countdown_thread.start()
def countdown(self):
for i in range(3, 0, -1):
for i in range(5, 0, -1):
self.countdown_text = str(i)
time.sleep(1)

View File

@ -196,11 +196,11 @@ class Screen8(tk.Frame, DrawingMixin):
# Column 1: Start Over button and instruction text
col1_frame = tk.Frame(main_container, bg=BG_COLOR)
col1_frame.pack(side='left', padx=(15, 25), anchor='n', pady=20)
col1_frame.pack(side='left', padx=(10, 10), anchor='n', pady=5)
# Start Over button (replaces home button) - Screen8
tk.Button(col1_frame, text="Start over from the beginning", command=master.show_warning_dialog,
height=2, width=24, bg='peach puff', font=GlobalVars.BUTTON_FONT).pack(pady=(0, 20))
tk.Button(col1_frame, text="Start Over", command=master.show_warning_dialog,
height=1, width=12, bg='peach puff', font=GlobalVars.BUTTON_FONT).pack(pady=(0, 15))
# Instruction label
self.label = RoundedLabel(col1_frame, text="Draw your\nribbon :)",
@ -209,7 +209,7 @@ class Screen8(tk.Frame, DrawingMixin):
# Column 2: Drawing canvas
col2_frame = tk.Frame(main_container, bg=BG_COLOR)
col2_frame.pack(side='left', padx=(10, 30))
col2_frame.pack(side='left', padx=(5, 15))
# Canvas for drawing
self.canvas = Canvas(col2_frame, width=display_width, height=display_height, bg='white')

View File

@ -173,17 +173,21 @@ class ParticipationRibbonDrawingScreen(tk.Frame, DrawingMixin):
display_width = width * scale_factor
display_height = height * scale_factor
# Main container to hold all columns
main_container = tk.Frame(self, bg=BG_COLOR)
main_container.place(relx=0.5, rely=0.5, anchor='center')
# Wrapper frame to hold the start-over button above the main columns
wrapper = tk.Frame(self, bg=BG_COLOR)
wrapper.place(relx=0.5, rely=0.5, anchor='center')
# Column 1: Start Over button and instruction text
tk.Button(wrapper, text="Start over from the beginning", command=master.show_warning_dialog,
height=2, width=24, bg='peach puff', font=GlobalVars.BUTTON_FONT).pack(pady=(0, 10))
# Main container to hold all columns
main_container = tk.Frame(wrapper, bg=BG_COLOR)
main_container.pack()
# Column 1: Instruction text
col1_frame = tk.Frame(main_container, bg=BG_COLOR)
col1_frame.pack(side='left', padx=(5, 10), anchor='n', pady=20)
tk.Button(col1_frame, text="Start over from the beginning", command=master.show_warning_dialog,
height=2, width=24, bg='peach puff', font=GlobalVars.BUTTON_FONT).pack(pady=(0, 20))
self.label = RoundedLabel(col1_frame, text="Draw your\nribbon :)",
wraplength=150, font=GlobalVars.TEXT_FONT, bg='white')
self.label.pack(pady=5)

File diff suppressed because one or more lines are too long

0
touch
View File