Python- Modal Window

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Python- Modal Window

Gtk+ - General mailing list
Hello,
I'm making a Python3 powered project which opens whenever someone opens their computer (assume Linux-Debain based) and asks them some details. The user should not be allowed to use the computer without giving the details. The project is based on GTK3 and is for Debian based OS. I need help in the following-
How can I make the application modal? That is, make sure that the user cannot access any thing in desktop without giving the details (the application is a compulsory one, thus one should not be able to close or minimise it).

I researched on this a bit and found the answers leading to Desktop Managers. But I'm stuck how to start with them using Python. So need some help here.

Thank You
J. Arun Mani




_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: Python- Modal Window

Gtk+ - General mailing list
On Tue, Dec 11, 2018 at 6:36 AM J.Arun Mani via gtk-list <[hidden email]> wrote:
Hello,
I'm making a Python3 powered project which opens whenever someone opens their computer (assume Linux-Debain based) and asks them some details. The user should not be allowed to use the computer without giving the details. The project is based on GTK3 and is for Debian based OS. I need help in the following-
How can I make the application modal? That is, make sure that the user cannot access any thing in desktop without giving the details (the application is a compulsory one, thus one should not be able to close or minimise it).

I researched on this a bit and found the answers leading to Desktop Managers. But I'm stuck how to start with them using Python. So need some help here.

Thank You
J. Arun Mani

The easiest way I can see to do this is to have your computer set up to auto-login ( eg maybe something along the lines of https://askubuntu.com/questions/175248/how-to-autologin-without-entering-username-and-passwordin-text-mode ) ... and then have it start X automatically ... but with a ~/.xinitrc that launches *just* your python app, instead of a window manager. Then if the user has done what's needed, you'd have your app launch a window manager. I'd do it like this because once a window manager is running, you don't have a reliable way of preventing users from escaping your app. Maybe there is a better way?

Dan

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list