Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.0k views
Welcome To Ask or Share your Answers For Others

1 Answer

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...