Skip to content

Commit

Permalink
FIXME: temporary minimal GTKapp on wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
M4rtinK committed Nov 22, 2023
1 parent 530d82c commit 84967de
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,48 @@
# ...still messy (2013-07-12)
# A lot less messy now. :) (2016-10-13)

print("AAA MINIMAL GTK EXAMPLE")

import time
import os
import shlex
import subprocess

print("AAA set XDG_RUNTIME_DIR")
os.environ["XDG_RUNTIME_DIR"] = "/run/user/0"

print("AAA: ENVIRON")
print(os.environ)

print("AAA: start kiosk")
p = subprocess.Popen(shlex.split("run-in-new-session.py --user root --service "
"anaconda-session --vt 6 --session-type wayland "
"--session-class user gnome-kiosk --sm-disable"
))
print("AAA: waiting for kiosk to start")
while not os.path.exists('/run/user/0/wayland-0'):
time.sleep(0.1)
print("AAA: kiosk started")

import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
print("AAA: post GTK import ")

win = Gtk.Window()
print("AAA: window created ")
win.connect("destroy", Gtk.main_quit)
print("AAA: connect ")
win.show_all()
print("AAA: show all called ")
Gtk.main()
print("AAA: main loop done ")

time.sleep(100000)

print("AAA: main sleep done ???")


import os
import atexit
import sys
Expand Down

0 comments on commit 84967de

Please sign in to comment.