the application is not launched, probably waiting for the password.
For the same reason I can't launch it automatically at startup.
How do I go around this ?
I try not to use sudo but without it the database file cannot be open.
Edit: If I change to superuser then no need for password !
Is this a database issue? I can not see it would be an issue with starting the app. The fact you say "without it the database file can not open"
Check the following:
1. Have you setup a user for the database and given all privileges.
2. Is your app using the user you setup in (1)
3. It maybe that the ip you are using to access in is refused. In this case you need to go to remoteSQL and setup wild card access %
There is no rc.local file in mint anymore - it was deprecated...
So now there are two option to launch the application:
1. change to su, change to the folder of the program, run with nohup, can close the terminal.
2. change to the folder of the program, run with sudo and without nohup, keep the terminal open.
Is this a database issue? I can not see it would be an issue with starting the app. The fact you say "without it the database file can not open"
Check the following:
1. Have you setup a user for the database and given all privileges.
2. Is your app using the user you setup in (1)
3. It maybe that the ip you are using to access in is refused. In this case you need to go to remoteSQL and setup wild card access %
The database is used by the b4j server program. Everything works fine if I use sudo or su but both options require entering password in order for launching the server as explained above.
Read it, looks promising for the auto start, I still don't know how to eliminate the requirement for password every time it runs.
I read somewhere that rc.local is run before the system changes to the user , still as root.
Will the service do the same ? like this:
Typically you instruct systemd to run a service as a specific user/group with a User= and Group= directive in the [Service] section of the unit file.
Set those to root (or remove them, as running as root is the default).
Problem solved. This is how:
1. created a service in systemd as explained here https://www.linuxbabe.com/linux-server/how-to-enable-etcrc-local-with-systemd
2. I put my program in a directory in /etc (using nemo) and referenced it in the rc.local file (which was created in 1).
For some reason the path to Home/dudu was not recognized by the service, maybe because the user account does not exist when the service is run.
Now it is launched automatically in boot.