hhgm
Posts: 7
Joined: Mon May 09, 2022 10:31 pm

running dotnet application at startup

Mon May 09, 2022 10:42 pm

Hi

I have a Raspberry Pi 4 with latest image and dotnet 6 installed.

I am trying to have my application located in /home/pi/tm-satellite/SatelliteClient.dll run at startup...

I have created TMSatellite.desktop in /home/pi/.config/autostart

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=TMSatellite
Comment=
Path=/home/pi/tm-satellite/
Exec=/opt/dotnet/dotnet /home/pi/tm-satellite/SatelliteClient.dll
StartupNotify=false
Terminal=true
Hidden=false
X-KeepTerminal=true

double-clicking this runs my application just fine. The same goes if the desktop file is copied to the desktop.

But when restarting the raspberry, nothing happens. If I change the Exec to : xterm -hold -e '/opt/dotnet/dotnet /home/pi/tm-satellite/SatelliteClient.dll', the terminal opens and the header get the name of the dll... but nothing happens. The application does not appear.

If I open a terminal, I am not able to do any of the following commands (nothing happens.. no output):
/opt/dotnet/dotnet /home/pi/tm-satellite/SatelliteClient.dll
/opt/dotnet/dotnet /home/pi/tm-satellite/SatelliteClient.dll -p /home/pi/tm-satellite
/opt/dotnet/dotnet /home/pi/tm-satellite/SatelliteClient.dll -p /home/pi/tm-satellite/

but if I go to the tm-satellite folder I can run: dotnet /home/pi/tm-satellite/SatelliteClient.dll

So, the big question is what I am doing wrong?

klricks
Posts: 8908
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA

Re: running dotnet application at startup

Tue May 10, 2022 2:20 am

If your application requires network then try setting the wait for network at boot option in sudo raspi-config
3B+ & 4B4G Running RPi OS Bookworm w/ Desktop

hhgm
Posts: 7
Joined: Mon May 09, 2022 10:31 pm

Re: running dotnet application at startup

Tue May 10, 2022 5:17 am

That did not help.

Connected to lan, but still does not load the application at startup.
Do not know if there is something fundamentally wrong.. and thinking about rebuilding the Raspberry from the bottom.

Return to “Troubleshooting”