In the old days of CentOS 5 i had an application that run as another user. I created a .desktop file which run a command that looked like this:
gksu -u anotheruser someapplication
When the user clicked the icon a popup asked for the password of "anotheruser" and when the password was correct "someapplication" started.
Now in the modern days of CentOS 7 i can't find a replacment for this behaviour. I tried beesu:
beesu -l -P someapplication anotheruser
but it is asking me for the root password instead of "anotheruser" password.
I also tried pkexec:
pkexec --user anotheruser someapplication
With the same result.
Both methods also have problems finding the correct display variable:
Failed to parse arguments: Cannot open display:
Any help will be appreciated.
Thank you.