I have an application Test including user authentication screens. I need to run the app from terminal using username and password. If anybody knows, please help me?
Asked
Active
Viewed 119 times
0
-
If you are talking about system user's authentication, then [polkit](https://www.freedesktop.org/software/polkit/docs/latest/polkit.8.html) is a way to do that. – Nitinkumar Ambekar Jan 09 '18 at 12:25
-
Not system authentication, I mean to execute app functions via terminal commands – Jan 10 '18 at 06:27
-
Are you talking about command line arguments? like `myprog --dothis` or `myprog --dothat`? – Nitinkumar Ambekar Jan 10 '18 at 07:38
-
Yes. I have a Mac Application for ex: My app. My app includes some text fields for username and password and a button to validate login in a server. I need to do the same task through terminal commands like Myapp -u username -p Password. (Ex: Python --version) – Jan 10 '18 at 09:05
-
You didn't mention programming language of your application. in C language you can use `int main(int argc, char **argv)` and then check command line arguments in `argv[n]`. – Nitinkumar Ambekar Jan 10 '18 at 09:11
-
A MAC Application run in swift + cocoa – Jan 10 '18 at 09:42
-
[This](https://stackoverflow.com/q/24029633/2706918) thread will help you further. – Nitinkumar Ambekar Jan 10 '18 at 09:45