Im using openbox to control a tkinter app. My app is t.py and is located in ~.
This is my ~/.config/openbox/autostart:
python3 ~/t.py
This is t.py:
import tkinter as tk
root = tk.Tk()
label = tk.Label(root, text="Hello")
label.pack()
root.mainloop()
When I run sudo startx, I can see the cursor pop up then hide, but after that its just a black screen. I am running these commands over ssh as well. I had this working before with a separate .py file but can no longer get it to work. I am running this on a Raspberry Pi Zero 2 W with a HDMI screen. The Pi is installed with the latest Raspberry Pi OS Lite.
sshworks without graphics mode and it can't display any GUI programs - so it can't executetkinterwhich needs graphics mode./full/path/to/python3 /full/path/to/script. In script you may also runpwd >> text.logto see what working directory it uses to run all code./full/path/to/command,/full/path/to/file