First commit

This commit is contained in:
2026-01-14 01:48:38 +01:00
commit da6877af61
3 changed files with 68 additions and 0 deletions

31
notice.py Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env python3
# To put in home directory autoexec
import sys
from PyQt5.QtWidgets import QApplication, QMessageBox
from PyQt5.QtCore import Qt
# Create a Qt application
app = QApplication(sys.argv)
# Create a message box
msg = QMessageBox()
msg.setIcon(QMessageBox.Information)
msg.setWindowTitle("Welcome into the guest account!")
msg.setText("Welcome!\nThis is an ephemeral session.\n\nAll the changes made will be reverted at logout.\nPlease save your work elsewhere.\n\nFor more information, contact the administrator.")
msg.setStandardButtons(QMessageBox.Ok)
# Set the window flags to remove all buttons (minimize, maximize, close)
msg.setWindowFlags(Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint)
# Disable resizing by setting a fixed size
msg.setFixedSize(400, 200)
# Make the window modal (optional, to block interaction with other windows)
msg.setWindowModality(Qt.ApplicationModal)
# Show the message box in the center of the screen
msg.exec_()