[Gambas-user] Automatic Startup
T Lee Davidson
t.lee.davidson at gmail.com
Sun Nov 6 17:56:23 CET 2022
On 11/5/22 18:37, gian via User wrote:
> At this point I wondered, what if I wanted to distribute it with packages?
Then, perhaps, simply use the Gambas IDE package creator (Project -> Make -> Installation package)?
> Now I understand why Bruce is fascinated by scripts (which work even without the IDE).
Graphical applications work without the IDE as well. One of the reasons BruceS writes scripts, as he stated, is to avoid an
"official" installation. (@BruceS: Why? Is there something wrong with an install?)
>> I do not understand why you are doing this:
>> Shell "cd " & Application.Path & " && gbc3 -agt && gba3 -v -o " &/ sPath &/ Application.Name & ".gambas" Wait
>
> With the above in mind, the idea was to create the executable with the collected data (font and location) to start it with a
> launcher and a symlink in autostart.
Why would you need to choose the location? Let the package creator handle that. It would place the executable in /usr/bin. It
also creates a desktop file and places the application icon in the appropriate location.
And, as far as choosing the font, why not allow the user to select the preferred font at will at any time by providing a
Settings/Preferences form.
The form could also allow the user to select if the application should autostart. If the user enables autostart, simply copy the
desktop configuration file from /usr/share/applications to ~./config/autostart (and of course, remove it if the user disables
autostart).
Why complicate things more than necessary? Why try to reinvent the wheel? Why write scripts or shell commands to do what the
package creator already does rather well? Do we rewrite existing Gambas Components? No, we use the tools that already exist
provided they produce an adequate solution. (I think Bruce invents excuses to write a program or script! :-P And, I can
understand that as I have found myself doing the same thing once or thrice.)
>> Why not simply make an installation package thereby letting Gambas determine and handle dependencies?
>>
>> You could specify an extra file (Step 8) that could be a launch script to be placed in the system's autostart folder.
>
> Everything you wrote after that I did not understand and I apologize.
>
> Can you be more clear?
I was referring to making an installation package as mentioned above.
However, Bruce is correct. One cannot simply place a script to launch the application in ~/.config/autostart; it would have to
go in ~./config/autostart-scripts if your system recognizes that convention.
--
Lee
More information about the User
mailing list