I made a .desktop file for Androxyde's Flashtool (utility for Sony Xperia devices that I have to open with an executable file in its folder) that requires root privileges to use fastboot utilities.
I used to make it work with gksu
, but I'm on Ubuntu 15.04 and gksu is now old.
I tried to modify the exec
line from
Exec=gksu /home/natasha/FlashTool/FlashTool
to
Exec=pkexec /home/natasha/FlashTool/FlashTool
Then, I read about pkexec doesn't allow to run X11 applications and so I override in this way:
Link to full image on Imgur.com
The problem now is: It asks me the password but the Flashtool's GUI doesn't start.
BUT if I execute that command in terminal, the program starts without problems. What can I do?
Best Answer
Create a new file in
/usr/share/polkit-1/actions/
and add the lines below:
Then create a new file
/home/natasha/FlashTool/
and add the lines below:
Use the line below for
Exec
in yourdesktop
file:Tested on my system Ubuntu 15.04 GNOME with the following files: