Under Ubuntu application restarts itself from the root using the commands:

 gksu "path to app" 

or

 beesu "path to app" 

the user enters the root password and the application runs as root.

I try to implement the same behavior under OpenSuze . gksu and beesu prohibited. From the root, the application is restarted with the command:

 xdg-su -u root -c "path to app" 

But after entering the password, the dialog closes and the program does not start. What could be the problem?

  • and looked at the logs? - Mikhail Vaysman
  • Why enter the root password? This is stupid. A long time ago, in a galaxy far far away, sudo was invented precisely in order not to know the password of the root, but to have full (or not quite) access. - don Rumata
  • The program should work on the user machine. Using sudo to do the same thing that xdg-su does is not clear to me. - pier_nasos
  • The problem is partially solved. At the start, the program executed if (isatty (fileno (stdin))) {if (fork ()) return 0; setsid (); } If this is commented out, the subsequent xdg-su successfully launches the program as root. Unfortunately, I do not know for what purpose the code above was written. - pier_nasos

0