简体   繁体   中英

Running a Qt application at startup

I wrote a Qt application that is going to run on Linux. It supposed to run at startup.

It's supposed to run on every Linux- Suse, RedHat etc.

What script should I write and Where to put it?

I don't know how to write scripts at all, so I would appreciate it if you will attach an example.

You need to create a desktop entry file for your application (see here ) and to put it in user's $HOME/.config/autostart directory.

Any desktop entry file in that dir will get executed when a Window Manager starts up (see here ).

To do this, usually you'll need to create your desktop entry file by hand (that's it, not via C++ code/script) and to just install in that directory via C++ code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM