I am using R23.2 on TX1.
I want to start my QT app after TX1 boot without showing any linux boot messages and login prompt.
I have disable linux boot message and enable autologin. And added desktop entry in /etc/xdg/autostart. Now my app automatically start after boot with no boot messages.
But Below is my problems,
- When my application starts its shows Unity desktop for fraction of seconds.
- Unity desktop is running in background so if someone presses Alt+TAB or some other key combination it will minimise my qt app and switched to Ubuntu Unity.
So is there any way i can start my Qt app just after x11 or lightdm start and before unity appears. or just disable unity and only init x11.
I have asked same questions some months ago in the following thread.
https://devtalk.nvidia.com/default/topic/970098/tx1-l23-2-run-qt-qml-gui-app-on-startup
linuxdev suggested solution using startx. But i think i didn’t able to completely understand his suggestion. And as i had some other imp task i dropped the issue at that time.
So anyone suggest some code snippet, how to achieve this?
Here is a similar reply to a recent question:
https://devtalk.nvidia.com/default/topic/988135/jetson-tx1/customize-start-sequence/post/5057956/#5057956
Basic flow of boot is:
- kernel load -> starts init
- [u]At multi-user stage:
- [/u] init -> starts getty/agetty
- getty/agetty -> starts console logins
- At graphical stage: getty/agetty -> replaces one console login with X11 using login manager arguments
- At graphical login: login manager -> replaces existing X+login with X+window manager run sudo user
Changing the arguments passed to X at start changes what X runs with it; default is either a login manager or a window manager. You have to edit that (I have no example of a specific edit).
One option is to edit the startup of the standard X init file location in “/etc/X11” and let the normal X startup use that. The other option is to start X independently with your own configuration directly naming what you want started with it (this would mean having getty/agetty start X with your arguments instead of those of “/etc/X11”). The decision on which to choose would be related to whether you want just this application to run, or if you want your application to run within a windowing environment (see that URL listed above).
Startx is somewhat of a hybrid. systemd or init scripts normally tell getty to replace a console session with an X graphical session based on “/etc/X11” files. Startx is intended for manual start and offers some command line customization, but I think it still uses some of “/etc/X11” unless your options override (one part which startx does not do from “/etc/X11” is run a login manager…startx directly starts as the user running startx). Note that startx is a human-readable script…you can walk through this to see how it is done and then manually create your own startx style script.
To emphasize, X is just a program which starts with arguments like any other program. The init process is configured to start with a login manager argument unless autologin occurs, in which case X starts instead with a window manager argument (and sudo some user). Manual login at the login manager replaces an existing X session running a login manager with an X session using a window manager (sudo user). If at any point you change the arguments to X then you change what it spawns with…the trick is deciding where you want to intercept it.
To know what occurs automatically you’d need to study how getty/agetty is started and configured.
Hi Linuxdev,
Thanks for your detail explanation.
I got one simple solution.
Add following line in /etc/lightdm/lightdm.conf
session-setup-script="QT App Path"
Now my Qt App start after boot without Unity to be load…