Running xojo executables on Raspberry Pi at boot

  1. 2 years ago

    Hello,

    Having problems running xojo on Raspberry Pi....

    First my main task is to Auto Run My Xojo Program at boot.

    For this i created a file xojoproj.service in /etc/systemd/system the content of which is as below...

    [Unit]
    Description=xojoprog service

    [Service]
    ExecStart=/home/pi/xojoprog

    [Install]
    WantedBy=multi-user.target

    Have enabled this using....

    sudo systemctl enable xojoprog

    Have verified hat he service is up by....

    sudo systemctl staus xojoprog

    After reboot i expected the Xojo application o run automatically,bu doesn't happen.

    My other problem is after i copy the Library files and he executable to....
    home/pi/
    set the appropriate permission to run, i still get a msgbox which asks if i need to Run the program, this way i will not be able to run my application with so many
    user interactions.

    Tried using the rc.local for running my xojo program, this to doesn't work.

    I would appreciate any help in having xojo programs auto run at bootup

    Regards

  2. Did you create your project from the ServiceApplication template?

  3. No I had seen a demo where a simple text file was created this way

  4. Paul L

    7 Nov 2017 Xojo Inc, Third Party Store http://docs.xojo.com

    Is your app a desktop or console app?

    I've used rc.local to auto-run a console app when the Pi starts.

    https://blog.xojo.com/2017/05/15/auto-launch-raspberry-pi-apps/

  5. Well my app is a desktop(GUI)

  6. Grzegorz P

    8 Nov 2017 Pre-Release Testers Europe (Poland, Warszawa)

    I have checked many methods found on the web, but none of them worked with Xojo GUI (Desktop) apps.

    That's how I am doing it now (it works with Xojo GUI apps in the latest Raspbian Stretch):

    1. Go to /etc/xdg/autostart folder and create a new file there

    sudo nano /etc/xdg/autostart/myapp.desktop

    2. Type the following (changing the Name to your app name and Exec to the path to your app):

    [Desktop Entry]
    Type=Application
    Name=MyXojoApp
    Exec=sudo /path/to/your/xojo/GUI/app

    3. Enable your autostart app by selecting it in Desktop Session Settings:

    lxsession-edit

    No idea if it is a "correct" way – but it works ;)

  7. Thank you, will try your method, i desperately need to get the Xojo App to autostart at bootup

  8. Paul L

    15 Nov 2017 Xojo Inc, Third Party Store http://docs.xojo.com

    Starting a desktop app (regardless of whether it is made with Xojo) is trickier on the Pi.

    I did a google search for "pi autostart desktop app" and it took me here:

    https://www.raspberrypi.org/forums/viewtopic.php?t=18968

    And these steps look like what Grzegorz posted.

  9. Franco U

    8 Feb 2018 Pre-Release Testers, Xojo Pro

    I have GUI app that starts automatically once the pi-desktop has been open. You have to wait for desktop to be ready before starting a GUI app.

    To autostart an application after the desktop has been open you need to add the startup command to the file:

    /home/pi/.config/lxsession/LXDE-pi/autostart

    Edit the autostart file with the command:

    sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

     The autostart commands are executed every time a new desktop is open. STARTS.SH SHELL SCRIPT
    A good strategy to have a generic launch system is to create a runnable shell script in the folder:

    /home/pi/Documents/starts.sh

    Remember to add execution permission to the file with:

    chmod +x /home/pi/Documents/starts.sh

    You can edit the file starts.sh and add there all the startup commands without to worry about the
    hidden autostart file.
    The starts.sh shell script need to be configured once in the autostart file by doing the following:
    Edit the startup file with:

    sudo nano /home/pi/.config/lxsession/LXDE-pi/autostart

    Append to the end of file the line:

    @/home/pi/Documents/swt/starts.sh

    Now you have to add your startup commands to the starts.sh file. The file content could be:

    #!/bin/sh
    /home/pi/Documents/<useful_GUI>

    Hope to be clear.

  10. last week

    Julia T

    Oct 8 Sandy Hook, Connecticut

    @Grzegorz P I have checked many methods found on the web, but none of them worked with Xojo GUI (Desktop) apps.

    That's how I am doing it now (it works with Xojo GUI apps in the latest Raspbian Stretch):

    1. Go to /etc/xdg/autostart folder and create a new file there

    sudo nano /etc/xdg/autostart/myapp.desktop

    2. Type the following (changing the Name to your app name and Exec to the path to your app):

    [Desktop Entry]
    Type=Application
    Name=MyXojoApp
    Exec=sudo /path/to/your/xojo/GUI/app

    3. Enable your autostart app by selecting it in Desktop Session Settings:

    lxsession-edit

    No idea if it is a "correct" way – but it works ;)

    Thank you, @Grzegorz P . I can confirm this works with a 2019 r.1.1 standalone web app, whereas I couldn't get the rc.local method to work. Tip: if you're working locally with a display, typing

    gksu pcmanfm

    in terminal gets you a file manager with root privileges, making creation, editing, etc much more pleasant than sudo nano'ing in terminal.

    Also note that the autostart file must have the extension '.desktop'. I initially thought that this was just an example name, but only .desktop files appear in lxsession.

or Sign Up to reply!