Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Most proper, minimalistic way to start a small GUI app fullscreen

Featured Replies

Hello,

 

I am having a lot of fun making my first apps with python and tkinter... and with my recent good experiences with LCD TFT displays, I want to create an "appliance" project.

 

I can start non-GUI apps with systemctl service files, and they run with the proper user permissions... and I don't worry about giving it root access.

 

But I would like to do the same with GUI apps. They would be full screen, 320x240 on the LCD TFT.

 

All I can do now is:

* start with armbian minimal (with orange pi zero in my case)

* add the DTS for LCD and touch, and the ko for spi-gpio (as seen in my threads in the orangepi zero section)

* install the bare minimum for X11: xorg, xorg-video-fbdev, xorg-input-evdev, python3-tk, openbox, xterm

* create an auxiliary starter script: launch_my_app.sh

#!/bin/sh
openbox --startup 'python3 /home/roberto/tkinter_test/tktest.py'

Then, I execute from within my python project folder, in an ssh session as my username

DISPLAY=:0.0 sudo startx ./launch_my_app.sh

 

Then my tkinter app runs, until I press ctrl-C in the ssh.

But I feel that sudo is unnecessary and too much for a cybersecurity perspective.

 

Is there a way to make it start automatically?

 

(it would be ideal if xorg would exit if the window is closed)

 

Sample python code. Credits: https://www.pythonguis.com/tutorials/create-gui-tkinter/

Spoiler
from tkinter import *

root = Tk()  # create a root widget
root.title("Tk Example")
root.configure(background="yellow")
root.minsize(100, 100)  # width, height
root.maxsize(320, 240)
root.geometry("300x200+10+10")  # width x height + x + y
text = Label(root, text="Nothing will work unless you do.")
text.pack()
text2 = Label(root, text="- Maya Angelou")
text2.pack()
image = PhotoImage(file="/home/roberto/tkinter_test/pikachu.png")
img = Label(root, image=image)
img.pack()

root.mainloop()

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.