FreeDATA icon indicating copy to clipboard operation
FreeDATA copied to clipboard

[Feature Request]: FreeData server running under systemcontrol

Open pa1er opened this issue 1 year ago • 14 comments

Problem Description

You have to run the server from a terminal. When using Linux connected to the TRX you always have to have an open terminal to keep it running. When starting the server under the systemctl (freedata.service) this problem can be resolved in a simple way.

Proposed Solution

Creating a freedata.service file and copy it to the right location to be able to start the server from systemctl

Alternatives Considered

Any other way to let the server running out of a terminal

Additional Information

No response

pa1er avatar Sep 18 '24 07:09 pa1er

@pa1er thats an interesting feature request. Thanks!

@deejdeej what do you think regarding to this?

Personally I had several problems with services in past, so I'm concerned a bit about stability. Also the problems with debugging, specially for inexperienced users. Is there a chance, making this optional? Maybe a separated step part of the installation instructions? Nevertheless I like this as it's making the usage probably more lightweight as it is running in background ( this is a pro and con as well )

DJ2LS avatar Sep 18 '24 09:09 DJ2LS

If you define the services than you don have to switch them on by default. In stead of starting with the run script you will than start with 'systemctl start freedata' or stop etc.

pa1er avatar Sep 18 '24 12:09 pa1er

So to me it looks like, we just have to adjust the installation instructions as this is something each user can or should do by him/herself?

DJ2LS avatar Sep 18 '24 13:09 DJ2LS

You don't actually have to run the server from a terminal. You can create a shortcut on the desktop and double click the icon to run it (which will then open a terminal automatically and run the software).

I could create a sample shortcut under the Linux tools section if you think that would be useful. Here are manual instructions:

https://linuxconfig.org/how-to-create-desktop-shortcuts-in-linux

deejdeej avatar Sep 18 '24 13:09 deejdeej

If you define the services than you don have to switch them on by default. In stead of starting with the run script you will than start with 'systemctl start freedata' or stop etc.

I think the service config should lead to the startup script so we have an equal way of starting FreeDATA

DJ2LS avatar Sep 18 '24 13:09 DJ2LS

You don't actually have to run the server from a terminal. You can create a shortcut on the desktop and double click the icon to run it (which will then open a terminal automatically and run the software).

I could create a sample shortcut under the Linux tools section if you think that would be useful. Here are manual instructions:

https://linuxconfig.org/how-to-create-desktop-shortcuts-in-linux

Sounds to me like another options.

So we have two additional startup topics:

  • as system service
  • by desktop icon

DJ2LS avatar Sep 18 '24 13:09 DJ2LS

I've added two files to the tools/Linux section in the develop branch. README-Desktop-icon.txt - Instructions for setting up the Desktop icon FreeDATA.desktop - the Desktop icon file

@DJ2LS Do we have a FreeDATA icon (graphics)? If so, I can add that so it displays on the Desktop instead of the default symbol.

deejdeej avatar Sep 18 '24 14:09 deejdeej

For me the desktop-item is not really working. I am using the Ubuntu server as a real server, so try to avoid using the screen. I connect with my laptop to a remote desktop OR the web interface of freeData. That's why systemservices are so great. And by by using the enable command (systemctl enable .....) you create the link for the startup after a reboot (or disable to remove the link) By using a terminal or desktop-icon you always need the screen or a connection to a terminal. Systemservices keep running after connection to terminal or screen are gone. So also nice to monitor the freq when you are away.

pa1er avatar Sep 18 '24 14:09 pa1er

I've added two files to the tools/Linux section in the develop branch.

README-Desktop-icon.txt - Instructions for setting up the Desktop icon

FreeDATA.desktop - the Desktop icon file

@DJ2LS Do we have a FreeDATA icon (graphics)? If so, I can add that so it displays on the Desktop instead of the default symbol.

Yes, in docs folder or gui public folder

DJ2LS avatar Sep 18 '24 14:09 DJ2LS

For me the desktop-item is not really working. I am using the Ubuntu server as a real server, so try to avoid using the screen. I connect with my laptop to a remote desktop OR the web interface of freeData. That's why systemservices are so great. And by by using the enable command (systemctl enable .....) you create the link for the startup after a reboot (or disable to remove the link)

By using a terminal or desktop-icon you always need the screen or a connection to a terminal. Systemservices keep running after connection to terminal or screen are gone. So also nice to monitor the freq when you are away.

Ah now I understand your use case. What if we create a custom service file in Linux/tools as well, then adding a command for symlink it to services folder?

Then we have a example as well. But I think this is all just a question of documentation, right?

DJ2LS avatar Sep 18 '24 14:09 DJ2LS

Hi @pa1er , If you have a suggested freedata.service file, I can help you to test it and add it to the Linux tools section.

Part of the challenge is that the existing run-freedata-linux.sh script expects to run in an interactive terminal, and waits for CTRL-C to exit. I am not sure how to make that work in a systemd service file since those are designed to run non-interactive programs.

deejdeej avatar Sep 20 '24 18:09 deejdeej

I will create a service that will work in my ubuntu server, For other things on my fedora server I have done this before. I'll let you know.

pa1er avatar Sep 20 '24 21:09 pa1er

I will create a service that will work in my ubuntu server, For other things on my fedora server I have done this before. I'll let you know.

Have you had succes by now?

dk5sm avatar Dec 19 '24 06:12 dk5sm

any news regarding this issue?

We could add some instructions to the wiki I think. Doing this per default might cause some issues because of different distributions out there.

DJ2LS avatar Feb 27 '25 08:02 DJ2LS

https://wiki.freedata.app/en/knowledge-base/raspberry-pi/install-as-system-service

Started working on this as part of my QMX+ with included raspberry pi

@LA3QMA feel free adjusting it if you want. This might be of interest for you as well

DJ2LS avatar May 06 '25 15:05 DJ2LS