Start Qt Application without going through a window manager
-
Hi all. I'm facing a problem with my application. I have a Qt application starting via Systemd (need it this way). What I did before was start the kwin_x11 window manager from a .xinitrc file and then attach to the X server via the
DISPLAY=:0
variable in the launch command.Is there any way to start the application from systemd without going through a window manager?
Thanks in advance
-
@jsulm said in Start Qt Application without going through a window manager:
@nwoki But why do you want to start a GUI application via systemd? Where do you expect to see the GUI?
Because i need the application to restart in case of a crash. I expect to see my Qt application window shown on the screen connected to the pc in use. This is how it's supposed to work:
1 - attach the ac plug to the pc
2 - switch on the pc
3 - application starts automatically WITHOUT passing through sddm/kdm/gdm/kwin_x11/twm/fluxbox etc. It's a pc with a product that starts on boot. -
@nwoki said in Start Qt Application without going through a window manager:
I expect to see my Qt application window shown on the screen connected to the pc in use
Do you use a desktop manager? If so do you want to show the app for the currently logged on user? If no user is logged on and only the log-in window is shown: where do you want to show the app?
-
Hi,
it possible that I am missing something here but I my solution would be two-fold:- small deamon-like program that actually monitors if target app is running and if requirements for it to run are met;
- target app (your main program) that runs in front the way you like.
-
Hi,
Then shouldn't you rather avoid X altogether and use Qt for Embedded Linux ?
-
@SGaist said in Start Qt Application without going through a window manager:
Hi,
Then shouldn't you rather avoid X altogether and use Qt for Embedded Linux ?
Why? The application is running on a normal pc. Anyway, I'll stick to using
kwin_x11
and figure something out -
Embedded doesn't mean it should be credit card size, an ATM is a sort of embedded system even if its locked in a wall.
From your description, it looks like your system should be some sort of kiosk since you don't want any window manager hence my suggestion of using one of the other backends available. This will also have the advantage of reducing the requirements and dependencies of your system.
-
I also have a window-less GUI application on ubuntu. To get rid of the window manager I made a new desktop which auto launches the app.
However if it crashes, it does not restart and I still did not manage to prevent the display from going to sleep after x minutes. But I do not expect my application to crash on my target system. This might be a solution?
-
@SGaist said in Start Qt Application without going through a window manager:
Embedded doesn't mean it should be credit card size, an ATM is a sort of embedded system even if its locked in a wall.
From your description, it looks like your system should be some sort of kiosk since you don't want any window manager hence my suggestion of using one of the other backends available. This will also have the advantage of reducing the requirements and dependencies of your system.
Sorry for the late reply.
Yeah, I looked that up but didn't think it was necessary and that maybe there was another way. I'll try the
eglfs
platform plugin (via the-platform eglfs
switch) and see if it does what I expect it to. I'll get back to you -
-
Then you need the xcb backend.