#!/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_()