You are not logged in.

#1 2016-09-21 14:08

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Start app on boot

I am creating the .esh installer for apt-updater and have it working now, but need to put a soft-link into $HOME/.q4data/Programs/Startup/ to get the app to start automatically, is this the best way to do it?

If so how can I set this up in installer.cfg/Makefile?

If not what is the best way to achieve this?

Offline

#2 2016-09-21 15:22

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: Start app on boot

Dai_trying wrote:

... need to put a soft-link into $HOME/.q4data/Programs/Startup/ to get the app to start automatically, is this the best way to do it

There are three proper ways to start an application on session login:

1. Run an application for single user on TDE session login only:
Place script, executable, .desktop file or softlink into '$HOME/.q4data/Programs/Startup/' respectively to '$HOME/.trinity/Autostart/'

2. Run an application for all users on TDE session login only:
Place script, executable, .desktop file or softlink into '/opt/trinity/share/autostart/'

3. Run an application for all users on any XDG desktop compatible session login:
Place script, executable, .desktop file or softlink '/etc/xdg/autostart/'

Dai_trying wrote:

If so how can I set this up in installer.cfg/Makefile?

For points 2. and 3. you can simply copy the application executable or .desktop file or softlink to the absolute path of the filesystem structure.

For 1., you need to create an APT postinst script which will scan user's home directories and put script into the right place in user's home dir. Please see https://www.debian.org/doc/debian-polic … ripts.html how to create package maintainers scripts.

Offline

#3 2016-09-21 15:34

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Start app on boot

Thank you guys, I will look at the different options.

Do you have a preference as to which way you would prefer the application to work?

Offline

#4 2016-09-21 15:56

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: Start app on boot

Point 3. would be the good as well as easy way to get application to start up.

Offline

#5 2016-09-21 16:25

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: Start app on boot

Thanks guys, should have the installer ready for testers later today smile

btw I'm using the qt4 version of the script as qt5 is not giving transparency on the icon. I hope this is ok with you.

Offline

#6 2016-09-21 16:28

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: Start app on boot

Nice job, qt4 is ok.

Offline

Board footer

Powered by FluxBB