B4J Question [Solved] Run app with admin rights

aeric

Expert
Licensed User
Longtime User
How do I run a GUI app in Ubuntu linux with sudo and do no prompt the user to enter password?
I have run.command in application directory and myapp.desktop on desktop but I don't know how to make it run with admin rights.
When I double click myapp.desktop it runs but no admin rights. Without admin rights, my app cannot work with serial ports.
 

OliverA

Expert
Licensed User
Longtime User
How do I run a GUI app in Ubuntu linux with sudo and do no prompt the user to enter password?
Without admin rights, my app cannot work with serial ports.
Doing sudo without password seems to be a sledgehammer approach to your issue. I would first try to give the user rights to the serial port(s), see https://www.b4x.com/android/forum/threads/serial-in-linux.84714/post-536563 . Note: You may need to research the proper group to add the user to for your distro.

If you do want to use sudo w/o password (which I really do not recommend), see the following link for direction https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-password
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
Yes, I tried that. It is part of the solution. I am now doing more testing such as using different script in different path.
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
It works! Thank you so much! ??
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…