2

This is my first question here in forum. I have an RPi 3B+ with Raspbian OS installed in it with 16gb SD Card. I am developing a GUI application using PyQT. It's running just fine. I want it to start when the RPi boots. It's happening when I add it's location in autostart file located at /etc/xdg/lxsession/LXDE-pi/autostart. But I don't want anything else on the desktop except the application. I also saw people rebooting with root mode but IDK if it's safe. I just don't want any menu, Functionality, network statuses etc on the desktop GUI. Can it be disabled? Thanks for the help :) Regards Sahil

2 Answers 2

2

I suggest you to try out this guide: setup-raspberry-pi-for-kiosk-mode This guide starts with the installation of Raspbian Lite and then installing X11.

Steps:

  1. Flash Raspbian Lite.

  2. Install X11 and related packages. sudo apt-get install --no-install-recommends xserver-xorg x11-xserver-utils xinit openbox

  3. In the file, /etc/X11/xinit/xinitrc, write the script to start your pyqt application.

  4. In the file, /etc/profile, append the line "startx -- -nocursor".

2

(I know this is old but for the record)

You don't need X11 or Wayland. Qt can be told via the environment to render direcly by setting QT_QPA_PLATFORM=eglfs

You can also tell it to hide the cursor by setting QT_QPA_EGLFS_HIDECURSOR=1

Since someone else asked me this morning I created a complete minimal PySide / PyQt application that runs directly on the 7" display without any X11 or desktop code. You can start with the Lite version of Rasbperry Pi.

The code and installation instructions are here: https://github.com/lbt/python-gui

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.